The openstack_dashboard.api.neutron ModuleΒΆ

class openstack_dashboard.api.neutron.Agent(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron agents.

class openstack_dashboard.api.neutron.FloatingIp(fip)[source]

Bases: openstack_dashboard.api.base.APIDictWrapper

class openstack_dashboard.api.neutron.FloatingIpManager(request)[source]

Bases: openstack_dashboard.api.network_base.FloatingIpManager

allocate(pool, tenant_id=None, **params)[source]
associate(floating_ip_id, port_id)[source]
device_owner_map = {'compute:': 'compute', 'neutron:LOADBALANCER': 'loadbalancer'}
disassociate(floating_ip_id)[source]
get(floating_ip_id)[source]
get_target_id_by_instance(instance_id, target_list=None)[source]
is_simple_associate_supported()[source]
is_supported()[source]
list(all_tenants=False, **search_opts)[source]
list_pools()[source]
list_target_id_by_instance(instance_id, target_list=None)[source]
list_targets()[source]
release(floating_ip_id)[source]
class openstack_dashboard.api.neutron.FloatingIpPool(apidict)[source]

Bases: openstack_dashboard.api.base.APIDictWrapper

class openstack_dashboard.api.neutron.FloatingIpTarget(apidict)[source]

Bases: openstack_dashboard.api.base.APIDictWrapper

class openstack_dashboard.api.neutron.Network(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron Networks.

to_dict()[source]
class openstack_dashboard.api.neutron.NeutronAPIDictWrapper(apidict)[source]

Bases: openstack_dashboard.api.base.APIDictWrapper

items()[source]
name_or_id[source]
set_id_as_name_if_empty(length=8)[source]
class openstack_dashboard.api.neutron.Port(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron ports.

class openstack_dashboard.api.neutron.PortAllowedAddressPair(addr_pair)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron port allowed address pairs.

class openstack_dashboard.api.neutron.Profile(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron profiles.

class openstack_dashboard.api.neutron.Router(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron routers.

class openstack_dashboard.api.neutron.RouterStaticRoute(route)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron routes extra route.

class openstack_dashboard.api.neutron.SecurityGroup(sg, sg_dict=None)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

to_dict()[source]
class openstack_dashboard.api.neutron.SecurityGroupManager(request)[source]

Bases: openstack_dashboard.api.network_base.SecurityGroupManager

backend = 'neutron'
create(name, desc)[source]
delete(sg_id)[source]
get(sg_id)[source]
list()[source]
list_by_instance(instance_id)[source]

Gets security groups of an instance.

rule_create(parent_group_id, direction=None, ethertype=None, ip_protocol=None, from_port=None, to_port=None, cidr=None, group_id=None)[source]
rule_delete(sgr_id)[source]
update(sg_id, name, desc)[source]
update_instance_security_group(instance_id, new_security_group_ids)[source]
class openstack_dashboard.api.neutron.SecurityGroupRule(sgr, sg_dict=None)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

class openstack_dashboard.api.neutron.Subnet(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron subnets.

class openstack_dashboard.api.neutron.SubnetPool(apidict)[source]

Bases: openstack_dashboard.api.neutron.NeutronAPIDictWrapper

Wrapper for neutron subnetpools.

openstack_dashboard.api.neutron.add_network_to_dhcp_agent(request, dhcp_agent, network_id)[source]
openstack_dashboard.api.neutron.agent_list(request, **params)[source]
openstack_dashboard.api.neutron.get_feature_permission(request, feature, operation=None)[source]

Check if a feature-specific field can be displayed.

This method check a permission for a feature-specific field. Such field is usually provided through Neutron extension.

Parameters:
  • request – Request Object
  • feature – feature name defined in FEATURE_MAP
  • (optional) (operation) – Operation type. The valid value should be defined in FEATURE_MAP[feature][‘policies’] It must be specified if FEATURE_MAP[feature] has ‘policies’.
openstack_dashboard.api.neutron.get_ipver_str(ip_version)[source]

Convert an ip version number to a human-friendly string.

openstack_dashboard.api.neutron.is_enabled_by_config(name, default=True)[source]
openstack_dashboard.api.neutron.is_extension_supported(*args, **kwargs)[source]
openstack_dashboard.api.neutron.is_port_profiles_supported()[source]
openstack_dashboard.api.neutron.is_quotas_extension_supported(*args, **kwargs)[source]
openstack_dashboard.api.neutron.is_service_enabled(*args, **kwargs)[source]
openstack_dashboard.api.neutron.list_dhcp_agent_hosting_networks(request, network, **params)[source]
openstack_dashboard.api.neutron.list_extensions(*args, **kwargs)[source]
openstack_dashboard.api.neutron.list_l3_agent_hosting_router(request, router, **params)[source]
openstack_dashboard.api.neutron.list_resources_with_long_filters(list_method, filter_attr, filter_values, **params)[source]

List neutron resources with handling RequestURITooLong exception.

If filter parameters are long, list resources API request leads to 414 error (URL is too long). For such case, this method split list parameters specified by a list_field argument into chunks and call the specified list_method repeatedly.

Parameters:
  • list_method – Method used to retrieve resource list.
  • filter_attr – attribute name to be filtered. The value corresponding to this attribute is specified by “filter_values”. If you want to specify more attributes for a filter condition, pass them as keyword arguments like “attr2=values2”.
  • filter_values – values of “filter_attr” to be filtered. If filter_values are too long and the total URI length exceed the maximum length supported by the neutron server, filter_values will be split into sub lists if filter_values is a list.
  • params – parameters to pass a specified listing API call without any changes. You can specify more filter conditions in addition to a pair of filter_attr and filter_values.
openstack_dashboard.api.neutron.network_create(request, **kwargs)[source]

Create a network object.

Parameters:
  • request – request context
  • tenant_id – (optional) tenant id of the network created
  • name – (optional) name of the network created
Returns:

Network object

openstack_dashboard.api.neutron.network_delete(request, network_id)[source]
openstack_dashboard.api.neutron.network_get(request, network_id, expand_subnet=True, **params)[source]
openstack_dashboard.api.neutron.network_list(request, **params)[source]
openstack_dashboard.api.neutron.network_list_for_tenant(request, tenant_id, include_external=False, **params)[source]

Return a network list available for the tenant.

The list contains networks owned by the tenant and public networks. If requested_networks specified, it searches requested_networks only.

openstack_dashboard.api.neutron.network_update(request, network_id, **kwargs)[source]
openstack_dashboard.api.neutron.neutronclient(*args, **kwargs)[source]
openstack_dashboard.api.neutron.port_create(request, network_id, **kwargs)[source]

Create a port on a specified network.

Parameters:
  • request – request context
  • network_id – network id a subnet is created on
  • device_id – (optional) device id attached to the port
  • tenant_id – (optional) tenant id of the port created
  • name – (optional) name of the port created
Returns:

Port object

openstack_dashboard.api.neutron.port_delete(request, port_id)[source]
openstack_dashboard.api.neutron.port_get(request, port_id, **params)[source]
openstack_dashboard.api.neutron.port_list(request, **params)[source]
openstack_dashboard.api.neutron.port_update(request, port_id, **kwargs)[source]
openstack_dashboard.api.neutron.profile_bindings_list(request, type_p, **params)[source]
openstack_dashboard.api.neutron.profile_create(request, **kwargs)[source]
openstack_dashboard.api.neutron.profile_delete(request, profile_id)[source]
openstack_dashboard.api.neutron.profile_get(request, profile_id, **params)[source]
openstack_dashboard.api.neutron.profile_list(request, type_p, **params)[source]
openstack_dashboard.api.neutron.profile_update(request, profile_id, **kwargs)[source]
openstack_dashboard.api.neutron.provider_list(request)[source]
openstack_dashboard.api.neutron.remove_network_from_dhcp_agent(request, dhcp_agent, network_id)[source]
openstack_dashboard.api.neutron.router_add_gateway(request, router_id, network_id)[source]
openstack_dashboard.api.neutron.router_add_interface(request, router_id, subnet_id=None, port_id=None)[source]
openstack_dashboard.api.neutron.router_create(request, **kwargs)[source]
openstack_dashboard.api.neutron.router_delete(request, router_id)[source]
openstack_dashboard.api.neutron.router_get(request, router_id, **params)[source]
openstack_dashboard.api.neutron.router_list(request, **params)[source]
openstack_dashboard.api.neutron.router_list_on_l3_agent(request, l3_agent_id, **params)[source]
openstack_dashboard.api.neutron.router_remove_gateway(request, router_id)[source]
openstack_dashboard.api.neutron.router_remove_interface(request, router_id, subnet_id=None, port_id=None)[source]
openstack_dashboard.api.neutron.router_static_route_add(request, router_id, newroute)[source]
openstack_dashboard.api.neutron.router_static_route_list(request, router_id=None)[source]
openstack_dashboard.api.neutron.router_static_route_remove(request, router_id, route_ids)[source]
openstack_dashboard.api.neutron.router_update(request, r_id, **kwargs)[source]
openstack_dashboard.api.neutron.servers_update_addresses(request, servers, all_tenants=False)[source]

Retrieve servers networking information from Neutron if enabled.

Should be used when up to date networking information is required, and Nova’s networking info caching mechanism is not fast enough.

openstack_dashboard.api.neutron.show_network_ip_availability(request, network_id)[source]
openstack_dashboard.api.neutron.subnet_create(request, network_id, **kwargs)[source]

Create a subnet on a specified network.

Parameters:
  • request – request context
  • network_id – network id a subnet is created on
  • cidr – (optional) subnet IP address range
  • ip_version – (optional) IP version (4 or 6)
  • gateway_ip – (optional) IP address of gateway
  • tenant_id – (optional) tenant id of the subnet created
  • name – (optional) name of the subnet created
  • subnetpool_id – (optional) subnetpool to allocate prefix from
  • prefixlen – (optional) length of prefix to allocate
Returns:

Subnet object

Although both cidr+ip_version and subnetpool_id+preifxlen is listed as optional you MUST pass along one of the combinations to get a successful result.

openstack_dashboard.api.neutron.subnet_delete(request, subnet_id)[source]
openstack_dashboard.api.neutron.subnet_get(request, subnet_id, **params)[source]
openstack_dashboard.api.neutron.subnet_list(request, **params)[source]
openstack_dashboard.api.neutron.subnet_update(request, subnet_id, **kwargs)[source]
openstack_dashboard.api.neutron.subnetpool_create(request, name, prefixes, **kwargs)[source]

Create a subnetpool.

ip_version is auto-detected in back-end.

Parameters: request – Request context name – Name for subnetpool prefixes – List of prefixes for pool

Keyword Arguments (optional): min_prefixlen – Minimum prefix length for allocations from pool max_prefixlen – Maximum prefix length for allocations from pool default_prefixlen – Default prefix length for allocations from pool default_quota – Default quota for allocations from pool shared – Subnetpool should be shared (Admin-only) tenant_id – Owner of subnetpool

Returns: SubnetPool object

openstack_dashboard.api.neutron.subnetpool_delete(request, subnetpool_id)[source]
openstack_dashboard.api.neutron.subnetpool_get(request, subnetpool_id, **params)[source]
openstack_dashboard.api.neutron.subnetpool_list(request, **params)[source]
openstack_dashboard.api.neutron.subnetpool_update(request, subnetpool_id, **kwargs)[source]
openstack_dashboard.api.neutron.tenant_quota_get(request, tenant_id)[source]
openstack_dashboard.api.neutron.tenant_quota_update(request, tenant_id, **kwargs)[source]
openstack_dashboard.api.neutron.unescape_port_kwargs(**kwargs)[source]

Previous topic

The openstack_dashboard.api.lbaas Module

Next topic

The openstack_dashboard.api.cinder Module

Project Source

This Page