From: Rajesh Velandy Date: Thu, 27 Oct 2016 23:59:30 +0000 (+0000) Subject: Bug 94 - SDN and Cloud/Config-Agent account data inconsistent X-Git-Tag: v1.0.1~2^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F78%2F578%2F1;p=osm%2FSO.git Bug 94 - SDN and Cloud/Config-Agent account data inconsistent Signed-off-by: Rajesh Velandy --- diff --git a/common/plugins/yang/rw-cloud.yang b/common/plugins/yang/rw-cloud.yang index e4682ac6..2c7ce6fd 100644 --- a/common/plugins/yang/rw-cloud.yang +++ b/common/plugins/yang/rw-cloud.yang @@ -60,7 +60,7 @@ module rw-cloud leaf sdn-account { description "Configured SDN account associated with this cloud account"; type leafref { - path "/rw-sdn:sdn-account/rw-sdn:name"; + path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name"; } } diff --git a/common/plugins/yang/rw-sdn.tailf.yang b/common/plugins/yang/rw-sdn.tailf.yang index c8a4d46f..3f638836 100644 --- a/common/plugins/yang/rw-sdn.tailf.yang +++ b/common/plugins/yang/rw-sdn.tailf.yang @@ -30,7 +30,7 @@ module rw-sdn-annotation prefix tailf-common; } - tailf-common:annotate "/rw-sdn:sdn-account/rw-sdn:connection-status" { + tailf:annotate "/rw-sdn:sdn/rw-sdn:account/rw-sdn:connection-status" { tailf-common:callpoint rw_callpoint; } diff --git a/common/plugins/yang/rw-sdn.yang b/common/plugins/yang/rw-sdn.yang index 0a5b2285..6475cc52 100644 --- a/common/plugins/yang/rw-sdn.yang +++ b/common/plugins/yang/rw-sdn.yang @@ -25,7 +25,7 @@ module rw-sdn import rw-pb-ext { - prefix "rw-pb-ext"; + prefix "rwpb"; } import rwsdn { @@ -37,16 +37,17 @@ module rw-sdn "Initial revision."; } - list sdn-account { - rw-pb-ext:msg-new SDNAccountConfig; + container sdn { + list account { + rwpb:msg-new SDNAccountConfig; + key "name"; + leaf name { + type string; + } - key "name"; - leaf name { - type string; + uses rwsdn:sdn-provider-auth; + uses rwsdn:connection-status; } - - uses rwsdn:sdn-provider-auth; - uses rwsdn:connection-status; } rpc update-sdn-status { diff --git a/models/plugins/yang/nsr.yang b/models/plugins/yang/nsr.yang index c2b7d06b..da33f9e4 100644 --- a/models/plugins/yang/nsr.yang +++ b/models/plugins/yang/nsr.yang @@ -133,7 +133,7 @@ module nsr list key-pair { key "name"; - description "Used to configure the list of public keys to be injected as part + description "Used to configure the list of public keys to be injected as part of ns instantiation"; leaf name { description "Name of this key pair"; @@ -151,7 +151,7 @@ module nsr input { leaf name { mandatory true; - description "Name of the Network Service"; + description "Name of the Network Service"; type string; } leaf nsd-ref { @@ -265,8 +265,8 @@ module nsr key "placement-group-ref vnfd-id-ref"; leaf vnfd-id-ref { - description - "A reference to a vnfd. This is a + description + "A reference to a vnfd. This is a leafref to path: ../../../../nsd:constituent-vnfd + [nsr:id = current()/../nsd:id-ref] @@ -327,7 +327,7 @@ module nsr "The SDN account to use when requesting resources for this vnffgr"; type leafref { - path "/rwsdn:sdn-account/rwsdn:name"; + path "/rwsdn:sdn/rwsdn:account/rwsdn:name"; } } diff --git a/models/plugins/yang/rw-nsr.yang b/models/plugins/yang/rw-nsr.yang index ae2c92ac..805ed00c 100644 --- a/models/plugins/yang/rw-nsr.yang +++ b/models/plugins/yang/rw-nsr.yang @@ -64,8 +64,8 @@ module rw-nsr key "id"; description "Recent operational events for this network service. - Though the model does not impose any restrictions on the numbe of events, - the max operational events will be limited to the most recent 10"; + Though the model does not impose any restrictions on the numbe of events, + the max operational events will be limited to the most recent 10"; leaf id { description "The id of the instance"; @@ -137,9 +137,9 @@ module rw-nsr by multiple cloud accounts when that becomes available."; type string; } - + list vnf-cloud-account-map { - description + description "Mapping VNF to Cloud Account where VNF will be instantiated"; key "member-vnf-index-ref"; @@ -178,13 +178,13 @@ module rw-nsr } list vl-cloud-account-map { - description + description "Mapping VL to Cloud Account where VL will be instantiated"; key "vld-id-ref"; leaf vld-id-ref { - description + description "A reference to a vld. leafref path ../../nsd/vld/id"; type string; @@ -218,7 +218,7 @@ module rw-nsr augment /nsr:start-network-service/nsr:input{ uses rw-ns-instance-config; - } + } augment /nsr:ns-instance-opdata/nsr:nsr { uses manotypes:action-param; @@ -229,7 +229,7 @@ module rw-nsr "The SDN account associted with the cloud account using which an NS was instantiated."; type leafref { - path "/rw-sdn:sdn-account/rw-sdn:name"; + path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name"; } } @@ -438,7 +438,7 @@ module rw-nsr notification nsm-notification { description "Notification for NSM Events. - The timestamp of this event is automatically expressed + The timestamp of this event is automatically expressed in human readble format - 1970-01-01T00:00:00Z"; leaf event { diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py index 0ebe9df3..cf836120 100755 --- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py +++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py @@ -190,7 +190,7 @@ class VnffgMgr(object): vnfr.mgmt_address = cp_ref.connection_point_params.mgmt_address vnfr.mgmt_port = 5000 vnfr_list.append(vnfr) - + vdu = vnfr.vdu_list.add() vdu.name = cp_ref.connection_point_params.name vdu.port_id = cp_ref.connection_point_params.port_id @@ -220,9 +220,9 @@ class VnffgMgr(object): if(len(classifier_list) == 2): meta[vnffgr.classifier[0].id] = '0x' + ''.join(str("%0.2X"%int(i)) for i in vnffgr.classifier[1].ip_address.split('.')) meta[vnffgr.classifier[1].id] = '0x' + ''.join(str("%0.2X"%int(i)) for i in vnffgr.classifier[0].ip_address.split('.')) - + self._log.debug("VNFFG Meta VNFFG chain is {}".format(meta)) - + for classifier in classifier_list: vnffgr_cl = [_classifier for _classifier in vnffgr.classifier if classifier.id == _classifier.id] if len(vnffgr_cl) > 0: @@ -236,8 +236,8 @@ class VnffgMgr(object): vnffgcl.port_id = vnffgr_cl[0].port_id vnffgcl.vm_id = vnffgr_cl[0].vm_id # Get the symmetric classifier endpoint ip and set it in nsh ctx1 - - vnffgcl.vnffg_metadata.ctx1 = meta.get(vnffgr_cl[0].id,'0') + + vnffgcl.vnffg_metadata.ctx1 = meta.get(vnffgr_cl[0].id,'0') vnffgcl.vnffg_metadata.ctx2 = '0' vnffgcl.vnffg_metadata.ctx3 = '0' vnffgcl.vnffg_metadata.ctx4 = '0' @@ -323,7 +323,7 @@ class VnffgMgr(object): del self._vnffgr_list[vnffgr_id] class SDNAccountDtsHandler(object): - XPATH = "C,/rw-sdn:sdn-account" + XPATH = "C,/rw-sdn:sdn/rw-sdn:account" def __init__(self, dts, log, parent): self._dts = dts diff --git a/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py b/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py index 1f888249..0ced574b 100755 --- a/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py +++ b/rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py @@ -82,7 +82,7 @@ class SDNAccountDtsOperdataHandler(object): def _register_show_status(self): def get_xpath(sdn_name=None): - return "D,/rw-sdn:sdn-account{}/rw-sdn:connection-status".format( + return "D,/rw-sdn:sdn/rw-sdn:account{}/rw-sdn:connection-status".format( "[name='%s']" % sdn_name if sdn_name is not None else '' ) @@ -152,7 +152,7 @@ class SDNAccountDtsOperdataHandler(object): yield from self._register_validate_rpc() class SDNAccountDtsHandler(object): - XPATH = "C,/rw-sdn:sdn-account" + XPATH = "C,/rw-sdn:sdn/rw-sdn:account" def __init__(self, dts, log, parent): self._dts = dts