blob: d07fdbb87fe03c1542ad9c8e8bd56a487399ead7 [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";
Scott Bakera3b3ff22019-01-23 11:25:18 -08006 option description = "Service that manages and configures fabric switches in ONOS";
Matteo Scandolo9cc4f6f2017-10-02 18:03:58 -07007
Scott Bakera3b3ff22019-01-23 11:25:18 -08008 optional bool autoconfig = 1 [
9 help_text="Automatically apply addresses from AddressManager service to Fabric",
Scott Bakere93ad342019-03-12 15:40:11 -070010 default = True];
Sapan Bhatia8c95eb42017-05-02 12:17:52 +020011}
Luca Preteb601c382018-04-30 16:10:43 -070012
13message Switch(XOSBase) {
14 option verbose_name = "Fabric Switch";
Scott Bakera3b3ff22019-01-23 11:25:18 -080015 option description = "An individual fabric switch managed by ONOS";
Luca Preteb601c382018-04-30 16:10:43 -070016
Scott Bakera3b3ff22019-01-23 11:25:18 -080017 required string ofId = 1 [
18 help_text = "The unique OpenFlow ID of the fabric switch",
Scott Bakera3b3ff22019-01-23 11:25:18 -080019 max_length = 19];
20 required string name = 2 [
21 help_text = "The unique name of the fabric switch",
Scott Bakera3b3ff22019-01-23 11:25:18 -080022 max_length = 254];
23 required string driver = 3 [
24 help_text = "The driver used by the SDN controller",
Scott Bakera3b3ff22019-01-23 11:25:18 -080025 default = "ofdpa3",
26 max_length = 254];
27 required int32 ipv4NodeSid = 4 [
Scott Bakere93ad342019-03-12 15:40:11 -070028 help_text = "The MPLS label used by the switch [17 - 1048576]"];
Scott Bakera3b3ff22019-01-23 11:25:18 -080029 required string ipv4Loopback = 5 [
30 help_text = "Fabric loopback interface",
Scott Bakera3b3ff22019-01-23 11:25:18 -080031 max_length = 17];
32 required string routerMac = 6 [
33 help_text = "MAC address of the fabric switch used for all interfaces",
Scott Bakera3b3ff22019-01-23 11:25:18 -080034 max_length = 17];
35 required bool isEdgeRouter = 7 [
36 help_text="True if the fabric switch is a leaf, False if it is a spine",
Scott Bakere93ad342019-03-12 15:40:11 -070037 default = True];
Luca Preteb601c382018-04-30 16:10:43 -070038}
39
40message SwitchPort(XOSBase) {
41 option verbose_name = "Fabric Switch Port";
Scott Bakera3b3ff22019-01-23 11:25:18 -080042 option description = "A port on a fabric switch";
Luca Preteb601c382018-04-30 16:10:43 -070043
Scott Bakera3b3ff22019-01-23 11:25:18 -080044 required manytoone switch->Switch:ports = 1:1001 [
45 help_text = "The fabric switch the port belongs to",
46 db_index = True,
47 tosca_key=True];
48 required int32 portId = 2 [
49 help_text = "The unique port OpenFlow port ID",
Scott Bakera3b3ff22019-01-23 11:25:18 -080050 tosca_key=True];
51 required bool host_learning = 3 [
52 help_text = "whether or not to enable autodiscovery",
Scott Bakere93ad342019-03-12 15:40:11 -070053 default = True];
Luca Preteb601c382018-04-30 16:10:43 -070054}
55
56message PortInterface(XOSBase) {
57 option verbose_name = "Fabric Port Interface";
Scott Bakera3b3ff22019-01-23 11:25:18 -080058 option description = "An interface on a port on a fabric switch";
Luca Preteb601c382018-04-30 16:10:43 -070059
Scott Bakera3b3ff22019-01-23 11:25:18 -080060 required manytoone port->SwitchPort:interfaces = 1:1001 [
61 help_text = "The fabric switch port the interface belongs to",
62 db_index = True];
63 required string name = 2 [
64 help_text = "The unique name of the fabric switch port",
Scott Bakera3b3ff22019-01-23 11:25:18 -080065 max_length = 254];
66 optional int32 vlanUntagged = 3 [
Scott Bakere93ad342019-03-12 15:40:11 -070067 help_text = "The optional untagged VLAN ID for the interface"];
Matteo Scandoloaf3c9942018-06-27 14:03:12 -070068}
69
70message NodeToSwitchPort(XOSBase) {
71 option verbose_name = "Node to switch port";
72 option description = "Compute Node connection to a Fabric switch port";
73
Scott Bakera3b3ff22019-01-23 11:25:18 -080074 required manytoone port->SwitchPort:node_to_switch_ports = 1:1002 [
75 help_text = "The fabric switch port the node is connected to",
76 db_index = True,
77 tosca_key=True];
78 required manytoone node->Node:node_to_switch_ports = 2:1004 [
79 help_text = "The ComputeNode this port is connected to",
80 db_index = True,
81 tosca_key=True];
Luca Prete15377872018-09-11 17:32:55 -070082}
83
84message FabricIpAddress(XOSBase) {
85 option verbose_name = "IP address";
Scott Bakera3b3ff22019-01-23 11:25:18 -080086 option description = "An IP address associated with a port on a fabric switch";
Luca Prete15377872018-09-11 17:32:55 -070087
Scott Bakera3b3ff22019-01-23 11:25:18 -080088 required manytoone interface->PortInterface:ips = 1:1001 [
89 help_text = "The port interface the IP address belongs to",
90 db_index = True,
91 tosca_key = True];
92 required string ip = 2 [
93 help_text = "The unique IP address (either IPv4 or IPv6 / netmask)",
Scott Bakera3b3ff22019-01-23 11:25:18 -080094 max_length = 52,
95 tosca_key = True,
96 unique_with = "interface"];
97 optional string description = 3 [
98 help_text = "A short description of the IP address",
Scott Bakera3b3ff22019-01-23 11:25:18 -080099 max_length = 254];
Luca Prete15377872018-09-11 17:32:55 -0700100}