blob: 88c4cc7087ac9c0ce630ffa3c2c090adecc73c8f [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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 Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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 Vachuska781d18b2014-10-27 10:31:25 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.openflow.controller.driver;
tom7ef8ff92014-09-17 13:08:06 -070017
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 */
24public 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}