blob: 9c408fcc51fddbf3162324cc19a519c0ee932fb9 [file] [log] [blame]
Sapan Bhatia8c95eb42017-05-02 12:17:52 +02001option app_label = "fabric";
Matteo Scandolo9cc4f6f2017-10-02 18:03:58 -07002option name = "fabric";
Sapan Bhatia8c95eb42017-05-02 12:17:52 +02003
Luca Preteb601c382018-04-30 16:10:43 -07004message FabricService(Service) {
Matteo Scandolo9cc4f6f2017-10-02 18:03:58 -07005 option verbose_name = "Fabric Service";
6
7 optional bool autoconfig = 1 [default = True, help_text="Autoconfigure the fabric", null=False];
Sapan Bhatia8c95eb42017-05-02 12:17:52 +02008}
Luca Preteb601c382018-04-30 16:10:43 -07009
10message Switch(XOSBase) {
11 option verbose_name = "Fabric Switch";
12
Scott Baker8270a1a2018-10-01 11:50:12 -070013 required string ofId = 1 [help_text = "The unique OpenFlow ID of the fabric switch", max_length = 19, null = False, db_index = False, blank = False];
Luca Preteb601c382018-04-30 16:10:43 -070014 required string name = 2 [help_text = "The unique name of the fabric switch", max_length = 254, null = False, db_index = False, blank = False];
15 required string driver = 3 [help_text = "The driver used by the SDN controller", max_length = 254, null = False, db_index = False, blank = False, default = "ofdpa3"];
16 required int32 ipv4NodeSid = 4 [help_text = "The MPLS label used by the switch [17 - 1048576]", null = False, db_index = False, blank = False];
17 required string ipv4Loopback = 5 [help_text = "Fabric loopback interface", max_length = 17, null = False, db_index = False, blank = False];
18 required string routerMac = 6 [help_text = "MAC address of the fabric switch used for all interfaces", max_length = 17, null = False, db_index = False, blank = False];
19 required bool isEdgeRouter = 7 [default = True, help_text="Whether the fabric switch is a leaf or a spine", null=False, blank = False];
20}
21
22message SwitchPort(XOSBase) {
23 option verbose_name = "Fabric Switch Port";
24
Scott Baker570429c2018-10-29 17:28:30 -070025 required manytoone switch->Switch:ports = 1:1001 [help_text = "The fabric switch the port belongs to", db_index = True, null = False, blank = False, tosca_key=True];
Luca Preteb601c382018-04-30 16:10:43 -070026 required int32 portId = 2 [help_text = "The unique port OpenFlow port ID", null = False, db_index = False, blank = False, tosca_key=True];
Matteo Scandolodfe75ff2018-06-15 10:52:09 -070027 required bool host_learning = 3 [help_text = "whether or not to enable autodiscovery", default = True, null = False, db_index = False, blank = False];
Luca Preteb601c382018-04-30 16:10:43 -070028}
29
30message PortInterface(XOSBase) {
31 option verbose_name = "Fabric Port Interface";
32
Scott Baker570429c2018-10-29 17:28:30 -070033 required manytoone port->SwitchPort:interfaces = 1:1001 [help_text = "The fabric switch port the interface belongs to", db_index = True, null = False, blank = False];
Luca Preteb601c382018-04-30 16:10:43 -070034 required string name = 2 [help_text = "The unique name of the fabric switch port", max_length = 254, null = False, db_index = False, blank = False];
Matteo Scandoloaf3c9942018-06-27 14:03:12 -070035 required string ips = 3 [help_text = "The interface IP address (xxx.yyy.www.zzz/nm)", max_length = 20, null = False, db_index = False, blank = False, unique_with = "port"];
Matteo Scandolob13dc2d2018-08-15 17:57:35 -070036 optional int32 vlanUntagged = 4 [help_text = "The optional untagged VLAN ID for the interface", null = True, db_index = False, blank = True];
Matteo Scandoloaf3c9942018-06-27 14:03:12 -070037}
38
39message NodeToSwitchPort(XOSBase) {
40 option verbose_name = "Node to switch port";
41 option description = "Compute Node connection to a Fabric switch port";
42
Scott Baker570429c2018-10-29 17:28:30 -070043 required manytoone port->SwitchPort:node_to_switch_ports = 1:1002 [help_text = "The fabric switch port the node is connected to", db_index = True, null = False, blank = False, tosca_key=True];
44 required manytoone node->Node:node_to_switch_ports = 2:1004 [help_text = "The ComputeNode this port is connected to", db_index = True, null = False, blank = False, tosca_key=True];
Luca Preteb601c382018-04-30 16:10:43 -070045}