blob: db8efd1064566068383236426af8d4d5ac30a3a3 [file] [log] [blame]
tom7ef8ff92014-09-17 13:08:06 -07001package org.onlab.onos.of.controller;
2
3import org.projectfloodlight.openflow.protocol.OFControllerRole;
4
5/**
6 * The role of the controller as it pertains to a particular switch.
7 * Note that this definition of the role enum is different from the
8 * OF1.3 definition. It is maintained here to be backward compatible to
9 * earlier versions of the controller code. This enum is translated
10 * to the OF1.3 enum, before role messages are sent to the switch.
11 * See sendRoleRequestMessage method in OFSwitchImpl
12 */
13public enum RoleState {
14 EQUAL(OFControllerRole.ROLE_EQUAL),
15 MASTER(OFControllerRole.ROLE_MASTER),
16 SLAVE(OFControllerRole.ROLE_SLAVE);
17
18 private RoleState(OFControllerRole nxRole) {
19 nxRole.ordinal();
20 }
21
22}
23
24
25