Merge remote-tracking branch 'origin/master'
authorstevenvanrossem <steven.vanrossem@intec.ugent.be>
Wed, 3 May 2017 10:54:23 +0000 (12:54 +0200)
committerstevenvanrossem <steven.vanrossem@intec.ugent.be>
Wed, 3 May 2017 10:54:23 +0000 (12:54 +0200)
# Conflicts:
# src/emuvim/api/sonata/dummygatekeeper.py

1  2 
src/emuvim/api/sonata/dummygatekeeper.py

@@@ -149,7 -149,7 +149,6 @@@ class Service(object)
          self.local_docker_files = dict()
          self.remote_docker_image_urls = dict()
          self.instances = dict()
--        #self.vnf_name2docker_name = dict()
          # dict to find the vnf_name for any vnf id
          self.vnf_id2vnf_name = dict()
  
          :return:
          """
          dn = vnf_id
--        #if vnf_id in self.vnf_name2docker_name:
--        #    dn = self.vnf_name2docker_name[name]
          for vnfi in self.instances[instance_uuid]["vnf_instances"]:
              if vnfi.name == dn:
                  return vnfi
                  src_id = src_sap_id
                  # set intf name to None so the chaining function will choose the first one
                  src_if_name = None
--                #src_name = self.vnf_id2vnf_name[src_id]
--                #dst_name = self.vnf_id2vnf_name[dst_id]
                  dst_vnfi = self._get_vnf_instance(instance_uuid, dst_id)
                  if dst_vnfi is not None:
                      # choose first ip address in sap subnet
                  dst_id = dst_sap_id
                  # set intf name to None so the chaining function will choose the first one
                  dst_if_name = None
--                #src_name = self.vnf_id2vnf_name[src_id]
--                #dst_name = self.vnf_id2vnf_name[dst_id]
                  src_vnfi = self._get_vnf_instance(instance_uuid, src_id)
                  if src_vnfi is not None:
                      sap_net = self.saps[dst_sap_id]['net']
                      src_id = src_sap_id
                  if dst_sap_id in self.saps_int:
                      dst_id = dst_sap_id
--                #src_name = self.vnf_id2vnf_name[src_id]
--                #dst_name = self.vnf_id2vnf_name[dst_id]
                  # 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_id)
                  dst_vnfi = self._get_vnf_instance(instance_uuid, dst_id)
                      src_docker_name = vnf_sap_id
                      vnf_id = vnf_sap_id
  
--                #vnf_name = self.vnf_id2vnf_name[vnf_id]
                  LOG.debug(
                      "Setting up E-LAN interface. %s(%s:%s) -> %s" % (
                          vnf_id, intf_name, ip_address))
@@@ -902,13 -886,13 +876,11 @@@ class RoundRobinDcPlacementWithSAPs(obj
  
              # check if there is a SAP in the link
              if src_sap_id in saps:
--                #dst_vnf_name = vnf_id2vnf_name[dst_id]
                  # get dc where connected vnf is mapped to
                  dc = vnfds[dst_id]['dc']
                  saps[src_sap_id]['dc'] = dc
  
              if dst_sap_id in saps:
--                #src_vnf_name = vnf_id2vnf_name[src_id]
                  # get dc where connected vnf is mapped to
                  dc = vnfds[src_id]['dc']
                  saps[dst_sap_id]['dc'] = dc