Sapan Bhatia | 8c95eb4 | 2017-05-02 12:17:52 +0200 | [diff] [blame] | 1 | option app_label = "fabric"; |
Matteo Scandolo | 9cc4f6f | 2017-10-02 18:03:58 -0700 | [diff] [blame] | 2 | option name = "fabric"; |
Sapan Bhatia | 8c95eb4 | 2017-05-02 12:17:52 +0200 | [diff] [blame] | 3 | |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 4 | message FabricService(Service) { |
Matteo Scandolo | 9cc4f6f | 2017-10-02 18:03:58 -0700 | [diff] [blame] | 5 | option verbose_name = "Fabric Service"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 6 | option description = "Service that manages and configures fabric switches in ONOS"; |
Matteo Scandolo | 9cc4f6f | 2017-10-02 18:03:58 -0700 | [diff] [blame] | 7 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 8 | optional bool autoconfig = 1 [ |
| 9 | help_text="Automatically apply addresses from AddressManager service to Fabric", |
| 10 | default = True, |
| 11 | null = False]; |
Sapan Bhatia | 8c95eb4 | 2017-05-02 12:17:52 +0200 | [diff] [blame] | 12 | } |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 13 | |
| 14 | message Switch(XOSBase) { |
| 15 | option verbose_name = "Fabric Switch"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 16 | option description = "An individual fabric switch managed by ONOS"; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 17 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 18 | required string ofId = 1 [ |
| 19 | help_text = "The unique OpenFlow ID of the fabric switch", |
| 20 | db_index = False, |
| 21 | max_length = 19]; |
| 22 | required string name = 2 [ |
| 23 | help_text = "The unique name of the fabric switch", |
| 24 | db_index = False, |
| 25 | max_length = 254]; |
| 26 | required string driver = 3 [ |
| 27 | help_text = "The driver used by the SDN controller", |
| 28 | db_index = False, |
| 29 | default = "ofdpa3", |
| 30 | max_length = 254]; |
| 31 | required int32 ipv4NodeSid = 4 [ |
| 32 | help_text = "The MPLS label used by the switch [17 - 1048576]", |
| 33 | db_index = False]; |
| 34 | required string ipv4Loopback = 5 [ |
| 35 | help_text = "Fabric loopback interface", |
| 36 | db_index = False, |
| 37 | max_length = 17]; |
| 38 | required string routerMac = 6 [ |
| 39 | help_text = "MAC address of the fabric switch used for all interfaces", |
| 40 | db_index = False, |
| 41 | max_length = 17]; |
| 42 | required bool isEdgeRouter = 7 [ |
| 43 | help_text="True if the fabric switch is a leaf, False if it is a spine", |
| 44 | default = True, |
| 45 | null = False]; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | message SwitchPort(XOSBase) { |
| 49 | option verbose_name = "Fabric Switch Port"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 50 | option description = "A port on a fabric switch"; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 51 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 52 | required manytoone switch->Switch:ports = 1:1001 [ |
| 53 | help_text = "The fabric switch the port belongs to", |
| 54 | db_index = True, |
| 55 | tosca_key=True]; |
| 56 | required int32 portId = 2 [ |
| 57 | help_text = "The unique port OpenFlow port ID", |
| 58 | db_index = False, |
| 59 | tosca_key=True]; |
| 60 | required bool host_learning = 3 [ |
| 61 | help_text = "whether or not to enable autodiscovery", |
| 62 | default = True, |
| 63 | db_index = False]; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | message PortInterface(XOSBase) { |
| 67 | option verbose_name = "Fabric Port Interface"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 68 | option description = "An interface on a port on a fabric switch"; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 69 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 70 | required manytoone port->SwitchPort:interfaces = 1:1001 [ |
| 71 | help_text = "The fabric switch port the interface belongs to", |
| 72 | db_index = True]; |
| 73 | required string name = 2 [ |
| 74 | help_text = "The unique name of the fabric switch port", |
| 75 | db_index = False, |
| 76 | max_length = 254]; |
| 77 | optional int32 vlanUntagged = 3 [ |
| 78 | help_text = "The optional untagged VLAN ID for the interface", |
| 79 | db_index = False]; |
Matteo Scandolo | af3c994 | 2018-06-27 14:03:12 -0700 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | message NodeToSwitchPort(XOSBase) { |
| 83 | option verbose_name = "Node to switch port"; |
| 84 | option description = "Compute Node connection to a Fabric switch port"; |
| 85 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 86 | required manytoone port->SwitchPort:node_to_switch_ports = 1:1002 [ |
| 87 | help_text = "The fabric switch port the node is connected to", |
| 88 | db_index = True, |
| 89 | tosca_key=True]; |
| 90 | required manytoone node->Node:node_to_switch_ports = 2:1004 [ |
| 91 | help_text = "The ComputeNode this port is connected to", |
| 92 | db_index = True, |
| 93 | tosca_key=True]; |
Luca Prete | 1537787 | 2018-09-11 17:32:55 -0700 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | message FabricIpAddress(XOSBase) { |
| 97 | option verbose_name = "IP address"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 98 | option description = "An IP address associated with a port on a fabric switch"; |
Luca Prete | 1537787 | 2018-09-11 17:32:55 -0700 | [diff] [blame] | 99 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 100 | required manytoone interface->PortInterface:ips = 1:1001 [ |
| 101 | help_text = "The port interface the IP address belongs to", |
| 102 | db_index = True, |
| 103 | tosca_key = True]; |
| 104 | required string ip = 2 [ |
| 105 | help_text = "The unique IP address (either IPv4 or IPv6 / netmask)", |
| 106 | db_index = False, |
| 107 | max_length = 52, |
| 108 | tosca_key = True, |
| 109 | unique_with = "interface"]; |
| 110 | optional string description = 3 [ |
| 111 | help_text = "A short description of the IP address", |
| 112 | db_index = False, |
| 113 | max_length = 254]; |
Luca Prete | 1537787 | 2018-09-11 17:32:55 -0700 | [diff] [blame] | 114 | } |