Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 2 | * Copyright 2014 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.openflow.controller.driver; |
tom | 7ef8ff9 | 2014-09-17 13:08:06 -0700 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * When we remove a pending role request we use this enum to indicate how we |
| 20 | * arrived at the decision. When we send a role request to the switch, we |
| 21 | * also use this enum to indicate what we expect back from the switch, so the |
| 22 | * role changer can match the reply to our expectation. |
| 23 | */ |
| 24 | public enum RoleRecvStatus { |
| 25 | /** The switch returned an error indicating that roles are not. |
| 26 | * supported*/ |
| 27 | UNSUPPORTED, |
| 28 | /** The request timed out. */ |
| 29 | NO_REPLY, |
| 30 | /** The reply was old, there is a newer request pending. */ |
| 31 | OLD_REPLY, |
| 32 | /** |
| 33 | * The reply's role matched the role that this controller set in the |
| 34 | * request message - invoked either initially at startup or to reassert |
| 35 | * current role. |
| 36 | */ |
| 37 | MATCHED_CURRENT_ROLE, |
| 38 | /** |
| 39 | * The reply's role matched the role that this controller set in the |
| 40 | * request message - this is the result of a callback from the |
| 41 | * global registry, followed by a role request sent to the switch. |
| 42 | */ |
| 43 | MATCHED_SET_ROLE, |
| 44 | /** |
| 45 | * The reply's role was a response to the query made by this controller. |
| 46 | */ |
| 47 | REPLY_QUERY, |
| 48 | /** We received a role reply message from the switch |
| 49 | * but the expectation was unclear, or there was no expectation. |
| 50 | */ |
| 51 | OTHER_EXPECTATION, |
| 52 | } |