SEBA-401 Expand descriptions of VOLT Service fields
Change-Id: Ieec6751eccb8d570754e119db793d2d53cafff8d
diff --git a/VERSION b/VERSION
index 291d0de..2f1a5aa 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.16
+2.1.17
diff --git a/xos/synchronizer/models/volt.xproto b/xos/synchronizer/models/volt.xproto
index 75bf9af..a1c5837 100644
--- a/xos/synchronizer/models/volt.xproto
+++ b/xos/synchronizer/models/volt.xproto
@@ -5,6 +5,7 @@
message VOLTService (Service){
option verbose_name = "vOLT Service";
option kind = "vOLT";
+ option description = "OLT Access Service";
required string voltha_url = 1 [help_text = "The Voltha API address. By default voltha.voltha.svc.cluster.local", default = "voltha.voltha.svc.cluster.local", max_length = 254, db_index = False];
required int32 voltha_port = 2 [help_text = "The Voltha API port. By default 8882", default=8882, db_index = False];
@@ -20,22 +21,22 @@
option verbose_name = "OLT Device";
option description="Represents a physical OLT device";
- required manytoone volt_service->VOLTService:volt_devices = 1:1001 [db_index = True];
- optional string name = 2 [help_text = "name of device", max_length = 254, db_index = False, unique = True];
- required string device_type = 3 [help_text = "Device Type", default = "openolt", max_length = 254, db_index = False];
- optional string host = 4 [help_text = "Device IP", max_length = 254, db_index = False];
- optional int32 port = 5 [help_text = "Device port", db_index = False, unique_with = "host"];
- optional string mac_address = 6 [help_text = "Device mac address", db_index = False];
+ required manytoone volt_service->VOLTService:volt_devices = 1:1001 [help_text = "VOLTService that owns this OLT", db_index = True];
+ optional string name = 2 [help_text = "Human-readable name of device", max_length = 254, db_index = False, unique = True];
+ required string device_type = 3 [help_text = "Phyiscal Device Type", default = "openolt", max_length = 254, db_index = False];
+ optional string host = 4 [help_text = "IP Address of physical OLT Device", max_length = 254, db_index = False];
+ optional int32 port = 5 [help_text = "Port Number of physical OLT Device", db_index = False, unique_with = "host"];
+ optional string mac_address = 6 [help_text = "Mac address of physical OLT Device", db_index = False];
optional string serial_number = 9 [help_text = "Serial Number", db_index = False];
- optional string device_id = 10 [help_text = "Device ID", db_index = False, feedback_state = True];
- optional string admin_state = 11 [help_text = "admin_state", db_index = False, feedback_state = True];
- optional string oper_status = 12 [help_text = "oper_status", db_index = False, feedback_state = True];
- optional string of_id = 13 [help_text = "openflow id", db_index = False, feedback_state = True];
- optional string dp_id = 14 [help_text = "datapath id", db_index = False];
+ optional string device_id = 10 [help_text = "Voltha Device ID", db_index = False, feedback_state = True];
+ optional string admin_state = 11 [help_text = "admin state, whether OLT should be enabled", db_index = False, feedback_state = True];
+ optional string oper_status = 12 [help_text = "operational status, whether OLT is active", db_index = False, feedback_state = True];
+ optional string of_id = 13 [help_text = "Logical device openflow id", db_index = False, feedback_state = True];
+ optional string dp_id = 14 [help_text = "Logical device datapath id", db_index = False];
- required string uplink = 15 [help_text = "uplink port", db_index = False];
- required string driver = 16 [default="voltha", help_text = "Olt driver", db_index = False];
+ required string uplink = 15 [help_text = "uplink port, exposed via sadis", db_index = False];
+ required string driver = 16 [help_text = "DEPRECATED", default="voltha", db_index = False]; // Used to be sent to ONOS, now unused.
optional string switch_datapath_id = 17 [help_text = "Fabric switch to which the OLT is connected", db_index = False];
optional string switch_port = 18 [help_text = "Fabric port to which the OLT is connected", db_index = False];
@@ -47,57 +48,59 @@
message PortBase (XOSBase){
option gui_hidden = True;
- required string name = 1 [db_index = True];
- required int32 port_no = 3 [help_text = "Port ID", db_index = False];
+ required string name = 1 [help_text = "Human-readable name of port", db_index = True];
+ required int32 port_no = 3 [help_text = "Port Number", db_index = False];
- optional string admin_state = 4 [help_text = "admin_state", db_index = False, feedback_state = True];
- optional string oper_status = 5 [help_text = "oper_status", db_index = False, feedback_state = True];
+ optional string admin_state = 4 [help_text = "admin state, whether port should be enabled", db_index = False, feedback_state = True];
+ optional string oper_status = 5 [help_text = "operational status, whether port is active", db_index = False, feedback_state = True];
}
message PONPort (PortBase){
option verbose_name = "PON Port";
option description="PON Port";
- required manytoone olt_device->OLTDevice:pon_ports = 1:1001 [db_index = True];
+ required manytoone olt_device->OLTDevice:pon_ports = 1:1001 [help_text = "OLTDevice that owns this PONPort", db_index = True];
}
message NNIPort (PortBase) {
option verbose_name = "NNI Port";
- required manytoone olt_device->OLTDevice:nni_ports = 1:1002 [db_index = True];
+ required manytoone olt_device->OLTDevice:nni_ports = 1:1002 [help_text = "OLTDevice that owns this NNIPort", db_index = True];
}
message ONUDevice (XOSBase){
option verbose_name = "ONU Device";
option description = "Represents a physical ONU device";
- required manytoone pon_port->PONPort:onu_devices = 1:1001 [db_index = True];
- required string serial_number = 2 [max_length = 254, db_index = False, tosca_key=True, unique = True];
- required string vendor = 3 [max_length = 254, db_index = False];
+ required manytoone pon_port->PONPort:onu_devices = 1:1001 [help_text = "PONPort that connects this ONUDevice to an OLTDevice", db_index = True];
+ required string serial_number = 2 [help_text = "Serial number of ONU Device", max_length = 254, db_index = False, tosca_key=True, unique = True];
+ required string vendor = 3 [help_text = "Vendor of ONU Device", max_length = 254, db_index = False];
required string device_type = 4 [help_text = "Device Type", default = "asfvolt16_olt", max_length = 254, db_index = False];
- optional string device_id = 5 [max_length = 254, db_index = False, feedback_state = True];
- optional string admin_state = 6 [choices = "(('DISABLED', 'DISABLED'), ('ENABLED', 'ENABLED'))", default="ENABLED", help_text = "admin_state", db_index = False];
+ optional string device_id = 5 [help_text = "Voltha Device ID", max_length = 254, db_index = False, feedback_state = True];
+ optional string admin_state = 6 [help_text = "admin state, whether port should be enabled", choices = "(('DISABLED', 'DISABLED'), ('ENABLED', 'ENABLED'))", default="ENABLED", db_index = False];
optional string oper_status = 7 [help_text = "oper_status", db_index = False, feedback_state = True];
- optional string connect_status = 8 [help_text = "connect_status", db_index = False, feedback_state = True];
+ optional string connect_status = 8 [help_text = "operational status, whether port is active", db_index = False, feedback_state = True];
optional string reason = 9 [help_text = "ONU device configuration state machine status message", db_index = False, feedback_state = True];
}
message PONONUPort (PortBase) {
option verbose_name = "ANI Port";
- option description="ANI Port";
- required manytoone onu_device->ONUDevice:pononu_ports = 1:1001 [db_index = True];
+ option description="Access Node Interface Port";
+ required manytoone onu_device->ONUDevice:pononu_ports = 1:1001 [help_text = "ONUDevice that owns this PONONUPort", db_index = True];
}
message UNIPort (PortBase) {
option verbose_name = "UNI Port";
- required manytoone onu_device->ONUDevice:uni_ports = 1:1002 [db_index = True];
+ option description = "User Network Interface Port";
+ required manytoone onu_device->ONUDevice:uni_ports = 1:1002 [help_text = "ONUDevice that owns this UNIPort", db_index = True];
}
message VOLTServiceInstance (ServiceInstance){
option kind = "vOLT";
option owner_class_name = "VOLTService";
option verbose_name = "vOLT Service Instance";
+ option description = "Represents subscriber tenancy in the VOLT Service";
- optional string description = 1 [max_length = 254, db_index = False];
- optional manytoone onu_device->ONUDevice:volt_service_instances = 2:1003 [db_index = True];
+ optional string description = 1 [help_text = "Human-readable description", max_length = 254, db_index = False];
+ optional manytoone onu_device->ONUDevice:volt_service_instances = 2:1003 [help_text = "ONUDevice that belongs to this Subscriber chain", db_index = True];
}
diff --git a/xos/synchronizer/steps/test_sync_olt_device.py b/xos/synchronizer/steps/test_sync_olt_device.py
index 38da1a1..8d01579 100644
--- a/xos/synchronizer/steps/test_sync_olt_device.py
+++ b/xos/synchronizer/steps/test_sync_olt_device.py
@@ -42,17 +42,6 @@
raise Exception("Unable to find service=%s xproto=%s" % (service_name, xproto_name))
# END generate model from xproto
-def match_onos_req(req):
- request = req.json()['devices']
- if not request['of:0000000ce2314000']:
- return False
- else:
- if not request['of:0000000ce2314000']['basic']['driver'] == 'voltha':
- return False
- if not request['of:0000000ce2314000']['accessDevice']['vlan'] == 1 or not request['of:0000000ce2314000']['accessDevice']['uplink'] == "129":
- return False
- return True
-
def match_json(desired, req):
if desired!=req.json():
raise Exception("Got request %s, but body is not matching" % req.url)