X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=examples%2Fping_pong_ns%2Frift%2Fmano%2Fexamples%2Fping_pong_nsd.py;h=d84a912e2309ea9ca03d8d8826a6cf152bae4bd5;hb=e5ce4ffee708ce25521d0a95280c25904ab94ddd;hp=5348e00b70cd617d83e12bfc62d0c74ba226840c;hpb=49868d2c71eb364cee9707515be6841a568dad40;p=osm%2FSO.git 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 5348e00b..d84a912e 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 @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# +# # Copyright 2016 RIFT.IO Inc # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -214,12 +214,18 @@ class VirtualNetworkFunction(ManoDescriptor): node = vdu.guest_epa.numa_node_policy.node.add() node.id = 0 node.memory_mb = 512 - node.vcpu = [0, 1] + vcpu = node.vcpu.add() + vcpu.id = 0 + vcpu = node.vcpu.add() + vcpu.id = 1 node = vdu.guest_epa.numa_node_policy.node.add() node.id = 1 node.memory_mb = 512 - node.vcpu = [2, 3] + vcpu = node.vcpu.add() + vcpu.id = 2 + vcpu = node.vcpu.add() + vcpu.id = 3 # specify the vswitch EPA vdu.vswitch_epa.ovs_acceleration = 'DISABLED' @@ -254,7 +260,8 @@ class VirtualNetworkFunction(ManoDescriptor): internal_cp.name = cp_name + "/icp{}".format(i) internal_cp.id = cp_name + "/icp{}".format(i) internal_cp.type_yang = 'VPORT' - internal_vlds[i].internal_connection_point_ref.append(internal_cp.id) + ivld_cp = internal_vlds[i].internal_connection_point_ref.add() + ivld_cp.id_ref = internal_cp.id internal_interface = vdu.internal_interface.add() internal_interface.name = 'fab%d' % i @@ -637,7 +644,7 @@ exit 0 ip_profile.ip_profile_params.ip_version = "ipv4" ip_profile.ip_profile_params.subnet_address = "31.31.31.0/24" ip_profile.ip_profile_params.gateway_address = "31.31.31.210" - + vld_id = 1 for cpgroup in cpgroup_list: vld = nsd.vld.add()