Network API¶
For details on how to use network, see Using OpenStack Network
The Network Class¶
The network high-level interface is available through the network
member of a Connection
object. The
network
member will only be added if the service is detected.
-
class
openstack.network.v2._proxy.
Proxy
(session)¶ -
create_address_scope
(**attrs)¶ Create a new address scope from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a AddressScope
, comprised of the properties on the AddressScope class.Returns: The results of address scope creation Return type: AddressScope
-
delete_address_scope
(address_scope, ignore_missing=True)¶ Delete an address scope
Parameters: - address_scope – The value can be either the ID of an
address scope or
a
AddressScope
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the address scope does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent address scope.
Returns: None
- address_scope – The value can be either the ID of an
address scope or
a
-
find_address_scope
(name_or_id, ignore_missing=True)¶ Find a single address scope
Parameters: - name_or_id – The name or ID of an address scope.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
AddressScope
or None
-
get_address_scope
(address_scope)¶ Get a single address scope
Parameters: address_scope – The value can be the ID of an address scope or a AddressScope
instance.Returns: One AddressScope
Raises: ResourceNotFound
when no resource can be found.
-
address_scopes
(**query)¶ Return a generator of address scopes
Parameters: **query (kwargs) – - Optional query parameters to be sent to limit
- the resources being returned.
name
: Address scope nameip_version
: Address scope IP address versiontenant_id
: Owner tenant IDshared
: Address scope is shared (boolean)
Returns: A generator of address scope objects Return type: AddressScope
-
update_address_scope
(address_scope, **attrs)¶ Update an address scope
Parameters: address_scope – Either the ID of an address scope or a AddressScope
instance.Attrs kwargs: The attributes to update on the address scope represented by value
.Returns: The updated address scope Return type: AddressScope
-
agents
(**query)¶ Return a generator of network agents
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of agents Return type: Agent
-
delete_agent
(agent, ignore_missing=True)¶ Delete a network agent
Parameters: - agent – The value can be the ID of a agent or a
Agent
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the agent does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent agent.
Returns: None
- agent – The value can be the ID of a agent or a
-
get_agent
(agent, ignore_missing=True)¶ Get a single network agent
Parameters: agent – The value can be the ID of a agent or a Agent
instance.Returns: One Agent
Return type: Agent
Raises: ResourceNotFound
when no resource can be found.
-
update_agent
(agent, **attrs)¶ Update a network agent
Parameters: agent – The value can be the ID of a agent or a Agent
instance.Attrs kwargs: The attributes to update on the agent represented by value
.Returns: One Agent
Return type: Agent
-
availability_zones
()¶ Return a generator of availability zones
Returns: A generator of availability zone objects Return type: AvailabilityZone
-
find_extension
(name_or_id, ignore_missing=True)¶ Find a single extension
Parameters: - name_or_id – The name or ID of a extension.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Extension
or None
-
extensions
(**query)¶ Return a generator of extensions
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of extension objects Return type: Extension
-
create_ip
(**attrs)¶ Create a new floating ip from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a FloatingIP
, comprised of the properties on the FloatingIP class.Returns: The results of floating ip creation Return type: FloatingIP
-
delete_ip
(floating_ip, ignore_missing=True)¶ Delete a floating ip
Parameters: - floating_ip – The value can be either the ID of a floating ip
or a
FloatingIP
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the floating ip does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent ip.
Returns: None
- floating_ip – The value can be either the ID of a floating ip
or a
-
find_available_ip
()¶ Find an available IP
Returns: One FloatingIP
or None
-
find_ip
(name_or_id, ignore_missing=True)¶ Find a single IP
Parameters: - name_or_id – The name or ID of an IP.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
FloatingIP
or None
-
get_ip
(floating_ip)¶ Get a single floating ip
Parameters: floating_ip – The value can be the ID of a floating ip or a FloatingIP
instance.Returns: One FloatingIP
Raises: ResourceNotFound
when no resource can be found.
-
ips
(**query)¶ Return a generator of ips
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of floating IP objects Return type: FloatingIP
-
update_ip
(floating_ip, **attrs)¶ Update a ip
Parameters: floating_ip – Either the id of a ip or a FloatingIP
instance.Attrs kwargs: The attributes to update on the ip represented by value
.Returns: The updated ip Return type: FloatingIP
-
create_health_monitor
(**attrs)¶ Create a new health monitor from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a HealthMonitor
, comprised of the properties on the HealthMonitor class.Returns: The results of health monitor creation Return type: HealthMonitor
-
delete_health_monitor
(health_monitor, ignore_missing=True)¶ Delete a health monitor
Parameters: - health_monitor – The value can be either the ID of a
health monitor or a
HealthMonitor
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the health monitor does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent health monitor.
Returns: None
- health_monitor – The value can be either the ID of a
health monitor or a
-
find_health_monitor
(name_or_id, ignore_missing=True)¶ Find a single health monitor
Parameters: - name_or_id – The name or ID of a health monitor.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
HealthMonitor
or None
-
get_health_monitor
(health_monitor)¶ Get a single health monitor
Parameters: health_monitor – The value can be the ID of a health monitor or a HealthMonitor
instance.Returns: One HealthMonitor
Raises: ResourceNotFound
when no resource can be found.
-
health_monitors
(**query)¶ Return a generator of health monitors
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of health monitor objects Return type: HealthMonitor
-
update_health_monitor
(health_monitor, **attrs)¶ Update a health monitor
Parameters: health_monitor – Either the id of a health monitor or a HealthMonitor
instance.Attrs kwargs: The attributes to update on the health monitor represented by value
.Returns: The updated health monitor Return type: HealthMonitor
-
create_listener
(**attrs)¶ Create a new listener from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Listener
, comprised of the properties on the Listener class.Returns: The results of listener creation Return type: Listener
-
delete_listener
(listener, ignore_missing=True)¶ Delete a listener
Parameters: - listener – The value can be either the ID of a listner or a
Listener
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the listner does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent listener.
Returns: None
- listener – The value can be either the ID of a listner or a
-
find_listener
(name_or_id, ignore_missing=True)¶ Find a single listener
Parameters: - name_or_id – The name or ID of a listener.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Listener
or None
-
get_listener
(listener)¶ Get a single listener
Parameters: listener – The value can be the ID of a listener or a Listener
instance.Returns: One Listener
Raises: ResourceNotFound
when no resource can be found.
-
listeners
(**query)¶ Return a generator of listeners
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of listener objects Return type: Listener
-
update_listener
(listener, **attrs)¶ Update a listener
Parameters: listener – Either the id of a listener or a Listener
instance.Attrs kwargs: The attributes to update on the listener represented by value
.Returns: The updated listener Return type: Listener
-
create_load_balancer
(**attrs)¶ Create a new load balancer from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a LoadBalancer
, comprised of the properties on the LoadBalancer class.Returns: The results of load balancer creation Return type: LoadBalancer
-
delete_load_balancer
(load_balancer, ignore_missing=True)¶ Delete a load balancer
Parameters: - load_balancer – The value can be the ID of a load balancer or a
LoadBalancer
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the load balancer does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent load balancer.
Returns: None
- load_balancer – The value can be the ID of a load balancer or a
-
find_load_balancer
(name_or_id, ignore_missing=True)¶ Find a single load balancer
Parameters: - name_or_id – The name or ID of a load balancer.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
LoadBalancer
or None
-
get_load_balancer
(load_balancer)¶ Get a single load balancer
Parameters: load_balancer – The value can be the ID of a load balancer or a LoadBalancer
instance.Returns: One LoadBalancer
Raises: ResourceNotFound
when no resource can be found.
-
load_balancers
(**query)¶ Return a generator of load balancers
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of load balancer objects Return type: LoadBalancer
-
update_load_balancer
(load_balancer, **attrs)¶ Update a load balancer
Parameters: load_balancer – Either the id of a load balancer or a LoadBalancer
instance.Attrs kwargs: The attributes to update on the load balancer represented by value
.Returns: The updated load balancer Return type: LoadBalancer
-
create_metering_label
(**attrs)¶ Create a new metering label from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a MeteringLabel
, comprised of the properties on the MeteringLabel class.Returns: The results of metering label creation Return type: MeteringLabel
-
delete_metering_label
(metering_label, ignore_missing=True)¶ Delete a metering label
Parameters: - metering_label – The value can be either the ID of a metering label or a
MeteringLabel
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the metering label does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent metering label.
Returns: None
- metering_label – The value can be either the ID of a metering label or a
-
find_metering_label
(name_or_id, ignore_missing=True)¶ Find a single metering label
Parameters: - name_or_id – The name or ID of a metering label.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
MeteringLabel
or None
-
get_metering_label
(metering_label)¶ Get a single metering label
Parameters: metering_label – The value can be the ID of a metering label or a MeteringLabel
instance.Returns: One MeteringLabel
Raises: ResourceNotFound
when no resource can be found.
-
metering_labels
(**query)¶ Return a generator of metering labels
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of metering label objects Return type: MeteringLabel
-
update_metering_label
(metering_label, **attrs)¶ Update a metering label
Parameters: metering_label – Either the id of a metering label or a MeteringLabel
instance.Attrs kwargs: The attributes to update on the metering label represented by value
.Returns: The updated metering label Return type: MeteringLabel
-
create_metering_label_rule
(**attrs)¶ Create a new metering label rule from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a MeteringLabelRule
, comprised of the properties on the MeteringLabelRule class.Returns: The results of metering label rule creation Return type: MeteringLabelRule
-
delete_metering_label_rule
(metering_label_rule, ignore_missing=True)¶ Delete a metering label rule
Parameters: - metering_label_rule – The value can be either the ID of a metering label rule
or a
MeteringLabelRule
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the metering label rule does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent metering label rule.
Returns: None
- metering_label_rule – The value can be either the ID of a metering label rule
or a
-
find_metering_label_rule
(name_or_id, ignore_missing=True)¶ Find a single metering label rule
Parameters: - name_or_id – The name or ID of a metering label rule.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
MeteringLabelRule
or None
-
get_metering_label_rule
(metering_label_rule)¶ Get a single metering label rule
Parameters: metering_label_rule – The value can be the ID of a metering label rule or a MeteringLabelRule
instance.Returns: One MeteringLabelRule
Raises: ResourceNotFound
when no resource can be found.
-
metering_label_rules
(**query)¶ Return a generator of metering label rules
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of metering label rule objects Return type: MeteringLabelRule
-
update_metering_label_rule
(metering_label_rule, **attrs)¶ Update a metering label rule
Parameters: metering_label_rule – Either the id of a metering label rule or a MeteringLabelRule
instance.Attrs kwargs: The attributes to update on the metering label rule represented by value
.Returns: The updated metering label rule Return type: MeteringLabelRule
-
create_network
(**attrs)¶ Create a new network from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Network
, comprised of the properties on the Network class.Returns: The results of network creation Return type: Network
-
delete_network
(network, ignore_missing=True)¶ Delete a network
Parameters: - network – The value can be either the ID of a network or a
Network
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the network does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent network.
Returns: None
- network – The value can be either the ID of a network or a
-
find_network
(name_or_id, ignore_missing=True)¶ Find a single network
Parameters: - name_or_id – The name or ID of a network.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Network
or None
-
get_network
(network)¶ Get a single network
Parameters: network – The value can be the ID of a network or a Network
instance.Returns: One Network
Raises: ResourceNotFound
when no resource can be found.
-
networks
(**query)¶ Return a generator of networks
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
admin_state_up
: Network administrative state is up (boolean)name
: Network namerouter:external
: Network is external (boolean)shared
: Network is shared (boolean)status
: Network statustenant_id
: Owner tenant IDprovider:network_type
: Network physical mechanismprovider:physical_network
: Physical networkprovider:segmentation_id
: VLAN ID for VLAN networks or Tunnel- ID for GENEVE/GRE/VXLAN networks
Returns: A generator of network objects Return type: Network
-
update_network
(network, **attrs)¶ Update a network
Parameters: network – Either the id of a network or a Network
instance.Attrs kwargs: The attributes to update on the network represented by value
.Returns: The updated network Return type: Network
-
create_flavor
(**attrs)¶ Create a new network service flavor from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Flavor
, comprised of the properties on the Flavor class.Returns: The results of flavor creation Return type: Flavor
-
delete_flavor
(flavor, ignore_missing=True)¶ Delete a network service flavor
Parameters: - flavor – The value can be either the ID of a flavor or a
Flavor
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the flavor does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent flavor.
Returns: None
- flavor – The value can be either the ID of a flavor or a
-
find_flavor
(name_or_id, ignore_missing=True)¶ Find a single network service flavor
Parameters: - name_or_id – The name or ID of a flavor.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Flavor
or None
-
get_flavor
(flavor)¶ Get a single network service flavor
Parameters: flavor – The value can be the ID of a flavor or a Flavor
instance.Returns: One Flavor
Raises: ResourceNotFound
when no resource can be found.
-
update_flavor
(flavor, **attrs)¶ Update a network service flavor
Parameters: flavor – Either the id of a flavor or a Flavor
instance.Attrs kwargs: The attributes to update on the flavor represented by value
.Returns: The updated flavor Return type: Flavor
-
flavors
(**query)¶ Return a generator of network service flavors
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of flavor objects Return type: Flavor
-
find_network_ip_availability
(name_or_id, ignore_missing=True)¶ Find IP availability of a network
Parameters: - name_or_id – The name or ID of a network.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
NetworkIPAvailability
or None
-
get_network_ip_availability
(network)¶ Get IP availability of a network
Parameters: network – The value can be the ID of a network or a Network
instance.Returns: One NetworkIPAvailability
Raises: ResourceNotFound
when no resource can be found.
-
network_ip_availabilities
(**query)¶ Return a generator of network ip availabilities
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
ip_version
: IP version of the networktenant_id
: Owner tenant ID
Returns: A generator of network ip availability objects Return type: NetworkIPAvailability
-
create_pool
(**attrs)¶ Create a new pool from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Pool
, comprised of the properties on the Pool class.Returns: The results of pool creation Return type: Pool
-
delete_pool
(pool, ignore_missing=True)¶ Delete a pool
Parameters: - pool – The value can be either the ID of a pool or a
Pool
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the pool does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent pool.
Returns: None
- pool – The value can be either the ID of a pool or a
-
find_pool
(name_or_id, ignore_missing=True)¶ Find a single pool
Parameters: - name_or_id – The name or ID of a pool.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Pool
or None
-
get_pool
(pool)¶ Get a single pool
Parameters: pool – The value can be the ID of a pool or a Pool
instance.Returns: One Pool
Raises: ResourceNotFound
when no resource can be found.
-
pools
(**query)¶ Return a generator of pools
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of pool objects Return type: Pool
-
update_pool
(pool, **attrs)¶ Update a pool
Parameters: pool – Either the id of a pool or a Pool
instance.Attrs kwargs: The attributes to update on the pool represented by value
.Returns: The updated pool Return type: Pool
-
create_pool_member
(pool, **attrs)¶ Create a new pool member from attributes
Parameters: - pool – The pool can be either the ID of a pool or a
Pool
instance that the member will be created in. - attrs (dict) – Keyword arguments which will be used to create
a
PoolMember
, comprised of the properties on the PoolMember class.
Returns: The results of pool member creation
Return type: - pool – The pool can be either the ID of a pool or a
-
delete_pool_member
(pool_member, pool, ignore_missing=True)¶ Delete a pool member
Parameters: - pool_member – The member can be either the ID of a pool member or a
PoolMember
instance. - pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the pool member does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent pool member.
Returns: None
- pool_member – The member can be either the ID of a pool member or a
-
find_pool_member
(name_or_id, pool, ignore_missing=True)¶ Find a single pool member
Parameters: - name_or_id (str) – The name or ID of a pool member.
- pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
PoolMember
or None
-
get_pool_member
(pool_member, pool)¶ Get a single pool member
Parameters: - pool_member – The member can be the ID of a pool member or a
PoolMember
instance. - pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to.
Returns: One
PoolMember
Raises: ResourceNotFound
when no resource can be found.- pool_member – The member can be the ID of a pool member or a
-
pool_members
(pool, **query)¶ Return a generator of pool members
Parameters: - pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to. - **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns: A generator of pool member objects
Return type: - pool – The pool can be either the ID of a pool or a
-
update_pool_member
(pool_member, pool, **attrs)¶ Update a pool member
Parameters: - pool_member – Either the ID of a pool member or a
PoolMember
instance. - pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to.
Attrs kwargs: The attributes to update on the pool member represented by
value
.Returns: The updated pool member
Return type: - pool_member – Either the ID of a pool member or a
-
create_port
(**attrs)¶ Create a new port from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Port
, comprised of the properties on the Port class.Returns: The results of port creation Return type: Port
-
delete_port
(port, ignore_missing=True)¶ Delete a port
Parameters: - port – The value can be either the ID of a port or a
Port
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the port does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent port.
Returns: None
- port – The value can be either the ID of a port or a
-
find_port
(name_or_id, ignore_missing=True)¶ Find a single port
Parameters: - name_or_id – The name or ID of a port.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Port
or None
-
get_port
(port)¶ Get a single port
Parameters: port – The value can be the ID of a port or a Port
instance.Returns: One Port
Raises: ResourceNotFound
when no resource can be found.
-
ports
(**query)¶ Return a generator of ports
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
device_id
: Port device IDdevice_owner
: Port device owner (e.g.network:dhcp
)network_id
: ID of network that owns the portsmac_address
: Port MAC address
Returns: A generator of port objects Return type: Port
-
update_port
(port, **attrs)¶ Update a port
Parameters: port – Either the id of a port or a Port
instance.Attrs kwargs: The attributes to update on the port represented by value
.Returns: The updated port Return type: Port
-
create_qos_bandwidth_limit_rule
(qos_policy, **attrs)¶ Create a new bandwidth limit rule
Parameters: - attrs (dict) – Keyword arguments which will be used to create
a
QoSBandwidthLimitRule
, comprised of the properties on the QoSBandwidthLimitRule class. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Returns: The results of resource creation
Return type: QoSBandwidthLimitRule
- attrs (dict) – Keyword arguments which will be used to create
a
-
delete_qos_bandwidth_limit_rule
(qos_rule, qos_policy, ignore_missing=True)¶ Delete a bandwidth limit rule
Parameters: - qos_rule – The value can be either the ID of a bandwidth limit
rule or a
QoSBandwidthLimitRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent bandwidth limit rule.
Returns: None
- qos_rule – The value can be either the ID of a bandwidth limit
rule or a
-
find_qos_bandwidth_limit_rule
(qos_rule_id, qos_policy, ignore_missing=True)¶ Find a bandwidth limit rule
Parameters: - qos_rule_id – The ID of a bandwidth limit rule.
- qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
QoSBandwidthLimitRule
or None
-
get_qos_bandwidth_limit_rule
(qos_rule, qos_policy)¶ Get a single bandwidth limit rule
Parameters: - qos_rule – The value can be the ID of a minimum bandwidth rule or
a
QoSBandwidthLimitRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Returns: One
QoSBandwidthLimitRule
Raises: ResourceNotFound
when no resource can be found.- qos_rule – The value can be the ID of a minimum bandwidth rule or
a
-
qos_bandwidth_limit_rules
(qos_policy, **query)¶ Return a generator of bandwidth limit rules
Parameters: - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns: A generator of bandwidth limit rule objects
Return type: QoSBandwidthLimitRule
- qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
-
update_qos_bandwidth_limit_rule
(qos_rule, qos_policy, **attrs)¶ Update a bandwidth limit rule
Parameters: - qos_rule – Either the id of a bandwidth limit rule or a
QoSBandwidthLimitRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Attrs kwargs: The attributes to update on the bandwidth limit rule represented by
value
.Returns: The updated minimum bandwidth rule
Return type: QoSBandwidthLimitRule
- qos_rule – Either the id of a bandwidth limit rule or a
-
create_qos_dscp_marking_rule
(qos_policy, **attrs)¶ Create a new QoS DSCP marking rule
Parameters: - attrs (dict) – Keyword arguments which will be used to create
a
QoSDSCPMarkingRule
, comprised of the properties on the QosDscpMarkingRule class. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Returns: The results of router creation
Return type: QoSDSCPMarkingRule
- attrs (dict) – Keyword arguments which will be used to create
a
-
delete_qos_dscp_marking_rule
(qos_rule, qos_policy, ignore_missing=True)¶ Delete a QoS DSCP marking rule
Parameters: - qos_rule – The value can be either the ID of a minimum bandwidth
rule or a
QoSDSCPMarkingRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent minimum bandwidth rule.
Returns: None
- qos_rule – The value can be either the ID of a minimum bandwidth
rule or a
-
find_qos_dscp_marking_rule
(qos_rule_id, qos_policy, ignore_missing=True)¶ Find a QoS DSCP marking rule
Parameters: - qos_rule_id – The ID of a QoS DSCP marking rule.
- qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
QoSDSCPMarkingRule
or None
-
get_qos_dscp_marking_rule
(qos_rule, qos_policy)¶ Get a single QoS DSCP marking rule
Parameters: - qos_rule – The value can be the ID of a minimum bandwidth rule or
a
QoSDSCPMarkingRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Returns: One
QoSDSCPMarkingRule
Raises: ResourceNotFound
when no resource can be found.- qos_rule – The value can be the ID of a minimum bandwidth rule or
a
-
qos_dscp_marking_rules
(qos_policy, **query)¶ Return a generator of QoS DSCP marking rules
Parameters: - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns: A generator of QoS DSCP marking rule objects
Return type: QoSDSCPMarkingRule
- qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
-
update_qos_dscp_marking_rule
(qos_rule, qos_policy, **attrs)¶ Update a QoS DSCP marking rule
Parameters: - qos_rule – Either the id of a minimum bandwidth rule or a
QoSDSCPMarkingRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Attrs kwargs: The attributes to update on the QoS DSCP marking rule represented by
value
.Returns: The updated QoS DSCP marking rule
Return type: QoSDSCPMarkingRule
- qos_rule – Either the id of a minimum bandwidth rule or a
-
create_qos_minimum_bandwidth_rule
(qos_policy, **attrs)¶ Create a new minimum bandwidth rule
Parameters: - attrs (dict) – Keyword arguments which will be used to create
a
QoSMinimumBandwidthRule
, comprised of the properties on the QoSMinimumBandwidthRule class. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Returns: The results of resource creation
Return type: QoSMinimumBandwidthRule
- attrs (dict) – Keyword arguments which will be used to create
a
-
delete_qos_minimum_bandwidth_rule
(qos_rule, qos_policy, ignore_missing=True)¶ Delete a minimum bandwidth rule
Parameters: - qos_rule – The value can be either the ID of a minimum bandwidth
rule or a
QoSMinimumBandwidthRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent minimum bandwidth rule.
Returns: None
- qos_rule – The value can be either the ID of a minimum bandwidth
rule or a
-
find_qos_minimum_bandwidth_rule
(qos_rule_id, qos_policy, ignore_missing=True)¶ Find a minimum bandwidth rule
Parameters: - qos_rule_id – The ID of a minimum bandwidth rule.
- qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
QoSMinimumBandwidthRule
or None
-
get_qos_minimum_bandwidth_rule
(qos_rule, qos_policy)¶ Get a single minimum bandwidth rule
Parameters: - qos_rule – The value can be the ID of a minimum bandwidth rule or
a
QoSMinimumBandwidthRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Returns: One
QoSMinimumBandwidthRule
Raises: ResourceNotFound
when no resource can be found.- qos_rule – The value can be the ID of a minimum bandwidth rule or
a
-
qos_minimum_bandwidth_rules
(qos_policy, **query)¶ Return a generator of minimum bandwidth rules
Parameters: - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance. - **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns: A generator of minimum bandwidth rule objects
Return type: QoSMinimumBandwidthRule
- qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
-
update_qos_minimum_bandwidth_rule
(qos_rule, qos_policy, **attrs)¶ Update a minimum bandwidth rule
Parameters: - qos_rule – Either the id of a minimum bandwidth rule or a
QoSMinimumBandwidthRule
instance. - qos_policy – The value can be the ID of the QoS policy that the
rule belongs or a
QoSPolicy
instance.
Attrs kwargs: The attributes to update on the minimum bandwidth rule represented by
value
.Returns: The updated minimum bandwidth rule
Return type: QoSMinimumBandwidthRule
- qos_rule – Either the id of a minimum bandwidth rule or a
-
create_qos_policy
(**attrs)¶ Create a new QoS policy from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a QoSPolicy
, comprised of the properties on the QoSPolicy class.Returns: The results of QoS policy creation Return type: QoSPolicy
-
delete_qos_policy
(qos_policy, ignore_missing=True)¶ Delete a QoS policy
Parameters: - qos_policy – The value can be either the ID of a QoS policy or a
QoSPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the QoS policy does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent QoS policy.
Returns: None
- qos_policy – The value can be either the ID of a QoS policy or a
-
find_qos_policy
(name_or_id, ignore_missing=True)¶ Find a single QoS policy
Parameters: - name_or_id – The name or ID of a QoS policy.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
QoSPolicy
or None
-
get_qos_policy
(qos_policy)¶ Get a single QoS policy
Parameters: qos_policy – The value can be the ID of a QoS policy or a QoSPolicy
instance.Returns: One QoSPolicy
Raises: ResourceNotFound
when no resource can be found.
-
qos_policies
(**query)¶ Return a generator of QoS policies
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of QoS policy objects Return type: QoSPolicy
-
update_qos_policy
(qos_policy, **attrs)¶ Update a QoS policy
Parameters: qos_policy – Either the id of a QoS policy or a QoSPolicy
instance.Attrs kwargs: The attributes to update on the QoS policy represented by value
.Returns: The updated QoS policy Return type: QoSPolicy
-
qos_rule_types
(**query)¶ Return a generator of QoS rule types
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of QoS rule type objects Return type: QoSRuleType
-
delete_quota
(quota, ignore_missing=True)¶ Delete a quota (i.e. reset to the default quota)
Parameters: - quota – The value can be either the ID of a quota or a
Quota
instance. The ID of a quota is the same as the project ID for the quota. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when quota does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent quota.
Returns: None
- quota – The value can be either the ID of a quota or a
-
get_quota
(quota)¶ Get a quota
Parameters: quota – The value can be the ID of a quota or a Quota
instance. The ID of a quota is the same as the project ID for the quota.Returns: One Quota
Raises: ResourceNotFound
when no resource can be found.
-
get_quota_default
(quota)¶ Get a default quota
Parameters: quota – The value can be the ID of a default quota or a QuotaDefault
instance. The ID of a default quota is the same as the project ID for the default quota.Returns: One QuotaDefault
Raises: ResourceNotFound
when no resource can be found.
-
quotas
(**query)¶ Return a generator of quotas
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of quota objects Return type: Quota
-
update_quota
(quota, **attrs)¶ Update a quota
Parameters: quota – Either the ID of a quota or a Quota
instance. The ID of a quota is the same as the project ID for the quota.Attrs kwargs: The attributes to update on the quota represented by value
.Returns: The updated quota Return type: Quota
-
create_rbac_policy
(**attrs)¶ Create a new RBAC policy from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a RBACPolicy
, comprised of the properties on the RBACPolicy class.Returns: The results of RBAC policy creation Return type: RBACPolicy
-
delete_rbac_policy
(rbac_policy, ignore_missing=True)¶ Delete a RBAC policy
Parameters: - rbac_policy – The value can be either the ID of a RBAC policy or
a
RBACPolicy
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the RBAC policy does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent RBAC policy.
Returns: None
- rbac_policy – The value can be either the ID of a RBAC policy or
a
-
find_rbac_policy
(rbac_policy, ignore_missing=True)¶ Find a single RBAC policy
Parameters: - rbac_policy – The ID of a RBAC policy.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
RBACPolicy
or None
-
get_rbac_policy
(rbac_policy)¶ Get a single RBAC policy
Parameters: rbac_policy – The value can be the ID of a RBAC policy or a RBACPolicy
instance.Returns: One RBACPolicy
Raises: ResourceNotFound
when no resource can be found.
-
rbac_policies
(**query)¶ Return a generator of RBAC policies
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
action
: RBAC policy actionobject_type
: Type of the object that the RBAC policy affectstarget_tenant
: ID of the tenant that the RBAC policy affectstenant_id
: Owner tenant ID
Returns: A generator of rbac objects Return type: RBACPolicy
-
update_rbac_policy
(rbac_policy, **attrs)¶ Update a RBAC policy
Parameters: rbac_policy – Either the id of a RBAC policy or a RBACPolicy
instance.Attrs kwargs: The attributes to update on the RBAC policy represented by value
.Returns: The updated RBAC policy Return type: RBACPolicy
-
create_router
(**attrs)¶ Create a new router from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Router
, comprised of the properties on the Router class.Returns: The results of router creation Return type: Router
-
delete_router
(router, ignore_missing=True)¶ Delete a router
Parameters: - router – The value can be either the ID of a router or a
Router
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the router does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent router.
Returns: None
- router – The value can be either the ID of a router or a
-
find_router
(name_or_id, ignore_missing=True)¶ Find a single router
Parameters: - name_or_id – The name or ID of a router.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Router
or None
-
get_router
(router)¶ Get a single router
Parameters: router – The value can be the ID of a router or a Router
instance.Returns: One Router
Raises: ResourceNotFound
when no resource can be found.
-
routers
(**query)¶ Return a generator of routers
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of router objects Return type: Router
-
update_router
(router, **attrs)¶ Update a router
Parameters: router – Either the id of a router or a Router
instance.Attrs kwargs: The attributes to update on the router represented by value
.Returns: The updated router Return type: Router
-
add_interface_to_router
(router, subnet_id=None, port_id=None)¶ Add Interface to a router
Parameters: - router – Either the router ID or an instance of
Router
- subnet_id – ID of the subnet
- port_id – ID of the port
Returns: Router with updated interface
Return type: class: ~openstack.network.v2.router.Router - router – Either the router ID or an instance of
-
remove_interface_from_router
(router, subnet_id=None, port_id=None)¶ Remove Interface from a router
Parameters: - router – Either the router ID or an instance of
Router
- subnet – ID of the subnet
- port – ID of the port
Returns: Router with updated interface
Return type: class: ~openstack.network.v2.router.Router - router – Either the router ID or an instance of
-
add_gateway_to_router
(router, **body)¶ Add Gateway to a router
Parameters: - router – Either the router ID or an instance of
Router
- body – Body with the gateway information
Returns: Router with updated interface
Return type: class: ~openstack.network.v2.router.Router - router – Either the router ID or an instance of
-
remove_gateway_from_router
(router, **body)¶ Remove Gateway from a router
Parameters: - router – Either the router ID or an instance of
Router
- body – Body with the gateway information
Returns: Router with updated interface
Return type: class: ~openstack.network.v2.router.Router - router – Either the router ID or an instance of
-
create_security_group
(**attrs)¶ Create a new security group from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a SecurityGroup
, comprised of the properties on the SecurityGroup class.Returns: The results of security group creation Return type: SecurityGroup
-
delete_security_group
(security_group, ignore_missing=True)¶ Delete a security group
Parameters: - security_group – The value can be either the ID of a security group or a
SecurityGroup
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the security group does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent security group.
Returns: None
- security_group – The value can be either the ID of a security group or a
-
find_security_group
(name_or_id, ignore_missing=True)¶ Find a single security group
Parameters: - name_or_id – The name or ID of a security group.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
SecurityGroup
or None
-
get_security_group
(security_group)¶ Get a single security group
Parameters: security_group – The value can be the ID of a security group or a SecurityGroup
instance.Returns: One SecurityGroup
Raises: ResourceNotFound
when no resource can be found.
-
security_groups
(**query)¶ Return a generator of security groups
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of security group objects Return type: SecurityGroup
-
update_security_group
(security_group, **attrs)¶ Update a security group
Parameters: security_group – Either the id of a security group or a SecurityGroup
instance.Attrs kwargs: The attributes to update on the security group represented by value
.Returns: The updated security group Return type: SecurityGroup
-
create_security_group_rule
(**attrs)¶ Create a new security group rule from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a SecurityGroupRule
, comprised of the properties on the SecurityGroupRule class.Returns: The results of security group rule creation Return type: SecurityGroupRule
-
delete_security_group_rule
(security_group_rule, ignore_missing=True)¶ Delete a security group rule
Parameters: - security_group_rule – The value can be either the ID of a security group rule
or a
SecurityGroupRule
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the security group rule does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent security group rule.
Returns: None
- security_group_rule – The value can be either the ID of a security group rule
or a
-
find_security_group_rule
(name_or_id, ignore_missing=True)¶ Find a single security group rule
Parameters: - name_or_id (str) – The ID of a security group rule.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
SecurityGroupRule
or None
-
get_security_group_rule
(security_group_rule)¶ Get a single security group rule
Parameters: security_group_rule – The value can be the ID of a security group rule or a SecurityGroupRule
instance.Returns: SecurityGroupRule
Raises: ResourceNotFound
when no resource can be found.
-
security_group_rules
(**query)¶ Return a generator of security group rules
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
direction
: Security group rule directionprotocol
: Security group rule protocolsecurity_group_id
: ID of security group that owns the rules
Returns: A generator of security group rule objects Return type: SecurityGroupRule
-
create_segment
(**attrs)¶ Create a new segment from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Segment
, comprised of the properties on the Segment class.Returns: The results of segment creation Return type: Segment
-
delete_segment
(segment, ignore_missing=True)¶ Delete a segment
Parameters: - segment – The value can be either the ID of a segment or a
Segment
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the segment does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent segment.
Returns: None
- segment – The value can be either the ID of a segment or a
-
find_segment
(name_or_id, ignore_missing=True)¶ Find a single segment
Parameters: - name_or_id – The name or ID of a segment.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Segment
or None
-
get_segment
(segment)¶ Get a single segment
Parameters: segment – The value can be the ID of a segment or a Segment
instance.Returns: One Segment
Raises: ResourceNotFound
when no resource can be found.
-
segments
(**query)¶ Return a generator of segments
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
name
: Name of the segmentsnetwork_id
: ID of the network that owns the segmentsnetwork_type
: Network type for the segmentsphysical_network
: Physical network name for the segmentssegmentation_id
: Segmentation ID for the segments
Returns: A generator of segment objects Return type: Segment
-
update_segment
(segment, **attrs)¶ Update a segment
Parameters: segment – Either the id of a segment or a Segment
instance.Attrs kwargs: The attributes to update on the segment represented by value
.Returns: The update segment Return type: Segment
-
service_providers
(**query)¶ Return a generator of service providers
Parameters: ** query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of service provider objects Return type: ServiceProvider
-
create_service_profile
(**attrs)¶ Create a new network service flavor profile from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a ServiceProfile
, comprised of the properties on the ServiceProfile class.Returns: The results of service profile creation Return type: ServiceProfile
-
delete_service_profile
(service_profile, ignore_missing=True)¶ Delete a network service flavor profile
Parameters: - service_profile – The value can be either the ID of a service
profile or a
ServiceProfile
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the service profile does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent service profile.
Returns: None
- service_profile – The value can be either the ID of a service
profile or a
-
find_service_profile
(name_or_id, ignore_missing=True)¶ Find a single network service flavor profile
Parameters: - name_or_id – The name or ID of a service profile.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
ServiceProfile
or None
-
get_service_profile
(service_profile)¶ Get a single network service flavor profile
Parameters: service_profile – - The value can be the ID of a service_profile or
- a
ServiceProfile
instance.Returns: One ServiceProfile
Raises: ResourceNotFound
when no resource can be found.
-
service_profiles
(**query)¶ Return a generator of network service flavor profiles
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of service profile objects Return type: ServiceProfile
-
update_service_profile
(service_profile, **attrs)¶ Update a network flavor service profile
Parameters: service_profile – Either the id of a service profile or a ServiceProfile
instance.Attrs kwargs: The attributes to update on the service profile represented by value
.Returns: The updated service profile Return type: ServiceProfile
-
create_subnet
(**attrs)¶ Create a new subnet from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Subnet
, comprised of the properties on the Subnet class.Returns: The results of subnet creation Return type: Subnet
-
delete_subnet
(subnet, ignore_missing=True)¶ Delete a subnet
Parameters: - subnet – The value can be either the ID of a subnet or a
Subnet
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the subnet does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent subnet.
Returns: None
- subnet – The value can be either the ID of a subnet or a
-
find_subnet
(name_or_id, ignore_missing=True)¶ Find a single subnet
Parameters: - name_or_id – The name or ID of a subnet.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
Subnet
or None
-
get_subnet
(subnet)¶ Get a single subnet
Parameters: subnet – The value can be the ID of a subnet or a Subnet
instance.Returns: One Subnet
Raises: ResourceNotFound
when no resource can be found.
-
subnets
(**query)¶ Return a generator of subnets
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
cidr
: Subnet CIDRenable_dhcp
: Subnet has DHCP enabled (boolean)gateway_ip
: Subnet gateway IP addressip_version
: Subnet IP address versionname
: Subnet namenetwork_id
: ID of network that owns the subnetsservice_types
: Subnet service typestenant_id
: Owner tenant ID
Returns: A generator of subnet objects Return type: Subnet
-
update_subnet
(subnet, **attrs)¶ Update a subnet
Parameters: subnet – Either the id of a subnet or a Subnet
instance.Attrs kwargs: The attributes to update on the subnet represented by value
.Returns: The updated subnet Return type: Subnet
-
create_subnet_pool
(**attrs)¶ Create a new subnet pool from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a SubnetPool
, comprised of the properties on the SubnetPool class.Returns: The results of subnet pool creation Return type: SubnetPool
-
delete_subnet_pool
(subnet_pool, ignore_missing=True)¶ Delete a subnet pool
Parameters: - subnet_pool – The value can be either the ID of a subnet pool or
a
SubnetPool
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the subnet pool does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent subnet pool.
Returns: None
- subnet_pool – The value can be either the ID of a subnet pool or
a
-
find_subnet_pool
(name_or_id, ignore_missing=True)¶ Find a single subnet pool
Parameters: - name_or_id – The name or ID of a subnet pool.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
SubnetPool
or None
-
get_subnet_pool
(subnet_pool)¶ Get a single subnet pool
Parameters: subnet_pool – The value can be the ID of a subnet pool or a SubnetPool
instance.Returns: One SubnetPool
Raises: ResourceNotFound
when no resource can be found.
-
subnet_pools
(**query)¶ Return a generator of subnet pools
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Available parameters include:
address_scope_id
: Subnet pool address scope IDis_default
: Subnet pool is the default (boolean)name
: Subnet pool nameshared
: Subnet pool is shared (boolean)tenant_id
: Owner tenant ID
Returns: A generator of subnet pool objects Return type: SubnetPool
-
update_subnet_pool
(subnet_pool, **attrs)¶ Update a subnet pool
Parameters: subnet_pool – Either the ID of a subnet pool or a SubnetPool
instance.Attrs kwargs: The attributes to update on the subnet pool represented by value
.Returns: The updated subnet pool Return type: SubnetPool
-
create_vpn_service
(**attrs)¶ Create a new vpn service from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a VPNService
, comprised of the properties on the VPNService class.Returns: The results of vpn service creation Return type: VPNService
-
delete_vpn_service
(vpn_service, ignore_missing=True)¶ Delete a vpn service
Parameters: - vpn_service – The value can be either the ID of a vpn service or a
VPNService
instance. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the vpn service does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent vpn service.
Returns: None
- vpn_service – The value can be either the ID of a vpn service or a
-
find_vpn_service
(name_or_id, ignore_missing=True)¶ Find a single vpn service
Parameters: - name_or_id – The name or ID of a vpn service.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
VPNService
or None
-
get_vpn_service
(vpn_service)¶ Get a single vpn service
Parameters: vpn_service – The value can be the ID of a vpn service or a VPNService
instance.Returns: One VPNService
Raises: ResourceNotFound
when no resource can be found.
-
vpn_services
(**query)¶ Return a generator of vpn services
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of vpn service objects Return type: VPNService
-
update_vpn_service
(vpn_service, **attrs)¶ Update a vpn service
Parameters: vpn_service – Either the id of a vpn service or a VPNService
instance.Attrs kwargs: The attributes to update on the vpnservice represented by value
.Returns: The updated vpnservice Return type: VPNService
-