New feature: Code changes for project support
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
diff --git a/examples/ping_pong_ns/config_desc.py b/examples/ping_pong_ns/config_desc.py
index fcd1400..50204f9 100755
--- a/examples/ping_pong_ns/config_desc.py
+++ b/examples/ping_pong_ns/config_desc.py
@@ -39,7 +39,7 @@
def configure_vld(proxy, vld_xml_hdl):
vld_xml = vld_xml_hdl.read()
logger.debug("Attempting to deserialize XML into VLD protobuf: %s", vld_xml)
- vld = VldYang.YangData_Vld_VldCatalog_Vld()
+ vld = VldYang.YangData_RwProject_Project_VldCatalog_Vld()
vld.from_xml_v2(model, vld_xml)
logger.debug("Sending VLD to netconf: %s", vld)
@@ -49,7 +49,7 @@
def configure_vnfd(proxy, vnfd_xml_hdl):
vnfd_xml = vnfd_xml_hdl.read()
logger.debug("Attempting to deserialize XML into VNFD protobuf: %s", vnfd_xml)
- vnfd = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd()
+ vnfd = VnfdYang.YangData_RwProject_Project_VnfdCatalog_Vnfd()
vnfd.from_xml_v2(model, vnfd_xml)
logger.debug("Sending VNFD to netconf: %s", vnfd)
@@ -59,7 +59,7 @@
def configure_nsd(proxy, nsd_xml_hdl):
nsd_xml = nsd_xml_hdl.read()
logger.debug("Attempting to deserialize XML into NSD protobuf: %s", nsd_xml)
- nsd = NsdYang.YangData_Nsd_NsdCatalog_Nsd()
+ nsd = NsdYang.YangData_RwProject_Project_NsdCatalog_Nsd()
nsd.from_xml_v2(model, nsd_xml)
logger.debug("Sending NSD to netconf: %s", nsd)
diff --git a/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py b/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py
index b18deb7..e852b21 100755
--- a/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py
+++ b/examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py
@@ -112,10 +112,10 @@
if output_format == 'json':
with open('%s/%s.json' % (outdir, self.name), "w") as fh:
fh.write(simplejson.dumps(desc, indent=4))
- elif output_format.strip() == 'yaml':
+ elif output_format == 'yaml':
with open('%s/%s.yaml' % (outdir, self.name), "w") as fh:
fh.write(yaml.dump(desc, default_flow_style=False))
- elif output_format.strip() == 'xml':
+ elif output_format == 'xml':
# Converting from dict to xml does not provide the
# required output. So using the PBCM to_xml and then
# printing only from the catalog tag.
@@ -283,7 +283,7 @@
internal_cp.name = cp_name + "/icp{}".format(i)
internal_cp.id = cp_name + "/icp{}".format(i)
internal_cp.type_yang = 'VPORT'
- ivld_cp = internal_vlds[i].internal_connection_point_ref.add()
+ ivld_cp = internal_vlds[i].internal_connection_point.add()
ivld_cp.id_ref = internal_cp.id
internal_interface = vdu.internal_interface.add()
@@ -761,7 +761,7 @@
group_desc.min_instance_count = scale_group.min_count
for vnfd, count in scale_group.vnfd_count_map.items():
member = group_desc.vnfd_member.add()
- member.member_vnf_index_ref = vnfd_index_map[vnfd]
+ member.member_vnf_index_ref = str(vnfd_index_map[vnfd])
member.count = count
for trigger in scale_group.config_action: