NetworksΒΆ

Network interface.

class novaclient.v1_1.networks.Network(manager, info, loaded=False)

Bases: novaclient.openstack.common.apiclient.base.Resource

A network.

Network.HUMAN_ID = False
Network.NAME_ATTR = 'label'
Network.delete()
class novaclient.v1_1.networks.NetworkManager(api)

Bases: novaclient.base.ManagerWithFind

Manage Network resources.

NetworkManager.add(network=None)

Associates the current project with a network. Network can be chosen automatically or provided explicitly.

Parameters:network – The ID of the Network to associate (optional).
NetworkManager.associate_host(network, host)

Associate a specific network with a host.

Parameters:
  • network – The ID of the Network.
  • host – The name of the host to associate the network with
NetworkManager.associate_project(network)

Associate a specific network with a project.

The project is defined by the project authenticated against

Parameters:network – The ID of the Network.
NetworkManager.create(**kwargs)

Create (allocate) a network. The following parameters are optional except for label; cidr or cidr_v6 must be specified, too.

Parameters:
  • label – str
  • bridge – str
  • bridge_interface – str
  • cidr – str
  • cidr_v6 – str
  • dns1 – str
  • dns2 – str
  • fixed_cidr – str
  • gateway – str
  • gateway_v6 – str
  • multi_host – str
  • priority – str
  • project_id – str
  • vlan_start – int
  • vpn_start – int
Return type:

list of Network

NetworkManager.delete(network)

Delete a specific network.

Parameters:network – The ID of the Network to delete.
NetworkManager.disassociate(network, disassociate_host=True, disassociate_project=True)

Disassociate a specific network from project and/or host.

Parameters:
  • network – The ID of the Network.
  • disassociate_host – Whether to disassociate the host
  • disassociate_project – Whether to disassociate the project
NetworkManager.get(network)

Get a specific network.

Parameters:network – The ID of the Network to get.
Return type:Network
NetworkManager.list()

Get a list of all networks.

Return type:list of Network.
NetworkManager.resource_class

alias of Network

Previous topic

Limits

Next topic

Quota_classes

This Page