def dispatch_service_vm_real(
            self, context, instance_name, vm_image, vm_flavor,
            hosting_device_drv, credentials_info, connectivity_info,
            ports=None):
        mgmt_port = connectivity_info['mgmt_port']
        nics = [{'port-id': mgmt_port['id']}]
        for port in ports or {}:
            nics.append({'port-id': port['id']})

        try:
            image = n_utils.find_resource(self._nclient.images, vm_image)
            flavor = n_utils.find_resource(self._nclient.flavors, vm_flavor)
        except (nova_exc.CommandError, Exception) as e:
            LOG.error(_LE('Failure finding needed Nova resource: %s'), e)
            return

        try:
            # Assumption for now is that this does not need to be
            # plugin dependent, only hosting device type dependent.
            files = hosting_device_drv.create_config(context, credentials_info,
                                                     connectivity_info)
        except __HOLE__:
            return

        try:
            server = self._nclient.servers.create(
                instance_name, image.id, flavor.id, nics=nics, files=files,
                config_drive=(files != {}))
        # There are several individual Nova client exceptions but they have
        # no other common base than Exception, therefore the long list.
        except (nova_exc.UnsupportedVersion, nova_exc.CommandError,
                nova_exc.AuthorizationFailure, nova_exc.NoUniqueMatch,
                nova_exc.AuthSystemNotFound, nova_exc.NoTokenLookupException,
                nova_exc.EndpointNotFound, nova_exc.AmbiguousEndpoints,
                nova_exc.ConnectionRefused, nova_exc.ClientException,
                Exception) as e:
            LOG.error(_LE('Failed to create service VM instance: %s'), e)
            return
        return {'id': server.id}

    #TODO(remove fake function later)
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/plugins/cisco/device_manager/service_vm_lib.py/ServiceVMManager.dispatch_service_vm_real