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", |
Scott Baker | e93ad34 | 2019-03-12 15:40:11 -0700 | [diff] [blame] | 10 | default = True]; |
Sapan Bhatia | 8c95eb4 | 2017-05-02 12:17:52 +0200 | [diff] [blame] | 11 | } |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 12 | |
| 13 | message Switch(XOSBase) { |
| 14 | option verbose_name = "Fabric Switch"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 15 | option description = "An individual fabric switch managed by ONOS"; |
vigneshethiraj | 76d8824 | 2019-06-04 18:51:19 +0530 | [diff] [blame] | 16 | option sync_implemented = "True"; |
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", |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 20 | max_length = 19]; |
| 21 | required string name = 2 [ |
| 22 | help_text = "The unique name of the fabric switch", |
Scott Baker | 81a9be2 | 2019-04-09 14:42:26 -0700 | [diff] [blame] | 23 | max_length = 256]; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 24 | required string driver = 3 [ |
| 25 | help_text = "The driver used by the SDN controller", |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 26 | default = "ofdpa3", |
Scott Baker | 81a9be2 | 2019-04-09 14:42:26 -0700 | [diff] [blame] | 27 | max_length = 256]; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 28 | required int32 ipv4NodeSid = 4 [ |
Scott Baker | e93ad34 | 2019-03-12 15:40:11 -0700 | [diff] [blame] | 29 | help_text = "The MPLS label used by the switch [17 - 1048576]"]; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 30 | required string ipv4Loopback = 5 [ |
| 31 | help_text = "Fabric loopback interface", |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 32 | max_length = 17]; |
| 33 | required string routerMac = 6 [ |
| 34 | help_text = "MAC address of the fabric switch used for all interfaces", |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 35 | 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 Baker | e93ad34 | 2019-03-12 15:40:11 -0700 | [diff] [blame] | 38 | default = True]; |
Scott Baker | cabc3de | 2019-04-03 17:23:08 -0700 | [diff] [blame] | 39 | optional string managementAddress = 8 [ |
| 40 | help_text = "Address where this switch can be managed", |
| 41 | feedback_state = True, |
| 42 | max_length = 1024]; |
Daniele Moro | fe69315 | 2019-09-20 16:53:40 -0700 | [diff] [blame] | 43 | optional string pipeconf = 9 [ |
| 44 | help_text = "Pipeline configuration", |
| 45 | max_length = 1024]; |
Himanshu Bhandari | d43b31f | 2020-04-22 15:53:56 +0530 | [diff] [blame] | 46 | optional manytoone fabric->FabricService:switch = 10:1013 [ |
| 47 | help_text = "The Fabric Service which owns this switch", |
Himanshu Bhandari | b0162bd | 2020-06-26 16:26:53 +0000 | [diff] [blame^] | 48 | db_index = True]; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | message SwitchPort(XOSBase) { |
| 52 | option verbose_name = "Fabric Switch Port"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 53 | option description = "A port on a fabric switch"; |
vigneshethiraj | 76d8824 | 2019-06-04 18:51:19 +0530 | [diff] [blame] | 54 | option sync_implemented = "True"; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 55 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 56 | required manytoone switch->Switch:ports = 1:1001 [ |
| 57 | help_text = "The fabric switch the port belongs to", |
| 58 | db_index = True, |
| 59 | tosca_key=True]; |
| 60 | required int32 portId = 2 [ |
| 61 | help_text = "The unique port OpenFlow port ID", |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 62 | tosca_key=True]; |
| 63 | required bool host_learning = 3 [ |
| 64 | help_text = "whether or not to enable autodiscovery", |
Scott Baker | e93ad34 | 2019-03-12 15:40:11 -0700 | [diff] [blame] | 65 | default = True]; |
Scott Baker | 91bf91b | 2019-03-15 16:13:51 -0700 | [diff] [blame] | 66 | optional string admin_state = 4 [ |
| 67 | help_text = "desired administrative state of port", |
| 68 | choices = "(('enabled', 'enabled'), ('disabled', 'disabled'))", |
Scott Baker | 81a9be2 | 2019-04-09 14:42:26 -0700 | [diff] [blame] | 69 | default = "enabled", |
| 70 | max_length = 32]; |
Scott Baker | 91bf91b | 2019-03-15 16:13:51 -0700 | [diff] [blame] | 71 | optional string oper_status = 5 [ |
| 72 | help_text = "operational status of port", |
| 73 | choices = "(('enabled', 'enabled'), ('disabled', 'disabled'))", |
Scott Baker | 81a9be2 | 2019-04-09 14:42:26 -0700 | [diff] [blame] | 74 | feedback_state = True, |
| 75 | max_length = 32]; |
Scott Baker | cabc3de | 2019-04-03 17:23:08 -0700 | [diff] [blame] | 76 | optional string kind = 6 [ |
| 77 | help_text = "type of device attached to port", |
| 78 | choices = "(('access', 'access'), ('internet', 'internet'))", |
| 79 | max_length = 32]; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | message PortInterface(XOSBase) { |
| 83 | option verbose_name = "Fabric Port Interface"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 84 | option description = "An interface on a port on a fabric switch"; |
Luca Prete | b601c38 | 2018-04-30 16:10:43 -0700 | [diff] [blame] | 85 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 86 | required manytoone port->SwitchPort:interfaces = 1:1001 [ |
| 87 | help_text = "The fabric switch port the interface belongs to", |
| 88 | db_index = True]; |
| 89 | required string name = 2 [ |
| 90 | help_text = "The unique name of the fabric switch port", |
Scott Baker | 81a9be2 | 2019-04-09 14:42:26 -0700 | [diff] [blame] | 91 | max_length = 256]; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 92 | optional int32 vlanUntagged = 3 [ |
Scott Baker | e93ad34 | 2019-03-12 15:40:11 -0700 | [diff] [blame] | 93 | help_text = "The optional untagged VLAN ID for the interface"]; |
Matteo Scandolo | af3c994 | 2018-06-27 14:03:12 -0700 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | message NodeToSwitchPort(XOSBase) { |
| 97 | option verbose_name = "Node to switch port"; |
| 98 | option description = "Compute Node connection to a Fabric switch port"; |
vigneshethiraj | 76d8824 | 2019-06-04 18:51:19 +0530 | [diff] [blame] | 99 | option policy_implemented = "True"; |
Matteo Scandolo | af3c994 | 2018-06-27 14:03:12 -0700 | [diff] [blame] | 100 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 101 | required manytoone port->SwitchPort:node_to_switch_ports = 1:1002 [ |
| 102 | help_text = "The fabric switch port the node is connected to", |
| 103 | db_index = True, |
| 104 | tosca_key=True]; |
| 105 | required manytoone node->Node:node_to_switch_ports = 2:1004 [ |
| 106 | help_text = "The ComputeNode this port is connected to", |
| 107 | db_index = True, |
| 108 | tosca_key=True]; |
Luca Prete | 1537787 | 2018-09-11 17:32:55 -0700 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | message FabricIpAddress(XOSBase) { |
| 112 | option verbose_name = "IP address"; |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 113 | 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] | 114 | |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 115 | required manytoone interface->PortInterface:ips = 1:1001 [ |
| 116 | help_text = "The port interface the IP address belongs to", |
| 117 | db_index = True, |
| 118 | tosca_key = True]; |
| 119 | required string ip = 2 [ |
| 120 | help_text = "The unique IP address (either IPv4 or IPv6 / netmask)", |
Scott Baker | a3b3ff2 | 2019-01-23 11:25:18 -0800 | [diff] [blame] | 121 | max_length = 52, |
| 122 | tosca_key = True, |
| 123 | unique_with = "interface"]; |
| 124 | optional string description = 3 [ |
| 125 | help_text = "A short description of the IP address", |
Scott Baker | 81a9be2 | 2019-04-09 14:42:26 -0700 | [diff] [blame] | 126 | max_length = 256]; |
Luca Prete | 1537787 | 2018-09-11 17:32:55 -0700 | [diff] [blame] | 127 | } |