Пример #1
0
 def create_network(self, tenant_id, net_name, **kwargs):
     """
     Creates a new Virtual Network, and assigns it a symbolic name.
     :returns: a sequence of mappings with the following signature:
                 {'net-id': uuid that uniquely identifies the
                                  particular quantum network,
                  'net-name': a human-readable name associated
                                 with network referenced by net-id
                }
     :raises:
     """
     kwargs["controller"] = self.controller
     return nvplib.create_network(tenant_id, net_name, **kwargs)
Пример #2
0
 def create_network(self, tenant_id, net_name, **kwargs):
     """
     Creates a new Virtual Network, and assigns it a symbolic name.
     :returns: a sequence of mappings with the following signature:
                 {'net-id': uuid that uniquely identifies the
                                  particular quantum network,
                  'net-name': a human-readable name associated
                                 with network referenced by net-id
                }
     :raises:
     """
     kwargs["controller"] = self.controller
     return nvplib.create_network(tenant_id, net_name, **kwargs)
Пример #3
0
    def create_network(self, context, network):
        """
        :returns: a sequence of mappings with the following signature:
                    {'id': UUID representing the network.
                     'name': Human-readable name identifying the network.
                     'tenant_id': Owner of network. only admin user
                                  can specify a tenant_id other than its own.
                     'admin_state_up': Sets admin state of network. if down,
                                       network does not forward packets.
                     'status': Indicates whether network is currently
                               operational (limit values to "ACTIVE", "DOWN",
                               "BUILD", and "ERROR"?
                     'subnets': Subnets associated with this network. Plan
                                to allow fully specified subnets as part of
                                network create.
                   }
        :raises: exception.NoImplementedError
        """
        # FIXME(arosen) implement admin_state_up = False in NVP
        if network['network']['admin_state_up'] is False:
            LOG.warning("Network with admin_state_up=False are not yet "
                        "supported by this plugin. Ignoring setting for "
                        "network %s",
                        network['network'].get('name', '<unknown>'))

        tenant_id = self._get_tenant_id_for_create(context, network)
        # TODO(salvatore-orlando): if the network is shared this should be
        # probably stored into the lswitch with a tag
        # TODO(salvatore-orlando): Important - provider networks support
        # (might require a bridged TZ)
        net = nvplib.create_network(network['network']['tenant_id'],
                                    network['network']['name'],
                                    clusters=self.clusters)

        network['network']['id'] = net['net-id']
        return super(NvpPluginV2, self).create_network(context, network)
Пример #4
0
    def create_network(self, context, network):
        """
        :returns: a sequence of mappings with the following signature:
                    {'id': UUID representing the network.
                     'name': Human-readable name identifying the network.
                     'tenant_id': Owner of network. only admin user
                                  can specify a tenant_id other than its own.
                     'admin_state_up': Sets admin state of network. if down,
                                       network does not forward packets.
                     'status': Indicates whether network is currently
                               operational (limit values to "ACTIVE", "DOWN",
                               "BUILD", and "ERROR"?
                     'subnets': Subnets associated with this network. Plan
                                to allow fully specified subnets as part of
                                network create.
                   }
        :raises: exception.NoImplementedError
        """
        # FIXME(arosen) implement admin_state_up = False in NVP
        if network['network']['admin_state_up'] is False:
            LOG.warning(
                "Network with admin_state_up=False are not yet "
                "supported by this plugin. Ignoring setting for "
                "network %s", network['network'].get('name', '<unknown>'))

        tenant_id = self._get_tenant_id_for_create(context, network)
        # TODO(salvatore-orlando): if the network is shared this should be
        # probably stored into the lswitch with a tag
        # TODO(salvatore-orlando): Important - provider networks support
        # (might require a bridged TZ)
        net = nvplib.create_network(network['network']['tenant_id'],
                                    network['network']['name'],
                                    clusters=self.clusters)

        network['network']['id'] = net['net-id']
        return super(NvpPluginV2, self).create_network(context, network)