blob: 53ca3764368f7250c3e4f033d22a6a5f17984f2f [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";
vigneshethiraj76d88242019-06-04 18:51:19 +053016 option sync_implemented = "True";
Luca Preteb601c382018-04-30 16:10:43 -070017
Scott Bakera3b3ff22019-01-23 11:25:18 -080018 required string ofId = 1 [
19 help_text = "The unique OpenFlow ID of the fabric switch",
Scott Bakera3b3ff22019-01-23 11:25:18 -080020 max_length = 19];
21 required string name = 2 [
22 help_text = "The unique name of the fabric switch",
Scott Baker81a9be22019-04-09 14:42:26 -070023 max_length = 256];
Scott Bakera3b3ff22019-01-23 11:25:18 -080024 required string driver = 3 [
25 help_text = "The driver used by the SDN controller",
Scott Bakera3b3ff22019-01-23 11:25:18 -080026 default = "ofdpa3",
Scott Baker81a9be22019-04-09 14:42:26 -070027 max_length = 256];
Scott Bakera3b3ff22019-01-23 11:25:18 -080028 required int32 ipv4NodeSid = 4 [
Scott Bakere93ad342019-03-12 15:40:11 -070029 help_text = "The MPLS label used by the switch [17 - 1048576]"];
Scott Bakera3b3ff22019-01-23 11:25:18 -080030 required string ipv4Loopback = 5 [
31 help_text = "Fabric loopback interface",
Scott Bakera3b3ff22019-01-23 11:25:18 -080032 max_length = 17];
33 required string routerMac = 6 [
34 help_text = "MAC address of the fabric switch used for all interfaces",
Scott Bakera3b3ff22019-01-23 11:25:18 -080035 max_length = 17];
36 required bool isEdgeRouter = 7 [
37 help_text="True if the fabric switch is a leaf, False if it is a spine",
Scott Bakere93ad342019-03-12 15:40:11 -070038 default = True];
Scott Bakercabc3de2019-04-03 17:23:08 -070039 optional string managementAddress = 8 [
40 help_text = "Address where this switch can be managed",
41 feedback_state = True,
42 max_length = 1024];
Daniele Morofe693152019-09-20 16:53:40 -070043 optional string pipeconf = 9 [
44 help_text = "Pipeline configuration",
45 max_length = 1024];
Himanshu Bhandarid43b31f2020-04-22 15:53:56 +053046 optional manytoone fabric->FabricService:switch = 10:1013 [
47 help_text = "The Fabric Service which owns this switch",
48 db_index = True,
49 tosca_key=True];
Luca Preteb601c382018-04-30 16:10:43 -070050}
51
52message SwitchPort(XOSBase) {
53 option verbose_name = "Fabric Switch Port";
Scott Bakera3b3ff22019-01-23 11:25:18 -080054 option description = "A port on a fabric switch";
vigneshethiraj76d88242019-06-04 18:51:19 +053055 option sync_implemented = "True";
Luca Preteb601c382018-04-30 16:10:43 -070056
Scott Bakera3b3ff22019-01-23 11:25:18 -080057 required manytoone switch->Switch:ports = 1:1001 [
58 help_text = "The fabric switch the port belongs to",
59 db_index = True,
60 tosca_key=True];
61 required int32 portId = 2 [
62 help_text = "The unique port OpenFlow port ID",
Scott Bakera3b3ff22019-01-23 11:25:18 -080063 tosca_key=True];
64 required bool host_learning = 3 [
65 help_text = "whether or not to enable autodiscovery",
Scott Bakere93ad342019-03-12 15:40:11 -070066 default = True];
Scott Baker91bf91b2019-03-15 16:13:51 -070067 optional string admin_state = 4 [
68 help_text = "desired administrative state of port",
69 choices = "(('enabled', 'enabled'), ('disabled', 'disabled'))",
Scott Baker81a9be22019-04-09 14:42:26 -070070 default = "enabled",
71 max_length = 32];
Scott Baker91bf91b2019-03-15 16:13:51 -070072 optional string oper_status = 5 [
73 help_text = "operational status of port",
74 choices = "(('enabled', 'enabled'), ('disabled', 'disabled'))",
Scott Baker81a9be22019-04-09 14:42:26 -070075 feedback_state = True,
76 max_length = 32];
Scott Bakercabc3de2019-04-03 17:23:08 -070077 optional string kind = 6 [
78 help_text = "type of device attached to port",
79 choices = "(('access', 'access'), ('internet', 'internet'))",
80 max_length = 32];
Luca Preteb601c382018-04-30 16:10:43 -070081}
82
83message PortInterface(XOSBase) {
84 option verbose_name = "Fabric Port Interface";
Scott Bakera3b3ff22019-01-23 11:25:18 -080085 option description = "An interface on a port on a fabric switch";
Luca Preteb601c382018-04-30 16:10:43 -070086
Scott Bakera3b3ff22019-01-23 11:25:18 -080087 required manytoone port->SwitchPort:interfaces = 1:1001 [
88 help_text = "The fabric switch port the interface belongs to",
89 db_index = True];
90 required string name = 2 [
91 help_text = "The unique name of the fabric switch port",
Scott Baker81a9be22019-04-09 14:42:26 -070092 max_length = 256];
Scott Bakera3b3ff22019-01-23 11:25:18 -080093 optional int32 vlanUntagged = 3 [
Scott Bakere93ad342019-03-12 15:40:11 -070094 help_text = "The optional untagged VLAN ID for the interface"];
Matteo Scandoloaf3c9942018-06-27 14:03:12 -070095}
96
97message NodeToSwitchPort(XOSBase) {
98 option verbose_name = "Node to switch port";
99 option description = "Compute Node connection to a Fabric switch port";
vigneshethiraj76d88242019-06-04 18:51:19 +0530100 option policy_implemented = "True";
Matteo Scandoloaf3c9942018-06-27 14:03:12 -0700101
Scott Bakera3b3ff22019-01-23 11:25:18 -0800102 required manytoone port->SwitchPort:node_to_switch_ports = 1:1002 [
103 help_text = "The fabric switch port the node is connected to",
104 db_index = True,
105 tosca_key=True];
106 required manytoone node->Node:node_to_switch_ports = 2:1004 [
107 help_text = "The ComputeNode this port is connected to",
108 db_index = True,
109 tosca_key=True];
Luca Prete15377872018-09-11 17:32:55 -0700110}
111
112message FabricIpAddress(XOSBase) {
113 option verbose_name = "IP address";
Scott Bakera3b3ff22019-01-23 11:25:18 -0800114 option description = "An IP address associated with a port on a fabric switch";
Luca Prete15377872018-09-11 17:32:55 -0700115
Scott Bakera3b3ff22019-01-23 11:25:18 -0800116 required manytoone interface->PortInterface:ips = 1:1001 [
117 help_text = "The port interface the IP address belongs to",
118 db_index = True,
119 tosca_key = True];
120 required string ip = 2 [
121 help_text = "The unique IP address (either IPv4 or IPv6 / netmask)",
Scott Bakera3b3ff22019-01-23 11:25:18 -0800122 max_length = 52,
123 tosca_key = True,
124 unique_with = "interface"];
125 optional string description = 3 [
126 help_text = "A short description of the IP address",
Scott Baker81a9be22019-04-09 14:42:26 -0700127 max_length = 256];
Luca Prete15377872018-09-11 17:32:55 -0700128}