X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Fsonata%2Fdummygatekeeper.py;h=916e168769a5a65f152c34bd6f20db8af5affc98;hb=aa6d3a7011e65bcf65670f6d4962a28af66d2099;hp=bea0a010be8696fb70549e1d7332f86f9d6413c9;hpb=ca88566fc038a5a59c8ca3d3af82aab8db7d253a;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/sonata/dummygatekeeper.py b/src/emuvim/api/sonata/dummygatekeeper.py index bea0a01..916e168 100755 --- a/src/emuvim/api/sonata/dummygatekeeper.py +++ b/src/emuvim/api/sonata/dummygatekeeper.py @@ -166,7 +166,9 @@ class Service(object): fwd_links = self.nsd["forwarding_graphs"][0]["constituent_virtual_links"] eline_fwd_links = [l for l in vlinks if (l["id"] in fwd_links) and (l["connectivity_type"] == "E-Line")] - cookie = 1 # not clear why this is needed - to check with Steven + # cookie is used as identifier for the flowrules installed by the dummygatekeeper + # eg. different services get a unique cookie for their flowrules + cookie = 1 for link in eline_fwd_links: src_id, src_if_name = link["connection_points_reference"][0].split(":") dst_id, dst_if_name = link["connection_points_reference"][1].split(":") @@ -187,7 +189,6 @@ class Service(object): src_docker_name, dst_docker_name, vnf_src_interface=src_if_name, vnf_dst_interface=dst_if_name, bidirectional=True, cmd="add-flow", cookie=cookie) - cookie += 1 # re-configure the VNFs IP assignment and ensure that a new subnet is used for each E-Link src_vnfi = self._get_vnf_instance(instance_uuid, src_name) @@ -225,9 +226,7 @@ class Service(object): # 3. do the dc.startCompute(name="foobar") call to run the container # TODO consider flavors, and other annotations intfs = vnfd.get("connection_points") - # mgmt connection points can be skipped, this is considered to be the connection the default docker0 bridge - intfs = [intf for intf in intfs if 'mgmt' not in intf['id']] - + # use the vnf_id in the nsd as docker name # so deployed containers can be easily mapped back to the nsd vnf_name2id = defaultdict(lambda: "NotExistingNode",