blob: aff47f88c7e3f295ffa456703ca476ce2784de5d [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
Luca Prete15377872018-09-11 17:32:55 -070013 required string ofId = 1 [help_text = "The unique OpenFlow ID of the fabric switch", max_length = 19,db_index = False];
14 required string name = 2 [help_text = "The unique name of the fabric switch", max_length = 254,db_index = False];
15 required string driver = 3 [help_text = "The driver used by the SDN controller", max_length = 254,db_index = False, default = "ofdpa3"];
16 required int32 ipv4NodeSid = 4 [help_text = "The MPLS label used by the switch [17 - 1048576]",db_index = False];
17 required string ipv4Loopback = 5 [help_text = "Fabric loopback interface", max_length = 17,db_index = False];
18 required string routerMac = 6 [help_text = "MAC address of the fabric switch used for all interfaces", max_length = 17,db_index = False];
19 required bool isEdgeRouter = 7 [default = True, help_text="Whether the fabric switch is a leaf or a spine", null=False];
Luca Preteb601c382018-04-30 16:10:43 -070020}
21
22message SwitchPort(XOSBase) {
23 option verbose_name = "Fabric Switch Port";
24
Luca Prete15377872018-09-11 17:32:55 -070025 required manytoone switch->Switch:ports = 1:1001 [help_text = "The fabric switch the port belongs to", db_index = True, tosca_key=True];
26 required int32 portId = 2 [help_text = "The unique port OpenFlow port ID",db_index = False, tosca_key=True];
27 required bool host_learning = 3 [help_text = "whether or not to enable autodiscovery", default = True,db_index = False];
Luca Preteb601c382018-04-30 16:10:43 -070028}
29
30message PortInterface(XOSBase) {
31 option verbose_name = "Fabric Port Interface";
32
Luca Prete15377872018-09-11 17:32:55 -070033 required manytoone port->SwitchPort:interfaces = 1:1001 [help_text = "The fabric switch port the interface belongs to", db_index = True];
34 required string name = 2 [help_text = "The unique name of the fabric switch port", max_length = 254,db_index = False];
35 optional int32 vlanUntagged = 3 [help_text = "The optional untagged VLAN ID for the interface", db_index = False];
Matteo Scandoloaf3c9942018-06-27 14:03:12 -070036}
37
38message NodeToSwitchPort(XOSBase) {
39 option verbose_name = "Node to switch port";
40 option description = "Compute Node connection to a Fabric switch port";
41
Luca Prete15377872018-09-11 17:32:55 -070042 required manytoone port->SwitchPort:node_to_switch_ports = 1:1002 [help_text = "The fabric switch port the node is connected to", db_index = True, tosca_key=True];
43 required manytoone node->Node:node_to_switch_ports = 2:1004 [help_text = "The ComputeNode this port is connected to", db_index = True, tosca_key=True];
44}
45
46message FabricIpAddress(XOSBase) {
47 option verbose_name = "IP address";
48
49 required manytoone interface->PortInterface:ips = 1:1001 [help_text = "The port interface the IP address belongs to", db_index = True];
50 required string ip = 2 [help_text = "The unique IP address (either IPv4 or IPv6 / netmask)", max_length = 52,db_index = False, unique_with = "interface"];
51 optional string description = 3 [help_text = "A short description of the IP address", max_length = 254,db_index = False];
52}