OPENSTACKSDK(1)

๐Ÿ“ฆ
version 4.22.0 ยท 2 versions
, in nixpkgs unstable

NAME ๐ŸŒธ

openstacksdk โ€” openstacksdk 4.22.0

Okay bestie, this is the openstacksdk manual page, and it's split into three sections:

  • An installation guide
  • A section for users looking to build applications which make use of OpenStack
  • A section for those looking to contribute to this project

INSTALLATION โœจ

Installation guide ๐ŸŽ€

The OpenStack SDK is available on PyPI at https://pypi.org/project/openstacksdk under the name openstacksdk. To install it, use pip:

$ pip install openstacksdk

To check the installed version you can call the module with:

$ python -m openstack version

FOR USERS ๐Ÿซถ

Using the OpenStack SDK ๐Ÿ’…

This section of documentation pertains to those who wish to use this SDK in their own application. If you're looking for documentation on how to contribute to or extend the SDK, refer to the contributor ../contributor section.

For a listing of terms used throughout the SDK, including the names of projects and services supported by it, see the glossary.

User Guides ๐Ÿงš

These guides walk you through how to make use of the libraries we provide to work with each OpenStack service. If you're looking for a cookbook approach, this is where you'll want to begin.

Getting started ๐ŸŒˆ

openstacksdk aims to talk to any OpenStack cloud. To do this, it requires a configuration file. openstacksdk favours clouds.yaml files, but can also use environment variables. The clouds.yaml file should be provided by your cloud provider or deployment tooling. An example:

clouds:
  mordred:
    region_name: Dallas
    auth:
      username: 'mordred'
      password: XXXXXXX
      project_name: 'demo'
      auth_url: 'https://identity.example.com'

More information on configuring openstacksdk can be found in Configuring OpenStack SDK Applications.

Given sufficient configuration, you can use openstacksdk to interact with your cloud. openstacksdk consists of three layers. Most users will make use of the proxy layer. Using the above clouds.yaml, consider listing servers:

import openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

# Initialize connection
conn = openstack.connect(cloud='mordred')

# List the servers
for server in conn.compute.servers():
    print(server.to_dict())

openstacksdk also contains a higher-level cloud layer based on logical operations:

import openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

# Initialize connection
conn = openstack.connect(cloud='mordred')

# List the servers
for server in conn.list_servers():
    print(server.to_dict())

The benefit of this layer is mostly seen in more complicated operations that take multiple steps and where the steps vary across providers. For example:

import openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

# Initialize connection
conn = openstack.connect(cloud='mordred')

# Upload an image to the cloud
image = conn.create_image(
    'ubuntu-trusty', filename='ubuntu-trusty.qcow2', wait=True)

# Find a flavor with at least 512M of RAM
flavor = conn.get_flavor_by_ram(512)

# Boot a server, wait for it to boot, and then do whatever is needed
# to get a public IP address for it.
conn.create_server(
    'my-server', image=image, flavor=flavor, wait=True, auto_ip=True)

Finally, there is the low-level resource layer. This provides support for the basic CRUD operations supported by REST APIs and is the base building block for the other layers. You typically will not need to use this directly:

import openstack
import openstack.config.loader
import openstack.compute.v2.server

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

# Initialize connection
conn = openstack.connect(cloud='mordred')

# List the servers
for server in openstack.compute.v2.server.Server.list(session=conn.compute):
    print(server.to_dict())

Using os-client-config ๐Ÿ› ๏ธ

Configuring OpenStack SDK Applications โš™๏ธ

Environment Variables ๐Ÿ’ป

openstacksdk honors all of the normal OS_* variables. It does not provide backwards compatibility to service-specific variables such as NOVA_USERNAME.

If you have OpenStack environment variables set, openstacksdk will produce a cloud config object named envvars containing your values from the environment. If you don't like the name envvars, that's okay, you can override it by setting OS_CLOUD_NAME.

Config Files ๐Ÿ“

openstacksdk will look for a file called clouds.yaml in the following locations:

  • . (the current directory)
  • $HOME/.config/openstack (Linux) / ~/Library/Application Support/openstack (macOS) / C:\\Users\\USERNAME\\AppData\\Local\\OpenStack\\openstack (Windows)
  • /etc/openstack (Linux) / /Library/Application Support/openstack (macOS) / C:\\ProgramData\\OpenStack\\openstack (Windows)

The first file found wins.

You can also set the environment variable OS_CLIENT_CONFIG_FILE to an absolute path of a file to look for and that location will be inserted at the front of the file search list.

The keys are all of the keys you'd expect from OS_* except lower case and without the OS prefix. So, region name is set with region_name.

Splitting Secrets ๐Ÿคซ

In some scenarios, such as configuration management controlled environments, it might be easier to have secrets in one file and non-secrets in another. This is fully supported via an optional file secure.yaml which follows all the same location rules as clouds.yaml. It can contain anything you put in clouds.yaml and will take precedence over anything in the clouds.yaml file.

You can also set the environment variable OS_CLIENT_SECURE_FILE to an absolute path of a file to look for and that location will be inserted at the front of the file search list.

Example ๐ŸŒŸ

clouds.yaml

clouds:
  mordred:
    region_name: Dallas
    auth:
      username: 'mordred'
      password: XXXXXXX
      project_name: 'demo'
      auth_url: 'https://identity.example.com'
  mtvexx:
    profile: https://vexxhost.com
    region_name: ca-ymq-1
    dns_api_version: 1
  infra:
    profile: rackspace
    auth:
      username: openstackci
      password: XXXXXXXX
      project_id: 610275
    regions:
    - DFW
    - ORD
    - IAD

secure.yaml

clouds:
  mtvexx:
    auth:
      username: mordred@inaugust.com
      password: XXXXXXXXX
      project_name: mordred@inaugust.com

You may note a few things.

  • Some of the clouds use a profile key and omit things like auth_url. This relies on a feature known as Vendor Profiles, which is described below.
  • regions can be a list of regions. When you call get_all_clouds, you'll get a cloud config object for each cloud/region combo.
  • As seen with dns_api_version, any setting that makes sense to be per-service, like service_type or endpoint or api_version can be set by prefixing the setting with the default service type.

Vendor Profiles ๐Ÿท๏ธ

Vendor profiles are bundled, named sets of default configuration for specific public OpenStack clouds. They exist because different cloud providers make different deployment choices that leak out to end users: different API versions, image formats, whether floating IPs are required, non-standard service types, region lists, and auth_url values. Vendor profiles capture all of this so that you don't have to.

Vendor profiles can be configured using the profile key for a cloud entry, as seen below.

Note: cloud is a deprecated alias for profile. While still supported, its use should be avoided where possible.

Vendor profiles can be provided three ways:

Built-in vendor profiles

openstacksdk bundles vendor profiles for a number of a public cloud providers. These are documented in Vendor Support and can be retrieved using the openstack.config.vendors module:

>>> vendors.profiles()          # list all supported profiles
>>> vendors.get_profile('ovh')  # show defaults for a specific profile

To use one of these built-in vendor profiles, request it by name:

clouds:
  infra:
    profile: ovh
    auth:
      ...

URL-based vendor profiles

You can also request a vendor profile by URL:

clouds:
  infra:
    profile: https://vexxhost.com/
    auth:
      ...

When a URL is provided, openstacksdk will attempt to retrieve a .well-known/openstack/api file. This file will have the same format and be validated against the same schema as an in-tree vendor profile.

Custom vendor profiles (clouds-public.yaml)

Finally, it is possible to provide custom vendor profiles using a clouds-public.yaml file. A clouds-public.yaml file looks very similar to a clouds.yaml / secure.yaml file but is expected to only contain public information (so e.g. no username/password) information. This means they are well suited for things like internal corporate clouds. openstacksdk will search multiple locations for this file, as described for clouds.yaml / secure.yaml above. However, unlike those files, it is not possible to point to a specific file via an environment variable.

public-clouds:
  # The key is the profile name you reference from clouds.yaml via `profile:`
  my-corp-cloud:
    auth:
      auth_url: https://keystone.example.com:5000/v3
    identity_api_version: '3'
    volume_api_version: '3'
    interface: public
    regions:
      - RegionOne
      - RegionTwo

  # A profile can use the {region_name} template, expanded per region
  acme-public:
    auth:
      auth_url: https://{region_name}.acme-cloud.com:5000/v3/
    identity_api_version: '3'
    image_format: raw
    requires_floating_ip: true
    regions:
      - us-east-1
      - eu-west-1

Auth Settings ๐ŸŽ€

okay so bestie, Keystone has auth plugins โ€” which means openstacksdk literally cannot know ahead of time which auth settings youโ€™re gonna need. The default plugin type is password, which is what all things were before plugins came about. To make validation of values possible, every parameter that exists because of your chosen plugin has to go into the auth dict. For password auth, that includes auth_url, username, and password, plus anything related to domains, projects, and trusts. periodt ๐Ÿ’…

MFA Support ๐Ÿซถ

MFA support needs a specially prepared configuration file. In this case you use a combo of two different authorization plugins, and each one has its own requirements for the specified parameters. itโ€™s giving very โ€œbring both your IDsโ€ energy ๐Ÿ˜ญ

          clouds:
            mfa:
              auth_type: "v3multifactor"
              auth_methods:
                - v3password
                - v3totp
              auth:
                auth_url: https://identity.cloud.com
                username: user
                user_id: uid
                password: XXXXXXXXX
                project_name: project
                user_domain_name: udn
                project_domain_name: pdn

API Settings โœจ

These settings get passed to keystoneauth and are common to all services.

  • api_timeout โ€” a timeout for API requests. This should be a numerical value indicating some amount (or fraction) of seconds, or 0 for no timeout. (optional, defaults to 0)
  • collect_timing โ€” whether or not to collect per-method timing information for each API call. (optional, defaults to False)

SSL Settings ๐Ÿ”

When access to a cloud happens over a secure connection, openstacksdk will always verify the SSL cert by default. You can disable that by setting verify to False. If the cert is signed by an unknown CA, you can provide a specific cacert via cacert.

Warning: ๐Ÿšจ verify will always have precedence over cacert, so when you set a CA cert but disable verify, the cloud cert will never be validated. no cap, itโ€™s just not gonna check it.

Client certs are also configurable. cert is the client cert file location. If the cert key is not included within the client cert file, its file location needs to be set via key.

          # clouds.yaml
          clouds:
            regular-secure-cloud:
              auth:
                auth_url: https://signed.cert.domain:5000
                ...
            unknown-ca-with-client-cert-secure-cloud:
              auth:
                auth_url: https://unknown.ca.but.secure.domain:5000
                ...
              key: /home/myhome/client-cert.key
              cert: /home/myhome/client-cert.crt
              cacert: /home/myhome/ca.crt
            self-signed-insecure-cloud:
              auth:
                auth_url: https://self.signed.cert.domain:5000
                ...
              verify: False
Note: for parity with openstack command-line options, the insecure boolean is also recognised โ€” with the opposite semantics to verify; i.e. True ignores certificate failures. This should be considered deprecated for verify. ๐Ÿซ 

Cache Settings ๐Ÿ“

Changed in version 1.0.0: Previously, caching was managed exclusively in the cloud layer. Starting in openstacksdk 1.0.0, caching is moved to the proxy layer. As the cloud layer depends on the proxy layer in 1.0.0, this means both layers can benefit from the cache. iconic behavior honestly ๐Ÿ‘‘

Authenticating and accessing resources on a cloud is often expensive. So itโ€™s super common that applications will wish to do some client-side caching of both credentials and cloud resources. To facilitate this, openstacksdk supports caching credentials and resources using the system keyring and dogpile.cache, respectively.

Tip: ๐Ÿ’ก itโ€™s important to emphasise that openstacksdk does not actually cache anything itself. Rather, it collects and presents the cache information so that your various applications that are connecting to OpenStack can share a cache should you desire. It is important that your cache backend is correctly configured according to the needs of your application.

Caching is enabled or disabled globally, rather than on a cloud-by-cloud basis. This is done by configuring the cache top-level key. Caching of authentication tokens can be configured using the following settings:

  • cache.auth โ€” a boolean indicating whether tokens should be cached in the keyring. When enabled, this allows the consequent connections to the same cloud to skip fetching a new token. When the token expires or is invalidated, openstacksdk will automatically establish a new connection. Defaults to false.

For example, to configure caching of authentication tokens:

          cache:
            auth: true

Caching of resources can be configured using the following settings:

  • cache.expiration_time โ€” the expiration time in seconds for a cache entry. This should be an integer. Defaults to 0.
  • cache.class โ€” the cache backend to use, which can include any backend supported by dogpile.cache natively as well as backend provided by third-part packages. This should be a string. Defaults to dogpile.cache.memory.
  • cache.arguments โ€” a mapping of arbitrary arguments to pass into the cache backend. These are backend specific. Keys should correspond to a configuration option for the configured cache backend. Defaults to {}.
  • cache.expirations โ€” a mapping of resource types to expiration times. The keys should be specified in the same way as the metrics are emitted, by joining meaningful resource URL segments with .. For example, both /servers and /servers/ID should be specified as servers, while /servers/ID/metadata/KEY should be specified as server.metadata. Values should be an expiration time in seconds. A value of -1 indicates that the cache should never expire, while a value of 0 disables caching for the resource. Defaults to {}.

For example, to configure caching with the dogpile.cache.memory backend with a 1 hour expiration:

          cache:
            expiration_time: 3600

To configure caching with the dogpile.cache.memory backend with a 1 hour expiration but only for requests to the OpenStack Compute serviceโ€™s /servers API:

          cache:
            expirations:
              servers: 3600

To configure caching with the dogpile.cache.pylibmc backend with a 1 hour expiration time and a memcached server running on your localhost:

          cache:
            expiration_time: 3600
            arguments:
              url:
              - 127.0.0.1

To configure caching with the dogpile.cache.pylibmc backend with a 1 hour expiration time, a memcached server running on your localhost, and multiple per-resource cache expiration times:

          cache:
            class: dogpile.cache.pylibmc
            expiration_time: 3600
            arguments:
              url:
                - 127.0.0.1
            expiration:
              server: 5
              flavor: -1
              compute.servers: 5
              compute.flavors: -1
              image.images: 5

Finally, if the cache key is undefined, a null cache is enabled meaning caching is effectively disabled.

Note: ๐Ÿง  Non GET requests cause cache invalidation based on the caching key prefix. This means that, for example, a PUT request to /images/ID will invalidate all images cache โ€” list and all individual entries. Moreover it is possible to explicitly pass the skip_cache parameter to the proxy._get function to bypass cache and invalidate what is already there. This is happening automatically in the wait_for_status methods where it is expected that resource will change some of the attributes over the time. Forcing complete cache invalidation can be achieved calling conn._cache.invalidate.

IPv6 ๐Ÿฆ‹

IPv6 is the future, and you should always use it if your cloud supports it and if your local network supports it. Both of those are easily detectable and all friendly software should do the right thing. we love a forward-compatible moment โœจ

However, sometimes a cloud API may return IPv6 information that is not useful to a production deployment. For example, the API may provide an IPv6 address for a server, but not provide that to the host instance via metadata (configdrive) or standard IPv6 autoconfiguration methods โ€” i.e. the host either needs to make a bespoke API call, or otherwise statically configure itself. awkward ๐Ÿ˜ญ

For such situations, you can set the force_ipv4, or OS_FORCE_IPV4 boolean environment variable. For example:

          clouds:
            mtvexx:
              profile: vexxhost
              auth:
                username: mordred@inaugust.com
                password: XXXXXXXXX
                project_name: mordred@inaugust.com
              region_name: ca-ymq-1
              dns_api_version: 1
            monty:
              profile: fooprovider
              force_ipv4: true
              auth:
                username: mordred@inaugust.com
                password: XXXXXXXXX
                project_name: mordred@inaugust.com
              region_name: RegionFoo

The above snippet will tell client programs to prefer the IPv4 address and leave the public_v6 field of the Server object blank for the fooprovider cloud. You can also set this with a client flag for all clouds:

          client:
            force_ipv4: true

Service-specific Overrides ๐Ÿ’…

Service-specific settings, like the Nova service type, are set with the default service type as a prefix. For instance, to set a special service_type for trove (because youโ€™re using Rackspace):

          database_service_type: 'rax:database'

Per-region settings ๐ŸŒธ

Sometimes you have a cloud provider that has config that is common to the cloud, but also with some things you might want to express on a per-region basis. For instance, Internap provides a public and private network specific to the user in each region, and putting the values of those networks into config can make consuming programs more efficient. efficiency queen ๐Ÿ‘‘

To support this, the region list can actually be a list of dicts, and any setting that can be set at the cloud level can be overridden for that region.

          clouds:
            internap:
              profile: internap
              auth:
                password: XXXXXXXXXXXXXXXXX
                username: api-55f9a00fb2619
                project_name: inap-17037
              regions:
              - name: ams01
                values:
                  networks:
                  - name: inap-17037-WAN1654
                    routes_externally: true
                  - name: inap-17037-LAN6745
              - name: nyj01
                values:
                  networks:
                  - name: inap-17037-WAN1654
                    routes_externally: true
                  - name: inap-17037-LAN6745

๐Ÿ’… Setting Precedence

Okay so bestie, some settings are literally redundant โ€” like, project-name and project-id both specify the project, right? So when two redundant settings beef with each other, the _name option in clouds.yaml wins (that's the equivalent -name CLI option and the _NAME environment variable). Slay, name takes it. โœจ

Some environment variables or command line flags can override the settings from clouds.yaml. The way that these ones show up and just take over:

  • --domain-id (OS_DOMAIN_ID)
  • --domain-name (OS_DOMAIN_NAME)
  • --user-domain-id (OS_USER_DOMAIN_ID)
  • --user-domain-name (OS_USER_DOMAIN_NAME)
  • --project-domain-id (OS_PROJECT_DOMAIN_ID)
  • --project-domain-name (OS_PROJECT_DOMAIN_NAME)
  • --auth-token (OS_AUTH_TOKEN)
  • --project-id (OS_PROJECT_ID)
  • --project-name (OS_PROJECT_NAME)
  • --tenant-id (OS_TENANT_ID) (deprecated for --project-id โ€” yeah she's old, moving on ๐Ÿ’€)
  • --tenant-name (OS_TENANT_NAME) (deprecated for --project-name โ€” her too)

Similarly, if one of the above settings is specified in clouds.yaml as part of the auth section as well as the main section, the auth settings get overridden. Like, look at this config section where project is specified multiple times, it's giving "choose your fighter":

clouds:
  mtvexx:
    profile: https://vexxhost.com
    auth:
      username: mordred@inaugust.com
      password: XXXXXXXXX
      project_name: mylessfavoriteproject
      project_id: 0bedab75-898c-4521-a038-0b4b71c41bed
    region_name: ca-ymq-1
    project_name: myfavoriteproject
    project_id: 2acf9403-25e8-479e-a3c6-d67540c424a4

In the above example, the project_id configuration values will be ignored in favor of the project_name configuration values, and the higher-level project will be chosen over the auth-specified project. So the actual project used will be myfavoriteproject. Periodt. ๐Ÿ‘‘


๐ŸŒธ Examples

auth

Password-based authentication (project-scoped) โ€” the classic, the icon:

example:
    auth:
        auth_url: http://example.com/identity
        password: password
        project_domain_id: default
        project_name: admin
        user_domain_id: default
        username: admin
    region_name: RegionOne

Password-based authentication (domain-scoped):

example:
    auth:
        auth_url: http://example.com/identity
        domain_id: default
        password: password
        username: admin
    region_name: RegionOne

Password-based authentication (trust-scoped):

example-trust:
    auth:
        auth_url: http://example.com/identity
        password: password
        username: admin
        trust_id: 95946f9eef864fdc993079d8fe3e5747
    region_name: RegionOne

Password-based authentication (system-scoped):

example-system:
    auth:
        auth_url: http://example.com/identity
        password: password
        system_scope: all
        username: admin
    region_name: RegionOne

Application credential-based authentication:

example-appcred:
    auth:
        auth_url: http://example.com/identity
        application_credential_id: 9da0a8da3d394d09bf49dfc27014d254
        application_credential_secret: pKfDSvUOFwO2t2_XxCajAFhzCKAVHI7yfqPb6xjshVDnMUHF7ifju8gMdhHTI4Eo56UP_hEc8ssmgA1NNtKMpA
    auth_type: v3applicationcredential
    region_name: RegionOne

Token-based authentication:

example-token:
    auth:
        auth_url: http://example.com/identity
        token: gAAAAABl32ptw2PN6L9JyBeO16PwQU1SrdMUvUz8Eon7LC2PFItdGRWFpOkK0qwH3JkukTuEM5qbYK9ucowRXET1RBMjZlfVpUa8Nz3qjQdzXw7pBKH4w1e4tekvDCOKfn15ZoujBOvdGqgtpW-febVGaW9oJzf6R3WTMDxWz3YRJjmiOBpwcN8
        project_id: 1fd93a4455c74d2ea94b929fc5f0e488
    auth_type: v3token
    region_name: RegionOne
๐Ÿซถ Note: This is a toy example: by their very definition tokens are short-lived. You are unlikely to store them in a clouds.yaml file. Instead, you would likely pass the TOTP token via the command line (--os-token) or as an environment variable (OS_TOKEN).

TOTP-based authentication:

example-totp:
    auth:
        auth_url: http://example.com/identity
        passcode: password
        project_domain_id: default
        project_name: admin
        user_domain_id: default
        username: admin
    auth_type: v3totp
    region_name: RegionOne
๐Ÿซถ Note: This is a toy example: by their very definition TOTP tokens are short-lived. You are unlikely to store them in a clouds.yaml file. Instead, you would likely pass the TOTP token via the command line (--os-passcode) or as an environment variable (OS_PASSCODE).

OAuth1-based authentication:

example-oauth:
    auth:
        auth_url: http://example.com/identity
        consumer_key: foo
        consumer_secret: secret
        access_key: bar
        access_secret: secret
    auth_type: v3oauth1
    region_name: RegionOne

๐Ÿฆ‹ Using openstack.config in an Application

Usage

The simplest and least useful thing you can do is honestly iconic in its uselessness:

python -m openstack.config.loader

Which will print out whatever it finds for your config. If you want to use it from python โ€” which is much more likely what you actually want to do, bestie โ€” things like this:

Get a named cloud:

import openstack.config

cloud_region = openstack.config.OpenStackConfig().get_one(
    'internap', region_name='ams01')
print(cloud_region.name, cloud_region.region, cloud_region.config)

Or, get all of the clouds:

import openstack.config

cloud_regions = openstack.config.OpenStackConfig().get_all()
for cloud_region in cloud_regions:
    print(cloud_region.name, cloud_region.region, cloud_region.config)

argparse

If you're using openstack.config from a program that wants to process command line options, there's a registration function to register the arguments that both openstack.config and keystoneauth know how to deal with โ€” plus a consumption argument. It's giving teamwork, it's giving synergy:

import argparse

import openstack

parser = argparse.ArgumentParser()
cloud = openstack.connect(options=parser)

๐ŸŒˆ Vendor Support

OpenStack presents deployers with many options, some of which can expose differences to end users. openstacksdk tries its best to collect information about various things a user would need to know. The following is a text representation of the vendor related defaults openstacksdk knows about. Ngl it's a whole vibe check of the cloud landscape. ๐Ÿ’œ

Default Values

These are the default behaviors unless a cloud is configured differently:

  • Identity uses password authentication
  • Identity API Version is 2
  • Image API Version is 2
  • Volume API Version is 2
  • Compute API Version is 2.1
  • Images must be in qcow2 format
  • Images are uploaded using PUT interface
  • Public IPv4 is directly routable via DHCP from Neutron
  • IPv6 is not provided
  • Floating IPs are not required
  • Floating IPs are provided by Neutron
  • Security groups are provided by Neutron
  • Vendor specific agents are not used

AURO

https://api.auro.io:5000/v2.0

Regions, bestie:

  • van1 โ€” Vancouver, BC

And the deets:

  • Public IPv4 is provided via NAT with Neutron Floating IP

Betacloud

https://api-1.betacloud.de:5000

Regions:

  • betacloud-1 โ€” Karlsruhe, Germany

And the deets:

  • Identity API Version is 3
  • Images must be in raw format
  • Public IPv4 is provided via NAT with Neutron Floating IP
  • Volume API Version is 3

Binero

https://auth.binero.cloud:5000/v3

Regions:

  • europe-se-1 โ€” Stockholm, SE

And the deets:

  • Identity API Version is 3
  • Volume API Version is 3
  • Public IPv4 is directly routable via DHCP from Neutron
  • Public IPv4 is provided via NAT with Neutron Floating IP

Catalyst

https://api.cloud.catalyst.net.nz:5000/v2.0

Regions:

  • nz-por-1 โ€” Porirua, NZ
  • nz_wlg_2 โ€” Wellington, NZ

And the deets:

  • Identity API Version is 3
  • Compute API Version is 2
  • Images must be in raw format
  • Volume API Version is 3

โ˜๏ธ City Cloud

URL: https://%(region_name)s.citycloud.com:5000/v3/

Regions, bestie:

  • Buf1 โ€” Buffalo, NY
  • dx1 โ€” Dubai, UAE
  • Fra1 โ€” Frankfurt, DE
  • Kna1 โ€” Karlskrona, SE
  • Lon1 โ€” London, UK
  • Sto2 โ€” Stockholm, SE
  • tky1 โ€” Tokyo, JP

The facts:

  • Identity API Version is 3
  • Public IPv4 is provided via NAT with Neutron Floating IP
  • Volume API Version is 1

๐ŸŒธ ConoHa

URL: https://identity.%(region_name)s.conoha.io

Regions:

  • tyo1 โ€” Tokyo, JP
  • sin1 โ€” Singapore
  • sjc1 โ€” San Jose, CA

Important note:

  • Image upload is not supported ๐Ÿซ 

๐Ÿฆ‹ DreamCompute

URL: https://iad2.dream.io:5000

Region:

  • RegionOne โ€” Ashburn, VA

The details:

  • Identity API Version is 3
  • Images must be in raw format
  • IPv6 is provided to every server

๐Ÿ‘‘ Open Telekom Cloud

URL: https://iam.%(region_name)s.otc.t-systems.com/v3

Regions:

  • eu-de โ€” Biere/Magdeburg, DE
  • eu-nl โ€” Amsterdam, NL

The facts:

  • Identity API Version is 3
  • Public IPv4 is provided via NAT with Neutron Floating IP

โœจ ELASTX

URL: https://ops.elastx.cloud:5000/v3

Region:

  • se-sto โ€” Stockholm, SE

The details:

  • Identity API Version is 3
  • Public IPv4 is provided via NAT with Neutron Floating IP

๐ŸŽ€ Enter Cloud Suite

URL: https://api.entercloudsuite.com/v2.0

Regions:

  • nl-ams1 โ€” Amsterdam, NL
  • it-mil1 โ€” Milan, IT
  • de-fra1 โ€” Frankfurt, DE

The fact:

  • Compute API Version is 2

๐Ÿ“ Fuga

URL: https://identity.api.fuga.io:5000

Region:

  • cystack โ€” Netherlands

The details:

  • Identity API Version is 3
  • Volume API Version is 3

๐Ÿ’œ Internap

URL: https://identity.api.cloud.inap.com/v2.0

Regions:

  • ams01 โ€” Amsterdam, NL
  • da01 โ€” Dallas, TX
  • nyj01 โ€” New York, NY
  • sin01 โ€” Singapore
  • sjc01 โ€” San Jose, CA

Important note:

  • Floating IPs are not supported

๐ŸŒˆ Limestone Networks

URL: https://auth.cloud.lstn.net:5000/v3

Regions:

  • us-dfw-1 โ€” Dallas, TX
  • us-slc โ€” Salt Lake City, UT

The details:

  • Identity API Version is 3
  • Images must be in raw format
  • IPv6 is provided to every server connected to the Public Internet network

๐Ÿ’ซ OVH

URL: https://auth.cloud.ovh.net/v3

Regions:

  • BHS1 โ€” Beauharnois, QC
  • SBG1 โ€” Strassbourg, FR
  • GRA1 โ€” Gravelines, FR

The details:

  • Images may be in raw format. The qcow2 default is also supported
  • Floating IPs are not supported

โญ Rackspace

URL: https://identity.api.rackspacecloud.com/v2.0/

Regions:

  • DFW โ€” Dallas, TX
  • HKG โ€” Hong Kong
  • IAD โ€” Washington, D.C.
  • LON โ€” London, UK
  • ORD โ€” Chicago, IL
  • SYD โ€” Sydney, NSW

The full rundown:

  • Database Service Type is rax:database
  • Compute Service Name is cloudServersOpenStack
  • Images must be in vhd format
  • Images must be uploaded using the Glance Task Interface
  • Floating IPs are not supported
  • Public IPv4 is directly routable via static config by Nova
  • IPv6 is provided to every server
  • Security groups are not supported
  • Uploaded Images need properties to not use vendor agent:: :vm_mode: hvm and :xenapi_use_agent: False ๐Ÿ’…
  • Block Storage API Version is 2
  • The Block Storage API supports version 2 but only version 1 is in the catalog. The Block Storage endpoint is <https:/>/{region_name}.blockstorage.api.rackspacecloud.com/v2/{project_id}
  • While passwords are recommended for use, API keys do work as well. The rackspaceauth python package must be installed, and then the following can be added to clouds.yaml:
auth:
  username: myusername
  api_key: myapikey
auth_type: rackspace_apikey

๐ŸŒธ Switch Cloud ๐ŸŒธ

https://identity.compute.cloud.switch.ch/v3

Regions:

  • zhw โ€” Zurich West, CH
  • zhc โ€” Zurich Central, CH
  • Identity API Version is 3
  • Compute API Version is 2
  • Volume API Version is 3
  • Images must be in raw format
  • Public IPv4 is provided via NAT with Neutron Floating IP
  • IPv6 is provided to every server

๐Ÿฆ‹ SWITCHengines ๐Ÿฆ‹

https://keystone.cloud.switch.ch:5000/v3

Regions:

  • LS โ€” Lausanne, CH
  • ZH โ€” Zurich, CH
  • Identity API Version is 3
  • Compute API Version is 2
  • Images must be in raw format
  • Volume API Version is 3

๐ŸŽ€ Ultimum ๐ŸŽ€

https://console.ultimum-cloud.com:5000/v2.0

Regions:

  • RegionOne โ€” Prague, CZ
  • Volume API Version is 1

โญ UnitedStack โญ

https://identity.api.ustack.com/v3

Regions:

  • bj1 โ€” Beijing, CN
  • gd1 โ€” Guangdong, CN
  • Identity API Version is 3
  • Images must be in raw format
  • Volume API Version is 1

๐Ÿ’œ VEXXHOST ๐Ÿ’œ

http://auth.vexxhost.net

Regions:

  • ca-ymq-1 โ€” Montreal, QC
  • sjc1 โ€” Santa Clara, CA
  • DNS API Version is 1
  • Identity API Version is 3
  • Volume API Version is 3

๐ŸŒˆ Zetta ๐ŸŒˆ

https://identity.api.zetta.io/v3

Regions:

  • no-osl1 โ€” Oslo, NO
  • DNS API Version is 2
  • Identity API Version is 3

๐Ÿงš Network Config ๐Ÿงš

There are several different qualities that networks in OpenStack might have that might not be able to be automatically inferred from the available metadata. To help users navigate more complex setups, os-client-config allows configuring a list of network metadata.

clouds:
  amazing:
    networks:
    - name: blue
      routes_externally: true
    - name: purple
      routes_externally: true
      default_interface: true
    - name: green
      routes_externally: false
    - name: yellow
      routes_externally: false
      nat_destination: true
    - name: chartreuse
      routes_externally: false
      routes_ipv6_externally: true
    - name: aubergine
      routes_ipv4_externally: false
      routes_ipv6_externally: true

Every entry must have a name field, which can hold either the name or the id of the network.

routes_externally is a boolean field that labels the network as handling north/south traffic off of the cloud. In a public cloud this might be thought of as the "public" network, but in private clouds it's possible it might be an RFC1918 address. In either case, it provides IPs to servers that things not on the cloud can use. This value defaults to false, which indicates only servers on the same network can talk to it.

routes_ipv4_externally and routes_ipv6_externally are boolean fields to help handle routes_externally in the case where a network has a split stack with different values for IPv4 and IPv6. Either entry, if not given, defaults to the value of routes_externally.

default_interface is a boolean field that indicates that the network is the one that programs should use. It defaults to false. An example of needing to use this value is a cloud with two private networks, and where a user is running ansible in one of the servers to talk to other servers on the private network. Because both networks are private, there would otherwise be no way to determine which one should be used for the traffic.

There can only be one default_interface per cloud. ๐Ÿ‘‘

nat_destination is a boolean field that indicates which network floating ips should be attached to. It defaults to false. Normally this can be inferred by looking for a network that has subnets that have a gateway_ip. But it's possible to have more than one network that satisfies that condition, so the user might want to tell programs which one to pick.

There can be only one nat_destination per cloud. ๐Ÿ’…

nat_source is a boolean field that indicates which network floating ips should be requested from. It defaults to false. Normally this can be inferred by looking for a network that is attached to a router. But it's possible to have more than one network that satisfies that condition, so the user might want to tell programs which one to pick.

There can be only one nat_source per cloud. periodt ๐Ÿ’€

๐Ÿ“š API Reference ๐Ÿ“š

class openstack.config.OpenStackConfig(config_files=None,
vendor_files=None, override_defaults=None, force_ipv4=None,
envvar_prefix=None, secure_files=None, pw_func=None,
session_constructor=None, app_name=None, app_version=None,
load_yaml_config=True, load_envvars=True, statsd_host=None,
statsd_port=None, statsd_prefix=None, statsd_config=None,
influxdb_config=None)
  • config_filename โ€” the filename that configuration was loaded from, if any.
  • secure_config_filename โ€” the filename that secure configuration was loaded from, if any.
  • cloud_config โ€” contains the combined loaded configuration.
  • get_extra_config(key, defaults=None) โ€” Fetch an arbitrary extra chunk of config, laying in defaults.

Parameters:

  • key (string) โ€” name of the config section to fetch
  • defaults (dict) โ€” (optional) default values to merge under the found config
  • register_argparse_arguments(parser, argv, service_keys=None) โ€” Register all of the common argparse options needed.

Given an argparse parser, register the keystoneauth Session arguments, the keystoneauth Auth Plugin Options and os-cloud. Also, peek in the argv to see if all of the auth plugin options should be registered or merely the ones already configured.

Parameters:

  • argparse.ArgumentParser โ€” parser to attach argparse options to
  • argv โ€” the arguments provided to the application
  • service_keys (string) โ€” Service or list of services this argparse should be specialized for, if known. The first item in the list will be used as the default value for service_type (optional)

Raises: exceptions.ConfigException if an invalid auth-type is requested ๐Ÿซถ

  • auth_config_hook(config) โ€” Allow examination of config values before loading auth plugin.

OpenStackClient will override this to perform additional checks on auth_type.

  • option_prompt(config, p_opt) โ€” Prompt user for option that requires a value.
  • magic_fixes(config) โ€” Perform the set of magic argument fixups.
  • get_one(cloud=None, validate=True, argparse=None, **kwargs) โ€” Retrieve a single CloudRegion and merge additional options

Parameters

  • cloud (string) โ€” the name of the configuration to load out of clouds.yaml โœจ
  • validate (boolean) โ€” do we validate the config? Set this to False and, like, no auth plugin gets created at all. It's honestly really only useful for testing ๐Ÿงช
  • argparse (Namespace) โ€” an argparse Namespace object; it lets you pass argparse options straight in so they get added to the cloud config. Values of None and '' get removed ๐Ÿซถ
  • region_name โ€” the name of the region of the cloud.
  • kwargs โ€” additional configuration options.

Returns ๐Ÿ’– openstack.config.cloud_region.CloudRegion

Raises keystoneauth1.exceptions.MissingRequiredOptions when required auth parameters are missing ๐Ÿ˜ญ


get_one_cloud_osc(cloud=None, validate=True, argparse=None, **kwargs)

Grab a single CloudRegion and merge extra options into it, bestie ๐ŸŒธ

Parameters

  • cloud (string) โ€” the name of the configuration to load from clouds.yaml โœจ
  • validate (boolean) โ€” do we validate the config? Set it to False and no auth plugin gets created. It's really only useful for testing ๐Ÿงช
  • argparse (Namespace) โ€” an argparse Namespace object; lets you pass argparse options directly in so they get added to the cloud config. Values of None and '' will be removed ๐Ÿ’…
  • region_name โ€” the name of the region of the cloud.
  • kwargs โ€” additional configuration options.

Raises keystoneauth1.exceptions.MissingRequiredOptions on missing required auth parameters ๐Ÿ˜ญ


static set_one_cloud(config_file, cloud, set_config=None)

Set up one single cloud configuration, no cap ๐Ÿ‘‘

Parameters

  • config_file (string) โ€” the path to the config file you want to edit. If this file doesn't exist, it literally gets created for you ๐ŸŽ€
  • cloud (string) โ€” the name of the configuration to save to clouds.yaml
  • set_config (dict) โ€” the configuration options to be set.

class openstack.config.cloud_region.CloudRegion(...)

class openstack.config.cloud_region.CloudRegion(name=None,
region_name=None, config=None, force_ipv4=False, auth_plugin=None,
openstack_config=None, session_constructor=None, app_name=None,
app_version=None, session=None, discovery_cache=None, extra_config=None,
cache_expiration_time=0, cache_expirations=None, cache_path=None,
cache_class='dogpile.cache.null', cache_arguments=None,
password_callback=None, statsd_host=None, statsd_port=None,
statsd_prefix=None, statsd_config=None, influxdb_config=None,
prometheus_config=None, collector_registry=None, cache_auth=False)

The configuration for a Region of an OpenStack Cloud ๐Ÿฆ‹

A CloudRegion wraps up all the config info you need to connect to every single service in a Region of a Cloud. It's giving "one object to rule them all" energy ๐Ÿ‘‘

Parameters

  • name โ€” the name of the CloudRegion. If you don't pass one, it gets derived from the hostname of the authentication URL, falling back to app_name if the auth plugin isn't an identity plugin ๐Ÿงš
  • region_name โ€” the default region name for all services in this CloudRegion. If both region_name and config['region_name'] are specified, the kwarg wins (precedence, periodt). It can still be overridden for a given ${service} via a ${service}_region_name key in the config dict โœจ
  • config โ€” a dict of configuration values for the CloudRegion and its services. The key for a ${config_option} of a specific ${service} should be ${service}_${config_option}. So like, to configure the endpoint_override for the block_storage service, the config dict should contain:
'block_storage_endpoint_override': 'http://...'

And if you want to provide a default that's used whenever there's no service-specific override? Just use the unprefixed ${config_option} as the service key, like:

'interface': 'public'
  • force_ipv4 โ€” if True, force the use of IPv4 addresses when connecting to services.
  • auth_plugin โ€” a keystoneauth1 auth plugin used to authenticate with the cloud.
  • openstack_config โ€” the OpenStackConfig object that created this CloudRegion, if any.
  • session_constructor โ€” a callable used to construct the keystoneauth1 Session for this region. Defaults to keystoneauth1.session.Session.
  • app_name โ€” the name of the application connecting to the cloud. Used to construct the User-Agent header ๐Ÿ’…
  • app_version โ€” the version of the application connecting to the cloud. Used to construct the User-Agent header.
  • session โ€” an existing authenticated keystoneauth1 Session to use. If you don't pass one, it gets constructed as needed using session_constructor.
  • discovery_cache โ€” a dict used to cache API version discovery documents, keyed by URL. It's shared across services so you don't make duplicate discovery requests ๐ŸŽ€
  • extra_config โ€” a dict of additional, arbitrary config sections that don't correspond to a service. You can get to it via get_client_config().
  • cache_expiration_time โ€” the default time, in seconds, to cache the results of API calls. A value of 0 disables caching ๐Ÿšซ
  • cache_expirations โ€” a dict mapping resource names to per-resource cache expiration times, in seconds. Overrides cache_expiration_time for those given resources.
  • cache_path โ€” the filesystem path to use for the cache, if you're using a file-based cache backend.
  • cache_class โ€” the dogpile.cache backend to use for caching. Defaults to 'dogpile.cache.null', which disables caching.
  • cache_arguments โ€” a dict of arguments to pass to the dogpile.cache backend.
  • password_callback โ€” a callable invoked to prompt for a password when one is required but not otherwise available ๐Ÿ™ˆ
  • statsd_host โ€” DEPRECATED. Use statsd_config instead.
  • statsd_port โ€” DEPRECATED. Use statsd_config instead.
  • statsd_prefix โ€” DEPRECATED. Use statsd_config instead.
  • statsd_config โ€” configuration for reporting API call metrics to statsd ๐Ÿ“Š
  • influxdb_config โ€” configuration for reporting API call metrics to InfluxDB. DEPRECATED: InfluxDB support relies on a deprecated library and will be removed in a future release ๐Ÿ’€
  • collector_registry โ€” a prometheus_client CollectorRegistry used to report API call metrics to Prometheus.
  • cache_auth โ€” if True, cache authentication tokens (using the keyring library) so they can be reused across processes ๐Ÿ”‘

property full_name

Returns a string that can be used as an identifier ๐Ÿท๏ธ

It always returns a valid string, bestie. You'll get name and region_name, or just one of the two if only one is set, or else 'unknown'.


set_session_constructor(session_constructor)

Sets the Session constructor. That's it, that's the whole vibe ๐Ÿ’…


get_requests_verify_args()

Returns the verify and cert values for the requests library ๐Ÿซถ


get_services()

Returns a list of service types we know something about โœจ


get_endpoint_from_catalog(service_type, interface=None, region_name=None)

Returns the endpoint for a given service as found in the catalog ๐Ÿ“–

If you want values that respect endpoint overrides, go look at endpoint_for() <#openstack.connection.Connection.endpoint_for> instead.

Parameters

  • service_type โ€” service type of the endpoint you're searching for.
  • interface โ€” interface of the endpoint you're searching for. Optional; defaults to the configured value for interface for this Connection.
  • region_name โ€” region name of the endpoint you're searching for. Optional; defaults to the configured value for region_name for this Connection.

Returns the endpoint of the service, or None if it's not found ๐Ÿ˜ญ


get_auth()

Returns a keystoneauth plugin built from the auth credentials ๐Ÿ”‘


clear_auth_cache()

Discard any authentication that got cached for this cloud ๐Ÿงน

Both the copy kept in the keyring and the state the plugin holds in memory get dropped, so that a connection already built from this region can't keep using the credential and write it back when it closes. The next authentication starts from scratch, which โ€” for an interactive plugin โ€” means asking the user again ๐Ÿ™ˆ Use this when the cached credential is known to be unusable, like after it's been revoked, or when you want a different account.

Unlike loading and storing, this does not require cache.auth to be enabled, and it doesn't need a keyring to be available: the in-memory state gets dropped regardless. A credential cached while caching was on has to be removable once it's been turned off, otherwise the stale entry would just get reused the next time caching is enabled. Periodt ๐ŸŽ€

insert_user_agent()

Set sdk information into the user agent of the Session ๐Ÿฆ‹

โš ๏ธ Warning: this method lives here purely so os-client-config can use it. It's a hook point โ€” that's literally its whole job โ€” so that os-client-config can provide backwards compatibility and still hang out in the User Agent for the people using os-client-config directly. Bestie, if that's not you, keep scrolling. ๐Ÿ’…

Normal consumers of the SDK should use app_name and app_version. But if someone else writes a subclass of CloudRegion, it may be desirable. iykyk.

โœจ get_session()

Returns a keystoneauth session based on the auth credentials. That's it, that's the tweet. ๐ŸŽ€

โœจ get_service_catalog()

Helper method to grab the service catalog. Lowkey does exactly what it says on the tin.

โœจ get_all_version_data(service_type)

Retrieve version data for the given service. Obsessed with a method that tells you the truth.

Parameters

  • service_type โ€” the service to fetch version data for.

Returns

A ~keystoneauth1.discover.VersionData object containing the version data for the requested service. Slay. โœจ

โœจ get_session_client(service_type, version=None, constructor=None, **kwargs)

Return a prepped keystoneauth Adapter for a given service.

This one's for making direct requests calls against a 'mounted' endpoint. So if you do:

client = get_session_client('compute')

then you can do:

client.get('/flavors')

and it will work like you think. No cap. ๐Ÿซถ

โœจ get_session_endpoint(service_type, min_version=None, max_version=None)

Return the endpoint from config or the catalog.

If a configuration lists an explicit endpoint for a service, return that. Otherwise, fetch the service catalog from the keystone session and return the appropriate endpoint. Iconic behaviour, honestly.

Parameters

  • service_type โ€” official service type of service

โœจ get_cache_resource_expiration(resource, default=None)

Get expiration time for a resource.

Parameters

  • resource โ€” name of the resource type
  • default โ€” default value to return if not found (optional, defaults to None)

Returns

Expiration time for the resource type as float or default. ๐ŸŒธ

โœจ requires_floating_ip()

Return whether or not this cloud requires floating ips.

Returns

True or False if known, None if discovery is needed. And if requires_floating_ip isn't configured but the cloud is known to not provide floating ips, it will return False. She's thorough like that. ๐Ÿ’€

โœจ get_external_networks()

Get list of network names for external networks.

โœจ get_external_ipv4_networks()

Get list of network names for external IPv4 networks.

โœจ get_external_ipv6_networks()

Get list of network names for external IPv6 networks.

โœจ get_internal_networks()

Get list of network names for internal networks.

โœจ get_internal_ipv4_networks()

Get list of network names for internal IPv4 networks.

โœจ get_internal_ipv6_networks()

Get list of network names for internal IPv6 networks.

โœจ get_default_network()

Get network used for default interactions. The main character network, if you will. ๐Ÿ‘‘

โœจ get_nat_destination()

Get network used for NAT destination.

โœจ get_nat_source()

Get network used for NAT source.

โœจ get_client_config(name=None, defaults=None)

Get config settings for a named client.

Settings will also be looked for in a section called 'client'. If settings are found in both, they get merged โ€” with the settings from the named section winning over the settings from the client section, and both of them winning over the provided defaults. Hierarchy! We love a clear priority order. ๐ŸŽ€

Parameters

  • name (string) โ€” name of the config section to look for.
  • defaults (dict) โ€” default settings to use.

Returns

A dict containing merged settings from the named section, the client section and the defaults. Gorgeous. โœจ


๐ŸŒˆ Connect ๐ŸŒˆ

Okay so to work with an OpenStack cloud you first need to create a Connection <#openstack.connection.Connection> to it using your credentials. You can create a connection in a number of ways: using a configuration file, environment variables, or explicit keyword arguments, as illustrated below. Pick your fighter. ๐Ÿ’…

It is recommended to use Config Files <#config-clouds-yaml> because the same configuration file can be shared across tools and languages. For a comprehensive overview of configuration handling in openstacksdk, see the Using os-client-config <> guide. It's giving "one config to rule them all". ๐Ÿฆ‹

โœจ Create a connection via a configuration file โœจ

To create a connection via a configuration file, you need a YAML file called clouds.yaml. A simple clouds.yaml file looks like the following:

clouds:
  mycloud:
    auth:
      auth_url: https://identity.example.com/v3
      username: "my-username"
      password: "secret-password"
      project_name: "my-project"
      user_domain_name: "Default"
      project_domain_name: "Default"
    region_name: "RegionOne"

To create a Connection <#openstack.connection.Connection> instance using this file, use the connect() factory function and pass the name of the cloud configuration:

def create_connection_from_config():
    return openstack.connect(cloud=TEST_CLOUD)

For more details on the format of clouds.yaml, including standard file locations and profile inheritance, refer to Config Files <#config-clouds-yaml>. Literally all the deets are in there. ๐Ÿ“

โœจ Command-line options (argparse) โœจ

If you're writing a command-line application, connect() can integrate directly with Python's standard argparse library. Bestie, it's seamless.

When you pass an argparse.ArgumentParser instance via the options parameter, openstacksdk registers its standard options (such as --os-cloud) along with all keystoneauth <https://docs.openstack.org/keystoneauth/latest/> authentication and session options (such as --os-auth-url, --os-username, and --insecure). It then parses sys.argv to configure the connection. This lets your application define its own CLI arguments on the parser while letting openstacksdk handle all the OpenStack configuration flags. Chef's kiss. ๐Ÿ‘‘

def create_connection_from_args():
    parser = argparse.ArgumentParser()
    return openstack.connect(options=parser)

โœจ Create a connection via environment variables โœจ

You can also build a connection from OS_-prefixed environment variables. If you have the standard OpenStack environment variables set โ€” for example, by sourcing an openrc file โ€” you can create a connection without any additional configuration:

import openstack

conn = openstack.connect()

When no cloud name is given, connect() loads its configuration from the environment. For the full list of supported environment variables, refer to Environment Variables <#config-environment-variables>. Env vars my beloved. ๐ŸŒฑ

โœจ Create a connection via explicit arguments โœจ

To create a Connection <#openstack.connection.Connection> instance via explicit keyword arguments, pass the connection parameters directly to connect():

def create_connection(
    auth_url,
    region,
    project_name,
    username,
    password,
    user_domain,
    project_domain,
):
    return openstack.connect(
        auth_url=auth_url,
        project_name=project_name,
        username=username,
        password=password,
        region_name=region,
        user_domain_name=user_domain,
        project_domain_name=project_domain,
        app_name='examples',
        app_version='1.0',
    )
Note: To enable logging, see the Logging <> user guide. ๐Ÿ‘€
See also: For service-to-service communication requiring service tokens, refer to the Service Tokens <> guide. ๐Ÿ”‘

โœจ Next โœจ

Now that you can create a connection, continue with the User Guides <#user-guides> to work with an OpenStack service. Go off, you've got this. ๐Ÿซถโœจ


๐ŸŒธ Logging ๐ŸŒธ

openstacksdk uses Python Logging. And because openstacksdk is a library, it does not configure logging handlers automatically โ€” it expects that to be the purview of the consuming application. Respect the boundaries, basically. ๐Ÿ’…

โœจ Simple Usage โœจ

For consumers who just want a basic logging setup without thinking about it too deeply, there's a helper method. If you use it, it should be called before any other openstacksdk functionality. Like, before. First thing. No cap. โญ

openstack.enable_logging(debug=False, http_debug=False, path=None, stream=None, format_stream=False, format_template='%(asctime)s %(levelname)s: %(name)s %(message)s', handlers=None)

Enable logging output.

Helper function to enable logging. This function is available for debugging purposes and for folks doing simple applications who want an easy "just make it work for me". For more complex applications or for those who want more flexibility, the standard library logging package will receive these messages in any handlers you create. ๐ŸŽ€

Parameters

  • debug (bool) โ€” set this to True to receive debug messages.
  • http_debug (bool) โ€” set this to True to receive debug messages including HTTP requests and responses. This implies debug=True. Yes, it's a two-for-one. ๐Ÿ’€
  • path (str) โ€” if a path is specified, logging output will be written to that file in addition to sys.stderr. The path is passed to logging.FileHandler, which will append messages to the file (and create it if needed).
  • stream โ€” one of None or sys.stdout or sys.stderr. If it is None, nothing is logged to a stream. If it isn't None, console output is logged to this stream.
  • format_stream (bool) โ€” if format_stream is False, the default, apply format_template to path but not to stream outputs. If True, apply format_template to stream outputs as well.
  • format_template (str) โ€” template to pass to logging.Formatter.

Return type

None โ€” she gives you nothing back and honestly? That's fine. ๐ŸŒˆ

import openstack
openstack.enable_logging()

The stream parameter controls where the log messages get written. It defaults to sys.stdout, which means log messages land on STDOUT. You can point it at another output stream, or set it to None to turn off console logging entirely.

The path parameter sets up logging to a file. By default, if path is given and stream is not, logging only goes to path.

You can combine the path and stream parameters to log to both places at the same time.

To log messages to a file called openstack.log and to the console on stdout:

import sys
import openstack

openstack.enable_logging(
    debug=True, path='openstack.log', stream=sys.stdout)

openstack.enable_logging also sets up a few other loggers and squelches some warnings or log messages that are otherwise uninteresting or unactionable by an openstacksdk user.

โœจ Advanced Usage โœจ

openstacksdk logs to a set of different named loggers.

Most of the logging is set up to log to the root openstack logger. There are additional sub-loggers that are used at times, primarily so that a user can decide to turn on or off a specific type of logging. They are listed below.

  • openstack.config โ€” issues pertaining to configuration are logged to the openstack.config logger.
  • openstack.iterate_timeout โ€” when openstacksdk needs to poll a resource, it does so in a loop that waits between iterations and ultimately times out. The openstack.iterate_timeout logger emits messages for each iteration indicating it is waiting and for how long. These can be useful to see for long running tasks so that one can know things are not stuck, but can also be noisy.
  • openstack.fnmatch โ€” openstacksdk will try to use fnmatch (https://pymotw.com/2/fnmatch/) on given name_or_id arguments. Itโ€™s a best effort attempt, so pattern misses are logged to openstack.fnmatch. A user may not be intending to use an fnmatch pattern โ€” such as if they are trying to find an image named Fedora 24 [official], so these messages are logged separately.

๐ŸŒˆ HTTP Tracing ๐ŸŒˆ

HTTP interactions are handled by keystoneauth (https://docs.openstack.org/keystoneauth/latest/). If you want to enable HTTP tracing while using openstacksdk and are not using openstack.enable_logging, set the log level of the keystoneauth logger to DEBUG.

For more information see https://docs.openstack.org/keystoneauth/latest/using-sessions.html#logging

๐Ÿฆ‹ Python Logging ๐Ÿฆ‹

Python logging is a standard feature of Python and is documented fully in the Python Documentation.

For more information on Python Logging, see https://docs.python.org/3/library/logging.html.

๐ŸŒธ Statistics reporting ๐ŸŒธ

openstacksdk can report statistics on individual API requests/responses in several different formats.

Note: metrics will be reported only when corresponding client libraries (statsd for 'statsd' reporting, influxdb for influxdb, etc.) are installed. If libraries are not available then reporting will be silently ignored.

๐Ÿ’… statsd ๐Ÿ’…

statsd (https://github.com/statsd/statsd) reporting can be configured via configuration entries or environment variables.

A global metrics entry defines defaults for all clouds. Each cloud can specify a metrics section to override variables; this may be useful to separate results reported for each cloud.

metrics:
  statsd:
    host: __statsd_server_host__
    port: __statsd_server_port__
    prefix: __statsd_prefix__ (default 'openstack.api')
clouds:
  a-cloud:
    auth:
     ...
    metrics:
      statsd:
        prefix: 'openstack.api.a-cloud'

If the STATSD_HOST, STATSD_PORT, or STATSD_PREFIX environment variables are set, they will be taken as the default values (and enable statsd reporting if no other configuration is specified).

Alternatively, statsd can be configured programmatically by passing a statsd_config dict to CloudRegion (#openstack.config.cloud_region.CloudRegion):

import openstack.config

config = openstack.config.OpenStackConfig()
cloud = config.get_one_cloud(
    cloud='my-cloud',
    statsd_config={
        'host': 'statsd.example.com',
        'port': 8125,
        'prefix': 'openstack.api.my-cloud',
    },
)

๐ŸŽ€ InfluxDB ๐ŸŽ€

Deprecated since version 4.11.0: InfluxDB support requires the influxdb library, which only supports InfluxDB 1.x and is itself deprecated. InfluxDB support in openstacksdk is therefore also deprecated and will be removed in a future release.

InfluxDB (https://www.influxdata.com/) reporting can be configured via configuration entries.

As with statsd, each cloud can provide its own metrics section to override any global defaults.

metrics:
  influxdb:
    host: __influxdb_server_host__
    port: __influxdb_server_port__
    use_udp: __True|False__
    username: __influxdb_auth_username__
    password: __influxdb_auth_password__
    database: __influxdb_db_name__
    measurement: __influxdb_measurement_name__
    timeout: __infludb_requests_timeout__
clouds:
  ..

InfluxDB reporting allows setting additional tags into the metrics based on the selected cloud.

clouds:
  my_cloud:
    profile: some_profile
    ...
    additional_metric_tags:
      environment: production

๐Ÿ‘‘ Prometheus ๐Ÿ‘‘

Prometheus (https://prometheus.io/) reporting is not configured via configuration entries. Unlike statsd and InfluxDB, Prometheus works on a pull basis. openstacksdk does not run the necessary HTTP service since it is a library. Instead, an application that uses openstacksdk and wants request stats collected should create a CollectorRegistry and pass it via the prometheus_config argument to CloudRegion (#openstack.config.cloud_region.CloudRegion). The application is then responsible for exposing the registry over HTTP.

import prometheus_client
import openstack.config

registry = prometheus_client.CollectorRegistry()

config = openstack.config.OpenStackConfig()
cloud = config.get_one_cloud(
    cloud='my-cloud',
    prometheus_config={
        'collector_registry': registry,
    },
)

# Use the cloud object; metrics will be recorded in the registry.
# Start the HTTP server to expose metrics to Prometheus.
prometheus_client.start_http_server(8000, registry=registry)

๐Ÿ’œ Microversions ๐Ÿ’œ

As openstacksdk rolls out support for consuming microversions, it will do so on a call by call basis as needed. Just like with major versions, openstacksdk should have logic to handle each microversion for a given REST call it makes, with the following rules in mind:

  • If an activity openstack performs can be done differently or more efficiently with a new microversion, the support should be added to openstack.cloud and to the appropriate Proxy class.
  • openstacksdk should always attempt to use the latest microversion it is aware of for a given call, unless a microversion removes important data.
  • Microversion selection should under no circumstances be exposed to the user in python API calls in the Resource layer or the openstack.cloud layer.
  • Microversion selection is exposed to the user in the REST layer via the microversion argument to each REST call.
  • A user of the REST layer may set the default microversion by setting {service_type}_default_microversion in clouds.yaml or OS_{service_type|upper}_DEFAULT_MICROVERSION environment variable.
Note: Setting the default microversion in any circumstance other than when using the REST layer is highly discouraged. Both of the higher layers in openstacksdk provide data normalization as well as logic about which REST call to make. Setting the default microversion could change the behavior of the service in question in such a way that openstacksdk does not understand. If there is a feature of a service that needs a microversion and it is not already transparently exposed in openstacksdk, please file a bug.
  • If a feature is only exposed for a given microversion and cannot be simulated for older clouds without that microversion, it is ok to add it, but a clear error message should be given to the user that the given feature is not available on their cloud. (A message such as "This cloud supports a maximum microversion of XXX for service YYY and this feature only exists on clouds with microversion ZZZ. Please contact your cloud provider for information about when this feature might be available")
  • When adding a feature that only exists behind a new microversion, every effort should be made to figure out how to provide the same functionality if at all possible, even if doing so is inefficient. If an inefficient workaround is employed, a warning should be provided to the user. (the userโ€™s workaround to skip the inefficient behavior would be to stop using that openstacksdk API call) An example of this is the nova "get me a network" feature. The logic of "get me a network" can be done client-side, albeit less efficiently. Adding support for the "get me a network" feature via nova microversion should also add support for doing the client-side workaround.
  • If openstacksdk is aware of logic for more than one microversion, it should always attempt to use the latest version available for the service for that call.
  • Objects returned from openstacksdk should always go through normalization and thus should always conform to openstacksdkโ€™s documented data model. The objects should never look different to the user regardless of the microversion used for the REST call.
  • If a microversion adds new fields to an object, those fields should be added to openstacksdkโ€™s data model contract for that object and the data should either be filled in by performing additional REST calls if the data is available that way, or the field should have a default value of None which the user can be expected to test for when attempting to use the new value.
  • Microversion removes fields that are part of the existing data model contract โ€” bestie, be so careful here. Don't use that new microversion for that call unless you're forced to because the old microversion just isn't on the cloud you're talking to. And if the old one genuinely isn't available anymore? Then either go find the data from another source and fill it in, or shove a value of None into the field and document for the user that on some clouds the value may not exist. No silent gaps, okay? ๐Ÿ’…
  • Microversion removes a field and it's straight-up intractable โ€” like, impossible to work around without fundamentally breaking users? Then raise an issue with the service team in question. Hopefully a resolution can be found during the period while clouds still have the old microversion. ๐Ÿซถ
  • New calls or objects get added โ€” check in with the service team in question about the expected stability of the object. If there are known changes expected in the future โ€” even if they're like a few years off โ€” openstacksdk should take care to not add commitments to its data model for those fields/features. It is ok for openstacksdk to not have something. It's giving restraint, and we love her for it. โœจ
Note: openstacksdk does not currently have any sort of "experimental" opt-in API that would allow exposing things to a user that may not be supportable under the normal compatibility contract. If a conflict arises in the future where there is a strong desire for a feature but also a lack of certainty about its stability over time, an experimental API may want to be explored ... but concrete use cases should arise before such a thing is started. ๐Ÿงš

๐Ÿ’ซ Service Tokens ๐Ÿ’ซ

Okay so picture this: OpenStack services are talking to each other on behalf of a user โ€” like the Compute service (Nova) calling the Block Storage service (Cinder), or the Networking service (Neutron) โ€” and the whole operation just fails because the user's authentication token expired before the multi-step operation finished. So rude. ๐Ÿ˜ญ

To solve this problem, OpenStack supports service tokens. A service token is a secondary token issued to a dedicated service account and transmitted via the X-Service-Token HTTP header alongside the primary user's X-Auth-Token header. Two tokens, one vibe. ๐Ÿ‘‘

When the receiving service (such as Cinder) receives both tokens, its keystonemiddleware pipeline (https://docs.openstack.org/keystonemiddleware/latest/) validates the service token. If the service token is valid, the operation is permitted to proceed even if the user's token has expired โ€” provided the operation was initiated while the user's token was valid. Service tokens also allow target services to verify the identity of the calling service and authorize service-specific roles. Slay. ๐Ÿ’…

For a detailed explanation of service users and tokens in OpenStack, see the Keystone documentation on managing service users (https://docs.openstack.org/keystone/latest/admin/manage-services.html).

๐ŸŒธ Using service tokens with openstacksdk ๐ŸŒธ

openstacksdk relies on keystoneauth (https://docs.openstack.org/keystoneauth/latest/) for HTTP communication and session management. To attach a service token to requests made by an SDK Connection, you configure a keystoneauth1.service_token.ServiceTokenAuthWrapper.

The wrapper combines two distinct authentication plugins:

  • User Authentication Plugin (user_auth) โ€” provides credentials for the initiating user or the calling service's standard user context (sent in the X-Auth-Token header). ๐Ÿ’–
  • Service Authentication Plugin (service_auth) โ€” provides credentials for the service user account (sent in the X-Service-Token header). ๐Ÿฆ‹

Once wrapped, the composite auth plugin is passed to a keystoneauth1.session.Session, which is then supplied to the SDK Connection constructor:

from keystoneauth1 import service_token
from keystoneauth1 import session as ks_session
import openstack.connection

auth = service_token.ServiceTokenAuthWrapper(
    user_auth=user_auth,
    service_auth=service_auth,
)
sess = ks_session.Session(auth=auth)
conn = openstack.connection.Connection(session=sess, region_name=region)

๐ŸŽ€ Configuration ๐ŸŽ€

There are two primary mechanisms available for configuring service tokens. Pick your fighter. โญ

Service user auth with a service token (oslo.config)

In an OpenStack service operational context (such as Nova communicating with Cinder), configuration is typically managed via oslo.config (https://docs.openstack.org/oslo.config/latest/).

The service configuration file defines credentials for both the target service client group (e.g. [cinder]) and the service user group ([service_user]):

[cinder]
auth_type = password
auth_url = https://identity.example.com/identity/v3
project_domain_name = Default
project_name = service
user_domain_name = Default
username = nova
password = secret-nova-password
os_region_name = RegionOne

[service_user]
send_service_user_token = true
auth_type = password
auth_url = https://identity.example.com/identity/v3
project_domain_name = Default
project_name = service
user_domain_name = Default
username = nova
password = secret-nova-password

Both plugins are loaded using keystoneauth1.loading and wrapped together:

from keystoneauth1 import loading as ks_loading
from keystoneauth1 import service_token
from keystoneauth1 import session as ks_session
import openstack.connection
from oslo_config import cfg

CONF = cfg.CONF

# Load target service auth and service token auth
cinder_auth = ks_loading.load_auth_from_conf_options(CONF, 'cinder')
service_auth = ks_loading.load_auth_from_conf_options(CONF, 'service_user')

# Wrap them so both tokens are sent
auth = service_token.ServiceTokenAuthWrapper(
    user_auth=cinder_auth,
    service_auth=service_auth,
)
sess = ks_session.Session(auth=auth)

conn = openstack.connection.Connection(
    session=sess,
    region_name=CONF.cinder.os_region_name,
)

๐ŸŒˆ End-user credentials with a service token ๐ŸŒˆ

When an operation is initiated by an end user whose credentials are loaded from a standard clouds.yaml configuration (or an incoming request context), but the application must include a service token from its configuration file, you can combine the two sources. Two sources, one connection โ€” main character energy fr fr. ๐Ÿ’œ

import os
from keystoneauth1 import loading as ks_loading
from keystoneauth1 import service_token
from keystoneauth1 import session as ks_session
import openstack.config
import openstack.connection
from oslo_config import cfg

CONF = cfg.CONF

# User credentials from clouds.yaml
cloud_config = openstack.config.OpenStackConfig().get_one(
    cloud=os.environ['OS_CLOUD']
)
user_auth = cloud_config.get_auth()

# Service token credentials from service configuration
service_auth = ks_loading.load_auth_from_conf_options(CONF, 'service_user')

auth = service_token.ServiceTokenAuthWrapper(
    user_auth=user_auth,
    service_auth=service_auth,
)
sess = ks_session.Session(auth=auth)

conn = openstack.connection.Connection(
    session=sess,
    region_name=CONF.cinder.os_region_name,
)

๐ŸŒŸ Example ๐ŸŒŸ

A full runnable script demonstrating this pattern against Cinder's list-volume-types endpoint is available in the repository at examples/advanced/service_tokens.py:

#!/usr/bin/env python3
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

"""Connect to an OpenStack cloud using service tokens.

Reads an oslo.config configuration file (defaulting to /tmp/service.conf, or
specified via --config-file) containing [cinder] and [service_user] sections.

Demonstrates sending a service token alongside the user token:
  X-Auth-Token: <cinder auth token>
  X-Service-Token: <nova service token>

Run with mitmweb/mitmproxy to inspect the outgoing headers::

    export HTTP_PROXY=http://127.0.0.1:8080
    python examples/advanced/service_tokens.py
"""

import sys

from keystoneauth1 import loading as ks_loading
from keystoneauth1 import service_token
from keystoneauth1 import session as ks_session
from oslo_config import cfg

import openstack.connection

CONF = cfg.ConfigOpts()

def _register_opts() -> None:
    # Register options for the target service client group ([cinder])
    cinder_group = cfg.OptGroup('cinder', title='Cinder Options')
    CONF.register_group(cinder_group)
    CONF.register_opts(
        [cfg.StrOpt('os_region_name', default='RegionOne')],
        group='cinder',
    )
    ks_loading.register_session_conf_options(CONF, 'cinder')
    ks_loading.register_auth_conf_options(CONF, 'cinder')

    # Register options for the service user token group ([service_user])
    service_user_group = cfg.OptGroup(
        'service_user', title='Service User Options'
    )
    CONF.register_group(service_user_group)
    CONF.register_opts(
        [cfg.BoolOpt('send_service_user_token', default=False)],
        group='service_user',
    )
    ks_loading.register_session_conf_options(CONF, 'service_user')
    ks_loading.register_auth_conf_options(CONF, 'service_user')

def main() -> None:
    _register_opts()
    CONF(sys.argv[1:], default_config_files=['/tmp/service.conf'])

    # Load auth plugins from configuration
    cinder_auth = ks_loading.load_auth_from_conf_options(CONF, 'cinder')
    service_auth = ks_loading.load_auth_from_conf_options(CONF, 'service_user')

    # Wrap auth plugins so both X-Auth-Token and X-Service-Token are sent
    auth = service_token.ServiceTokenAuthWrapper(
        user_auth=cinder_auth, service_auth=service_auth
    )
    sess = ks_session.Session(auth=auth)

    conn = openstack.connection.Connection(
        session=sess, region_name=CONF.cinder.os_region_name
    )
    print('Listing volume types...')
    try:
        vtypes = list(conn.block_storage.types())
        print(f'Found {len(vtypes)} volume type(s):')
        for vt in vtypes:
            print(f'  - {vt.name} ({vt.id})')
    except Exception as exc:
        print(f'ERROR: {exc}')

if __name__ == '__main__':
    main()

And bestie, if you wanna actually see what's flying out on the wire โ€” like the X-Auth-Token and X-Service-Token headers themselves โ€” you can test this locally with an HTTP proxy (such as mitmproxy) to inspect them ๐Ÿ‘€:

export HTTP_PROXY=http://127.0.0.1:8080
python examples/advanced/service_tokens.py

๐ŸŒˆ Using OpenStack Baremetal ๐ŸŒˆ

Before working with the Bare Metal service, you'll need to create a connection to your OpenStack cloud by following the Connect user guide. That's what hands you the conn variable used in the examples below ๐Ÿซถ.

๐ŸŽ€ Table of Contents ๐ŸŽ€

  • CRUD operations
    • List Nodes
  • Provisioning operations
    • Manage and inspect Node
    • Provide Node

The primary resource of the Bare Metal service is the node. Below are a few usage examples โ€” for a reference to all the available methods, see the Baremetal API reference ๐Ÿ’….

๐ŸŒธ CRUD operations ๐ŸŒธ

โญ List Nodes โญ

A node is a bare metal machine. That's it, that's the whole vibe ๐Ÿ–ฅ๏ธ.

def list_nodes(conn):
    print("List Nodes:")

    for node in conn.baremetal.nodes():
        print(node)

Full example: baremetal resource list โ€” http://opendev.org/openstack/openstacksdk/src/branch/master/examples/baremetal/list.py

๐Ÿฆ‹ Provisioning operations ๐Ÿฆ‹

Provisioning actions are the main way to manipulate the nodes. See the Bare Metal service states documentation at https://docs.openstack.org/ironic/latest/contributor/states.html for details โ€” it's giving essential reading, ngl ๐Ÿ“–.

๐Ÿ’œ Manage and inspect Node ๐Ÿ’œ

Managing a node in the enroll provision state validates the management (IPMI, Redfish, etc) credentials and moves the node to the manageable state. Managing a node in the available state moves it to the manageable state. And in that state, extra actions become available โ€” things like configuring RAID or inspecting ๐Ÿ”ง.

Inspecting a node detects its properties by either talking to its BMC or by booting a special ramdisk. Either way she's gathering intel โœจ.

def manage_and_inspect_node(conn, uuid):
    node = conn.baremetal.find_node(uuid)
    print('Before:', node.provision_state)
    conn.baremetal.set_node_provision_state(node, 'manage')
    conn.baremetal.wait_for_nodes_provision_state([node], 'manageable')
    conn.baremetal.set_node_provision_state(node, 'inspect')
    res = conn.baremetal.wait_for_nodes_provision_state([node], 'manageable')
    print('After:', res[0].provision_state)

Full example: baremetal provisioning โ€” http://opendev.org/openstack/openstacksdk/src/branch/master/examples/baremetal/provisioning.py

๐Ÿ“ Provide Node ๐Ÿ“

Providing a node in the manageable provision state makes it available for deployment. Boom, she's ready ๐Ÿ‘‘.

def provide_node(conn, uuid):
    node = conn.baremetal.find_node(uuid)
    print('Before:', node.provision_state)
    conn.baremetal.set_node_provision_state(node, 'provide')
    res = conn.baremetal.wait_for_nodes_provision_state([node], 'available')
    print('After:', res[0].provision_state)

Full example: baremetal provisioning โ€” http://opendev.org/openstack/openstacksdk/src/branch/master/examples/baremetal/provisioning.py


๐Ÿงš Using OpenStack Block Storage ๐Ÿงš

Before working with the Block Storage service, you'll need to create a connection to your OpenStack cloud by following the Connect user guide. This will give you the conn variable used in the examples below ๐Ÿ’–.

โœจ Table of Contents โœจ

  • Working with Volumes
  • Working with Snapshots and Backups
  • Working with Volume Types

The Block Storage service manages volumes and the snapshots, backups and volume types associated with them. The examples below show a representative subset of what's possible โ€” for the complete set of operations, see the Block Storage proxy reference ๐Ÿ’…. (Yes, there's a whole reference, go off.)

๐ŸŒˆ Working with Volumes ๐ŸŒˆ

To list the existing volumes, use the volumes() method, which returns a generator of Volume objects:

>>> for volume in conn.block_storage.volumes():
...     print(volume.name, volume.status)

To create a volume, use the create_volume() method:

>>> volume = conn.block_storage.create_volume(name='my-volume', size=10)

To retrieve or delete a volume, use the get_volume() and delete_volume() methods. Each accepts either a volume ID or a Volume instance โ€” flexible, we love that ๐Ÿซถ:

>>> volume = conn.block_storage.get_volume(volume.id)
>>> conn.block_storage.delete_volume(volume)

๐Ÿฆ‹ Working with Snapshots and Backups ๐Ÿฆ‹

A snapshot captures the state of a volume at a point in time. Create one with create_snapshot(), list them with snapshots(), and remove them with delete_snapshot() โ€” it's giving time capsule energy โณ:

>>> snapshot = conn.block_storage.create_snapshot(volume_id=volume.id)
>>> for snapshot in conn.block_storage.snapshots():
...     print(snapshot.name)

Backups are managed in the same way through the corresponding backups, create_backup and delete_backup methods. Same vibe, different noun ๐Ÿ’พ.

๐ŸŽ€ Working with Volume Types ๐ŸŽ€

Volume types describe the capabilities of the storage backing a volume. List the available types with types():

>>> for volume_type in conn.block_storage.types():
...     print(volume_type.name)

๐Ÿ‘‘ Using OpenStack Clustering ๐Ÿ‘‘

Before working with the Clustering service, you'll need to create a connection to your OpenStack cloud by following the Connect user guide. This will give you the conn variable used by all examples in this guide ๐Ÿ’–.

The primary abstractions/resources of the Clustering service are:

๐Ÿ’œ Working with Profile Types ๐Ÿ’œ

A profile is a template used to create and manage nodes, i.e. objects exposed by other OpenStack services. A profile encodes the information needed for node creation in a property named spec. It's like a little recipe ๐Ÿง‘โ€๐Ÿณ.

โญ List Profile Types โญ

To examine the known profile types:

def list_profile_types(conn):
    print("List Profile Types:")

    for pt in conn.clustering.profile_types():
        print(pt.to_dict())

Full example: manage profile type โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile_type.py

๐ŸŒธ Get Profile Type ๐ŸŒธ

To get the details about a profile type, you need to provide the name of it:

def get_profile_type(conn):
    print("Get Profile Type:")

    pt = conn.clustering.get_profile_type('os.nova.server-1.0')

    print(pt.to_dict())

Full example: manage profile type โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile_type.py

๐ŸŒˆ Managing Profiles ๐ŸŒˆ

A profile type can be treated as the meta-type of a Profile object. A registry of profile types is built when the Cluster service starts. When creating a Profile object, you will indicate the profile type used in its spec property โœจ.

๐Ÿ“ List Profiles ๐Ÿ“

To examine the list of profiles:

def list_profiles(conn):
    print("List Profiles:")

    for profile in conn.clustering.profiles():
        print(profile.to_dict())

    for profile in conn.clustering.profiles(sort='name:asc'):
        print(profile.to_dict())

When listing profiles, you can specify the sorting option using the sort parameter, and you can do pagination using the limit and marker parameters. Slay, pagination ๐Ÿ’….

Full example: manage profile โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile.py

๐Ÿงš Create Profile ๐Ÿงš

When creating a profile, you will provide a dictionary with keys and values specified according to the profile type referenced:

def create_profile(conn):
    print("Create Profile:")

    spec = {
        'profile': 'os.nova.server',
        'version': 1.0,
        'name': 'os_server',
        'properties': {
            'name': SERVER_NAME,
            'flavor': FLAVOR_NAME,
            'image': IMAGE_NAME,
            'networks': {'network': NETWORK_NAME},
        },
    }

    profile = conn.clustering.create_profile(spec)
    print(profile.to_dict())

Optionally, you can specify a metadata keyword argument that contains some key-value pairs to be associated with the profile ๐Ÿท๏ธ.

Full example: manage profile โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile.py

๐Ÿ”ฅ Find Profile ๐Ÿ”ฅ

To find a profile based on its name or ID:

def find_profile(conn):
    print("Find Profile:")

    profile = conn.clustering.find_profile('os_server')
    print(profile.to_dict())
โš ๏ธ Heads up bestie: the Cluster service doesn't allow updating the spec of a profile. The only way to achieve that is to create a new profile. No cap, that's the rule.

Full example: manage profile โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile.py

๐Ÿ’– Get Profile ๐Ÿ’–

To get a profile based on its name or ID:

def get_profile(conn):
    print("Get Profile:")

    profile = conn.clustering.get_profile('os_server')
    print(profile.to_dict())

Full example: manage profile โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile.py

๐ŸŒŸ Update Profile ๐ŸŒŸ

After a profile is created, most of its properties are immutable. Still, you can update a profile's name and/or metadata โ€” small mercies ๐Ÿซถ.

def update_profile(conn):
    print("Update Profile:")

    profile = conn.clustering.update_profile('os_server', name='old_server')
    print(profile.to_dict())
โš ๏ธ Again for the people in the back: the Cluster service doesn't allow updating the spec of a profile. The only way to achieve that is to create a new profile.

Full example: manage profile โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/profile.py

๐ŸŽ€ Delete Profile ๐ŸŽ€

A profile can be deleted after creation, provided that it is not referenced by any active clusters or nodes. If you attempt to delete a profile that is still in use, you will get an error message ๐Ÿ˜ญ. Choose wisely.

def delete_profile(conn):
    print("Delete Profile:")

    conn.clustering.delete_profile('os_server')

    print("Profile deleted.")

๐Ÿ’… Managing Clusters ๐Ÿ’…

Clusters are first-class citizens in Senlin service design. A cluster is defined as a collection of homogeneous objects. The "homogeneous" here means that the objects managed (aka. Nodes) have to be instantiated from the same "profile type" โ€” same template, same energy ๐Ÿ‘ฏโ€โ™€๏ธ.

๐ŸŒˆ List Clusters ๐ŸŒˆ

To examine the list of receivers:

def list_cluster(conn):
    print("List clusters:")

    for cluster in conn.clustering.clusters():
        print(cluster.to_dict())

    for cluster in conn.clustering.clusters(sort='name:asc'):
        print(cluster.to_dict())

When you're listing clusters, you can pick the sorting with the sort parameter, and you can do pagination using the limit and marker parameters. ๐ŸŽ€

Full example: manage cluster <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/cluster.py>

๐Ÿ’– Create Cluster

When you create a cluster, you hand over a dictionary with keys and values that match whatever cluster type you're referencing. Easy.

def create_cluster(conn):
    print("Create cluster:")

    spec = {
        "name": CLUSTER_NAME,
        "profile_id": PROFILE_ID,
        "min_size": 0,
        "max_size": -1,
        "desired_capacity": 1,
    }

    cluster = conn.clustering.create_cluster(**spec)
    print(cluster.to_dict())

Optionally, you can specify a metadata keyword argument โ€” it holds some key-value pairs to be associated with the cluster. โœจ

Full example: manage cluster <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/cluster.py>

๐ŸŒธ Get Cluster

Grab a cluster by its name or ID, like:

def get_cluster(conn):
    print("Get cluster:")

    cluster = conn.clustering.get_cluster(CLUSTER_ID)
    print(cluster.to_dict())

Full example: manage cluster <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/cluster.py>

๐Ÿฆ‹ Find Cluster

Same deal for finding โ€” name or ID, your call:

def find_cluster(conn):
    print("Find cluster:")

    cluster = conn.clustering.find_cluster(CLUSTER_ID)
    print(cluster.to_dict())

Full example: manage cluster <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/cluster.py>

๐Ÿ’… Update Cluster

Okay so once a cluster exists, most of its properties are immutable โ€” like, locked in, no take-backs. But you can still update a cluster's name and/or params. ๐Ÿ‘‘

def update_cluster(conn):
    print("Update cluster:")

    spec = {
        "name": "Test_Cluster001",
        "profile_id": "c0e3a680-e270-4eb8-9361-e5c9503fba0a",
        "profile_only": True,
    }
    cluster = conn.clustering.update_cluster(CLUSTER_ID, **spec)
    print(cluster.to_dict())

Full example: manage cluster <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/cluster.py>

๐ŸŽ€ Delete Cluster

A cluster can be deleted after it's been created. And heads up โ€” when there are nodes in the cluster, the Senlin engine launches a whole process to delete all the nodes from the cluster and destroy them before it deletes the cluster object itself. She does a full cleanup first, respect. ๐Ÿ˜ญ

def delete_cluster(conn):
    print("Delete cluster:")

    conn.clustering.delete_cluster(CLUSTER_ID)
    print("Cluster deleted.")

    # cluster support force delete
    conn.clustering.delete_cluster(CLUSTER_ID, False, True)
    print("Cluster deleted")

๐ŸŒˆ Add Nodes to Cluster

Drop some existing nodes into the cluster you specified:

def add_nodes_to_cluster(conn):
    print("Add nodes to cluster:")

    node_ids = [NODE_ID]
    res = conn.clustering.add_nodes_to_cluster(CLUSTER_ID, node_ids)
    print(res)

๐Ÿ“ Remove Nodes from Cluster

Yeet nodes out of the specified cluster:

def remove_nodes_from_cluster(conn):
    print("Remove nodes from a cluster:")

    node_ids = [NODE_ID]
    res = conn.clustering.remove_nodes_from_cluster(CLUSTER_ID, node_ids)
    print(res)

๐Ÿ”ฅ Replace Nodes in Cluster

Swap out some existing nodes in the specified cluster for new ones:

def replace_nodes_in_cluster(conn):
    print("Replace the nodes in a cluster with specified nodes:")

    old_node = NODE_ID
    new_node = "cd803d4a-015d-4223-b15f-db29bad3146c"
    spec = {old_node: new_node}
    res = conn.clustering.replace_nodes_in_cluster(CLUSTER_ID, **spec)
    print(res)

๐Ÿ’œ Cluster Scale Out

Inflate the size of a cluster. Bigger! ๐ŸŽˆ

def scale_out_cluster(conn):
    print("Inflate the size of a cluster:")

    res = conn.clustering.scale_out_cluster(CLUSTER_ID, 1)
    print(res)

๐Ÿงš Cluster Scale In

Shrink the size of a cluster. Smaller! ๐Ÿซง

def scale_out_cluster(conn):
    print("Inflate the size of a cluster:")

    res = conn.clustering.scale_out_cluster(CLUSTER_ID, 1)
    print(res)
Ngl bestie, the original page literally prints this exact same scale_out_cluster example under "Scale In" too โ€” I'm not making it up, I'm just faithfully passing the copy-paste along. ๐Ÿ’€

โญ Cluster Resize

Resize of cluster. You get the whole spec treatment here:

def resize_cluster(conn):
    print("Resize of cluster:")

    spec = {
        'min_size': 1,
        'max_size': 6,
        'adjustment_type': 'EXACT_CAPACITY',
        'number': 2,
    }
    res = conn.clustering.resize_cluster(CLUSTER_ID, **spec)
    print(res)

๐Ÿ‘‘ Attach Policy to Cluster

Once a policy is attached (bound) to a cluster, it gets enforced whenever related actions are performed on that cluster โ€” unless the policy is (temporarily) disabled on the cluster. The way it just kicks in automatically, iconic.

def attach_policy_to_cluster(conn):
    print("Attach policy to a cluster:")

    spec = {'enabled': True}
    res = conn.clustering.attach_policy_to_cluster(
        CLUSTER_ID, POLICY_ID, **spec
    )
    print(res)

๐Ÿซถ Detach Policy from Cluster

Once a policy is attached to a cluster, it can be detached from the cluster whenever the user requests it. No strings. โœจ

def detach_policy_from_cluster(conn):
    print("Detach a policy from a cluster:")

    res = conn.clustering.detach_policy_from_cluster(CLUSTER_ID, POLICY_ID)
    print(res)

๐ŸŒธ Cluster Check

Check the cluster's health status โ€” cluster members can be checked too. Glow-up check for the whole squad. ๐Ÿ’–

def check_cluster(conn):
    print("Check cluster:")

    res = conn.clustering.check_cluster(CLUSTER_ID)
    print(res)

๐Ÿฆ‹ Cluster Recover

To restore a specified cluster, the members in the cluster get checked:

def recover_cluster(conn):
    print("Recover cluster:")

    spec = {'check': True}
    res = conn.clustering.recover_cluster(CLUSTER_ID, **spec)
    print(res)

๐ŸŽ€ Managing Nodes

A node is a logical object managed by the Senlin service. Real talk: a node can be a member of at most one cluster at any given time. A node can also be an orphan node โ€” which just means it doesn't belong to any clusters. Solo era. ๐Ÿ™ˆ

๐Ÿ’œ List Nodes

To examine the list of Nodes:

def list_nodes(conn):
    print("List Nodes:")

    for node in conn.clustering.nodes():
        print(node.to_dict())
    for node in conn.clustering.nodes(sort='asc:name'):
        print(node.to_dict())

When you're listing nodes, you can specify the sorting option using the sort parameter, and you can do pagination using the limit and marker parameters.

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

๐ŸŒˆ Create Node

When creating a node, you provide a dictionary with keys and values according to the node type you referenced:

def create_node(conn):
    print("Create Node:")

    spec = {
        'name': NODE_NAME,
        'profile_id': PROFILE_ID,
    }
    node = conn.clustering.create_node(**spec)
    print(node.to_dict())

Optionally, you can specify a metadata keyword argument that contains some key-value pairs to be associated with the node. ๐ŸŽ€

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

๐Ÿ“ Get Node

To get a node based on its name or ID:

def get_node(conn):
    print("Get Node:")

    node = conn.clustering.get_node(NODE_ID)
    print(node.to_dict())

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

โญ Find Node

To find a node based on its name or ID:

def find_node(conn):
    print("Find Node:")

    node = conn.clustering.find_node(NODE_ID)
    print(node.to_dict())

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

๐Ÿ”ฅ Update Node

After a node is created, most of its properties are immutable. Still, you can update a node's name and/or params. ๐Ÿ’…

def update_node(conn):
    print("Update Node:")

    spec = {
        'name': 'Test_Node01',
        'profile_id': 'c0e3a680-e270-4eb8-9361-e5c9503fba0b',
    }

    node = conn.clustering.update_node(NODE_ID, **spec)
    print(node.to_dict())

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

๐Ÿ’€ Delete Node

A node can be deleted after creation โ€” provided that it isn't referenced by any active clusters. Try to delete a node that's still in use and you'll get an error message, bestie. That's the vibe check saying no.

def delete_node(conn):
    print("Delete Node:")

    conn.clustering.delete_node(NODE_ID)
    print("Node deleted.")
    # node support force delete
    conn.clustering.delete_node(NODE_ID, False, True)
    print("Node deleted")

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

๐Ÿซถ Check Node

If the underlying physical resource is not healthy, the node gets set to ERROR status. Not the cute kind of error. ๐Ÿ˜ญ

def check_node(conn):
    print("Check Node:")

    node = conn.clustering.check_node(NODE_ID)
    print(node)

Full example: manage node <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/node.py>

๐Ÿงš Recover Node

To restore a specified node:

def recover_node(conn):
    print("Recover Node:")

    spec = {'check': True}
    node = conn.clustering.recover_node(NODE_ID, **spec)
    print(node)

๐Ÿ‘‘ Working with Policy Types

A policy is a template that encodes the information needed for specifying the rules that are checked/enforced before/after certain actions are performed on a cluster. Those rules are encoded in a property named spec. So spec is the main character here, fr fr.

๐ŸŒธ List Policy Types

To examine the known policy types:

def list_policy_types(conn):
    print("List Policy Types:")

    for pt in conn.clustering.policy_types():
        print(pt.to_dict())

Full example: manage policy type <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy_type.py>

๐Ÿฆ‹ Get Policy Type

To retrieve the details about a policy type, you need to provide its name:

def get_policy_type(conn):
    print("Get Policy Type:")

    pt = conn.clustering.get_policy_type('senlin.policy.deletion-1.0')

    print(pt.to_dict())

Full example: manage policy type <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy_type.py>

๐Ÿ’… Managing Policies

Okay so listen โ€” a policy type is basically the meta-type of a Policy object, right? Like the blueprint for the blueprint. โœจ A whole registry of these policy types gets built the moment the Cluster service starts up. And when you're creating a Policy object, you tell it which policy type you're using inside its spec property. That's the whole vibe.

๐ŸŽ€ List Policies

Wanna see all the policies? Say less:

def list_policies(conn):
    print("List Policies:")

    for policy in conn.clustering.policies():
        print(policy.to_dict())

    for policy in conn.clustering.policies(sort='name:asc'):
        print(policy.to_dict())

When you're listing policies you can totally set the sorting with the sort parameter, and pagination is yours via the limit and marker parameters. Slay.

Full example: manage policy <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy.py>


๐ŸŒธ Create Policy

When you're creating a policy you hand over a dictionary of keys and values that line up with whatever policy type you referenced. Like this:

def create_policy(conn):
    print("Create Policy:")
    attrs = {
        'name': 'dp01',
        'spec': {
            'policy': 'senlin.policy.deletion',
            'version': 1.0,
            'properties': {
                'criteria': 'oldest_first',
                'destroy_after_deletion': True,
            },
        },
    }

    policy = conn.clustering.create_policy(attrs)
    print(policy.to_dict())

Optionally โ€” and this is a cute little extra โ€” you can pass a metadata keyword argument stuffed with key-value pairs to associate with the policy. ๐Ÿซถ

Full example: manage policy <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy.py>


๐Ÿฆ‹ Find Policy

Wanna find a policy by its name or ID? Here ya go:

def find_policy(conn):
    print("Find Policy:")

    policy = conn.clustering.find_policy('dp01')
    print(policy.to_dict())

Full example: manage policy <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy.py>


๐Ÿ’– Get Policy

Getting a policy based on its name or ID, bestie:

def get_policy(conn):
    print("Get Policy:")

    policy = conn.clustering.get_policy('dp01')
    print(policy.to_dict())

Full example: manage policy <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy.py>


โญ Update Policy

So once a policy exists, most of its properties are immutable โ€” like, locked in, no take-backs. But you can still update a policy's name and/or metadata:

def update_policy(conn):
    print("Update Policy:")

    policy = conn.clustering.update_policy('dp01', name='dp02')
    print(policy.to_dict())
โš ๏ธ Heads up: the Cluster service does not allow updating the spec of a policy. The only way to pull that off is to create a brand new policy. Periodt.

Full example: manage policy <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/policy.py>


๐Ÿ’€ Delete Policy

A policy can be deleted after it's created โ€” provided it's not referenced by any active clusters or nodes. Try to delete one that's still in use and you'll get an error message, ngl. ๐Ÿ˜ญ

def delete_policy(conn):
    print("Delete Policy:")

    conn.clustering.delete_policy('dp01')

    print("Policy deleted.")

๐ŸŒˆ Managing Receivers

Receivers are the event sinks tied to senlin clusters โ€” think of them as the inbox for events. So when some monitoring software spots certain events (or alarms), that software can notify the senlin clusters about them. And when senlin gets those notifications? It can automatically trigger predefined operations with preset parameter values. Main character energy, honestly. ๐Ÿ‘‘

๐Ÿ“ List Receivers

To peek at the list of receivers:

def list_receivers(conn):
    print("List Receivers:")

    for receiver in conn.clustering.receivers():
        print(receiver.to_dict())

    for receiver in conn.clustering.receivers(sort='name:asc'):
        print(receiver.to_dict())

When you're listing receivers, the sort parameter handles sorting for you, and you can do pagination with the limit and marker parameters. ๐Ÿ’–

Full example: manage receiver <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/receiver.py>


๐Ÿงš Create Receiver

When you create a receiver, you pass a dictionary of keys and values that match the receiver type you referenced:

def create_receiver(conn):
    print("Create Receiver:")

    # Build the receiver attributes and create the recever.
    spec = {
        "action": "CLUSTER_SCALE_OUT",
        "cluster_id": CLUSTER_ID,
        "name": FAKE_NAME,
        "params": {"count": "1"},
        "type": "webhook",
    }

    receiver = conn.clustering.create_receiver(**spec)
    print(receiver.to_dict())

Optionally, you can throw in a metadata keyword argument โ€” a bunch of key-value pairs to associate with the receiver. ๐ŸŽ€

Full example: manage receiver <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/receiver.py>


๐Ÿ’œ Get Receiver

Getting a receiver by its name or ID:

def get_receiver(conn):
    print("Get Receiver:")

    receiver = conn.clustering.get_receiver(FAKE_NAME)
    print(receiver.to_dict())

Full example: manage receiver <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/receiver.py>


๐Ÿ”ฅ Find Receiver

Finding a receiver by its name or ID:

def find_receiver(conn):
    print("Find Receiver:")

    receiver = conn.clustering.find_receiver(FAKE_NAME)
    print(receiver.to_dict())

Full example: manage receiver <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/receiver.py>


๐ŸŒธ Update Receiver

Once a receiver exists, most of its properties are immutable. But bestie, you can update a receiver's name and/or params:

def update_receiver(conn):
    print("Update Receiver:")

    spec = {"name": "test_receiver2", "params": {"count": "2"}}
    receiver = conn.clustering.update_receiver(FAKE_NAME, **spec)
    print(receiver.to_dict())

Full example: manage receiver <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/receiver.py>


๐Ÿฆ‹ Delete Receiver

A receiver can be deleted after creation โ€” provided it's not referenced by any active clusters. Try to delete one that's still in use and you'll get an error message. ๐Ÿ™ˆ

def delete_receiver(conn):
    print("Delete Receiver:")

    conn.clustering.delete_receiver(FAKE_NAME)
    print("Receiver deleted.")

โšก Working with Actions

An action is basically an abstraction of some logic that a worker thread can execute. Most of the operations Senlin supports run asynchronously โ€” meaning they get queued up into the database and then picked up by a certain worker thread for execution. Queue it and forget it, iykyk. ๐Ÿ’…

โญ List Actions

To look at the list of actions:

def list_actions(conn):
    print("List Actions:")

    for actions in conn.clustering.actions():
        print(actions.to_dict())

    for actions in conn.clustering.actions(sort='name:asc'):
        print(actions.to_dict())

When listing actions, sort handles your sorting, and pagination is done with the limit and marker parameters. โœจ

Full example: manage action <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/action.py>


๐ŸŽ€ Get Action

Getting an action by its name or ID:

def get_action(conn):
    print("Get Action:")

    action = conn.clustering.get_action(ACTION_ID)
    print(action.to_dict())

๐Ÿฆ‹ Working with Events

An event is a record generated during engine execution. It captures what happened inside the senlin-engine. The senlin-engine service generates those event records while it's performing actions or checking policies. Receipts, basically. ๐Ÿงพ

๐Ÿ’– List Events

To examine the list of events:

def list_events(conn):
    print("List Events:")

    for events in conn.clustering.events():
        print(events.to_dict())

    for events in conn.clustering.events(sort='name:asc'):
        print(events.to_dict())

When listing events, the sort parameter sorts them, and you can paginate using the limit and marker parameters. ๐ŸŒธ

Full example: manage event <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/clustering/event.py>


๐ŸŒˆ Get Event

Getting an event by its name or ID:

def get_event(conn):
    print("Get Event:")

    event = conn.clustering.get_event(EVENT_ID)
    print(event.to_dict())

๐Ÿ‘‘ Using OpenStack Compute

Before you start working with the Compute service, you gotta create a connection to your OpenStack cloud โ€” just follow the Connect <> user guide. That'll hand you the conn variable used in all the examples below. ๐Ÿซถ

๐Ÿ“‹ Table of Contents

  • List Servers
  • List Images
  • List Flavors
  • List Networks
  • Create Key Pair
  • Create Server

The primary resource of the Compute service is the server. Periodt.


๐Ÿ’ป List Servers

A server is a virtual machine that gives you access to a compute instance being run by your cloud provider.

def list_servers(conn):
    print("List Servers:")

    for server in conn.compute.servers():
        print(server)

Full example: compute resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/compute/list.py>


๐Ÿ–ผ๏ธ List Images

An image is the operating system you want to use for your server. ๐Ÿ’ฟ

def list_images(conn):
    print("List Images:")

    for image in conn.compute.images():
        print(image)

Full example: compute resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/compute/list.py>


๐Ÿ“ List Flavors

A flavor is the resource configuration for a server โ€” every flavor is a unique combo of disk, memory, vCPUs, and network bandwidth. ๐Ÿฐ

def list_flavors(conn):
    print("List Flavors:")

    for flavor in conn.compute.flavors():
        print(flavor)

Full example: compute resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/compute/list.py>


๐ŸŒ List Networks

A network provides connectivity to servers.

def list_networks(conn):
    print("List Networks:")

    for network in conn.network.networks():
        print(network)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

๐ŸŽ€ Create Key Pair

A key pair is the public key and private key of publicโ€“key cryptography <https://en.wikipedia.org/wiki/Public-key_cryptography>. Bestie, they're literally how you encrypt and decrypt your login info when you connect to your server ๐Ÿ”โœจ

def create_keypair(conn):
    keypair = conn.compute.find_keypair(KEYPAIR_NAME)

    if not keypair:
        print("Create Key Pair:")

        keypair = conn.compute.create_keypair(name=KEYPAIR_NAME)

        print(keypair)

        try:
            os.mkdir(SSH_DIR)
        except OSError as e:
            if e.errno != errno.EEXIST:
                raise e

        with open(PRIVATE_KEYPAIR_FILE, 'w') as f:
            f.write(str(keypair.private_key))

        os.chmod(PRIVATE_KEYPAIR_FILE, 0o400)

    return keypair

Full example: compute resource create <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/compute/create.py>


๐Ÿฆ‹ Create Server

Okay so at minimum a server needs a name, an image, a flavor, and a network when you create it. You can discover the names and IDs of these attributes by listing them as above and then using the find methods to grab the right resources ๐Ÿ’…

Ideally you'll also create a server using a keypair so you can login to that server with the private key. iykyk ๐Ÿ”‘

Servers take time to boot, so we call wait_for_server to wait for it to become active โ€” patience, queen ๐Ÿ‘‘

def create_server(conn):
    print("Create Server:")

    image = conn.image.find_image(IMAGE_NAME)
    flavor = conn.compute.find_flavor(FLAVOR_NAME)
    network = conn.network.find_network(NETWORK_NAME)
    keypair = create_keypair(conn)

    server = conn.compute.create_server(
        name=SERVER_NAME,
        image_id=image.id,
        flavor_id=flavor.id,
        networks=[{"uuid": network.id}],
        key_name=keypair.name,
    )

    server = conn.compute.wait_for_server(server)

    print(f"ssh -i {PRIVATE_KEYPAIR_FILE} root@{server.access_ipv4}")

Full example: compute resource create <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/compute/create.py>


๐ŸŒธ Using OpenStack Database

Before working with the Database service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. That's what gives you the conn variable used in the examples below ๐Ÿซถ

โœจ Table of Contents

  • Working with Instances
  • Working with Databases and Users
  • Working with Flavors

The Database service provisions database instances and manages the databases, users and flavors associated with them. The examples below show a representative subset of what's possible โ€” for the complete set of operations, see the Database proxy reference <> ๐Ÿ‘‘

๐Ÿ’œ Working with Instances

To list the existing database instances, use the instances() method, which returns a generator of Instance <#openstack.database.v1.instance.Instance> objects:

>>> for instance in conn.database.instances():
...     print(instance.name, instance.status)

To create an instance, use the create_instance() method. To retrieve or delete one, use get_instance() and delete_instance():

>>> instance = conn.database.create_instance(
...     name='my-instance', flavor_reference=flavor.id, volume={'size': 5})
>>> conn.database.delete_instance(instance)

๐Ÿ“ Working with Databases and Users

Databases and users are created against an existing instance. Use create_database() and create_user(), and list them with databases() and users():

>>> conn.database.create_database(instance, name='my-database')
>>> conn.database.create_user(
...     instance, name='alice', password='s3cret')

๐ŸŒˆ Working with Flavors

Flavors describe the compute and memory resources of an instance. List the available flavors with flavors():

>>> for flavor in conn.database.flavors():
...     print(flavor.name)

๐Ÿงš Using OpenStack DNS

Before working with the DNS service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. That'll hand you the conn variable used in the examples below โœจ

๐ŸŽ€ Table of Contents

  • List Zones
  • List Recordsets
  • Create Zone
  • Create Recordset
  • Delete Zone
  • Delete Recordset
  • Find Zone
  • Find Recordset

The primary resource of the DNS service is the server. (Yes, that's what it says. Not me, the docs ๐Ÿ’€)

๐ŸŒธ List Zones

Zone is a logical grouping of DNS records for a domain, allowing for the centralized management of DNS resources, including domain names, nameservers, and DNS queries ๐Ÿ—‚๏ธ

def list_zones(conn):
    print("List Zones:")

    for zone in conn.dns.zones():
        print(zone)

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐Ÿฆ‹ List Recordsets

Recordsets allow for the centralized management of various DNS records within a Zone, helping to define how a domain responds to different types of DNS queries ๐Ÿ“‹

def list_recordsets(conn, name_or_id):
    print("List Recordsets for Zone")

    zone = conn.dns.find_zone(name_or_id)

    if zone:
        zone_id = zone.id
        recordsets = conn.dns.recordsets(zone_id)

        for recordset in recordsets:
            print(recordset)
    else:
        print("Zone not found.")

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐Ÿ’œ Create Zone

Create a zone. It allows users to define and manage the DNS namespace for a particular domain ๐Ÿ‘‘

def create_zone(
    conn,
    name,
    email,
    ttl=3600,
    description="Default description",
    zone_type="PRIMARY",
):
    print("Create Zone: ")

    zone = {
        "name": name,
        "email": email,
        "ttl": ttl,
        "description": description,
        "type": zone_type,
    }

    print(conn.dns.create_zone(**zone))

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐Ÿ“ Create Recordset

Create a recordset. It accepts several parameters that define the DNS record's properties and sends an API request to OpenStack to create the recordset within a specified DNS zone ๐Ÿ”ฅ

def create_recordset(
    conn,
    name_or_id,
    recordset_name,
    recordset_type="A",
    records=["192.168.1.1"],
    ttl=3600,
    description="Default description",
):
    print("Create Recordset: ")

    zone = conn.dns.find_zone(name_or_id)

    if not zone:
        print("Zone not found.")
        return None

    zone_id = zone.id

    recordset_data = {
        "name": recordset_name,
        "type": recordset_type,
        "records": records,
        "ttl": ttl,
        "description": description,
    }

    print(conn.dns.create_recordset(zone_id, **recordset_data))

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐ŸŒˆ Delete Zone

Delete a zone. It allows users to completely delete the DNS management for a specified domain ๐Ÿ’€

def delete_zone(conn, name_or_id):
    print(f"Delete Zone: {name_or_id}")

    zone = conn.dns.find_zone(name_or_id)

    if zone:
        conn.dns.delete_zone(zone.id)
    else:
        return None

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐Ÿงš Delete Recordset

Delete a recordset. Just... poof, gone โœจ

def delete_recordset(conn, name_or_id, recordset_name):
    print(f"Deleting Recordset: {recordset_name} in Zone: {name_or_id}")

    zone = conn.dns.find_zone(name_or_id)

    if zone:
        try:
            recordset = conn.dns.find_recordset(zone.id, recordset_name)
            if recordset:
                conn.dns.delete_recordset(recordset, zone.id)
            else:
                print("Recordset not found")
        except Exception as e:
            print(f"{e}")
    else:
        return None

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐ŸŽ€ Find Zone

The find_zone function searches for and returns a DNS zone by its name using a given connection object ๐Ÿ”

def find_zone(conn, name_or_id):
    print(f"Find Zone: {name_or_id}")

    zone = conn.dns.find_zone(name_or_id)

    if zone:
        print(zone)
        return zone
    else:
        print("Zone not found.")
        return None

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>

๐Ÿฆ‹ Find Recordset

The find_recordset function searches for a DNS recordset with a specific name and type within a given zone. If multiple recordsets with the same name exist, the record type can be specified to find the exact match ๐ŸŽฏ

def find_recordset(conn, name_or_id, recordset_name, recordset_type=None):
    print(f"Find Recordset: {recordset_name} in Zone: {name_or_id}")

    zone = conn.dns.find_zone(name_or_id)

    if not zone:
        print("Zone not found.")
        return None

    zone_id = zone.id

    try:
        if recordset_type:
            recordset = conn.dns.find_recordset(
                zone_id, recordset_name, type=recordset_type
            )
        else:
            recordset = conn.dns.find_recordset(zone_id, recordset_name)

        if recordset:
            print(recordset)
            return recordset
        else:
            print("Recordset not found in Zone.")
            return None

    except Exception as e:
        print(f"{e}")
        return None

Full example: dns resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py>


๐Ÿ’œ Using OpenStack Identity

Before working with the Identity service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. That's the whole vibe check that gives you the conn variable used in the examples below ๐Ÿซถ

okay so the OpenStack Identity service is literally the default identity management system for OpenStack, no cap. Its authentication process confirms who a user is and checks an incoming request by validating the credentials that user hands over. At first, those credentials are a user name and password, or a user name and API key. Once the Identity service validates them, it issues an authentication token that the user sends in later requests. That token is an alpha-numeric text string that unlocks access to OpenStack APIs and resources. It can be revoked at any time, and itโ€™s only valid for a finite duration. ๐Ÿ’…

๐ŸŽ€ List Users ๐ŸŽ€

A user is a digital representation of a person, system, or service that uses OpenStack cloud services. The Identity service validates that incoming requests are made by the user who claims to be making the call. Users have a login and can access resources by using assigned tokens. Users can be directly assigned to a particular project and behave as if they are contained in that project. Periodt.

def list_users(conn):
    print("List Users:")

    for user in conn.identity.users():
        print(user)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

๐Ÿ’– List Credentials ๐Ÿ’–

Credentials are data that confirms the identity of the user. For example: user name and password, user name and API key, or an authentication token that the Identity service provides. Iconic little identity receipts, honestly.

def list_credentials(conn):
    print("List Credentials:")

    for credential in conn.identity.credentials():
        print(credential)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

๐Ÿฆ‹ List Projects ๐Ÿฆ‹

A project is a container that groups or isolates resources or identity objects. Itโ€™s giving organizational bubble, and we love that for it.

def list_projects(conn):
    print("List Projects:")

    for project in conn.identity.projects():
        print(project)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

๐ŸŒธ List Domains ๐ŸŒธ

A domain is an Identity service API v3 entity and represents a collection of projects and users that defines administrative boundaries for the management of Identity entities. Users can be granted the administrator role for a domain. A domain administrator can create projects, users, and groups in a domain and assign roles to users and groups in a domain.

def list_domains(conn):
    print("List Domains:")

    for domain in conn.identity.domains():
        print(domain)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

๐Ÿซถ List Groups ๐Ÿซถ

A group is an Identity service API v3 entity and represents a collection of users that are owned by a domain. A group role granted to a domain or project applies to all users in the group. Adding users to, or removing users from, a group respectively grants, or revokes, their role and authentication to the associated domain or project.

def list_groups(conn):
    print("List Groups:")

    for group in conn.identity.groups():
        print(group)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

โœจ List Services โœจ

A service is an OpenStack service, such as Compute, Object Storage, or Image service, that provides one or more endpoints through which users can access resources and perform operations.

def list_services(conn):
    print("List Services:")

    for service in conn.identity.services():
        print(service)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

๐ŸŽ€ List Endpoints ๐ŸŽ€

An endpoint is a network-accessible address, usually a URL, through which you can access a service.

def list_endpoints(conn):
    print("List Endpoints:")

    for endpoint in conn.identity.endpoints():
        print(endpoint)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py

๐ŸŒˆ List Regions ๐ŸŒˆ

A region is an Identity service API v3 entity and represents a general division in an OpenStack deployment. You can associate zero or more sub-regions with a region to make a tree-like structured hierarchy.

def list_regions(conn):
    print("List Regions:")

    for region in conn.identity.regions():
        print(region)

Full example: identity resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/identity/list.py


๐Ÿฆ‹ Using OpenStack Image ๐Ÿฆ‹

Before working with the Image service, youโ€™ll need to create a connection to your OpenStack cloud by following the Connect <> user guide. This will provide you with the conn variable used in the examples below.

The primary resource of the Image service is the image. Main character energy, obviously.

๐Ÿ“ List Images ๐Ÿ“

An image is a collection of files for a specific operating system that you use to create or rebuild a server. OpenStack provides pre-built images โ€” http://docs.openstack.org/image-guide/obtain-images.html. You can also create custom images, or snapshots, from servers that you have launched. Images come in different formats and are sometimes called virtual machine images. Obsessed.

def list_images(conn):
    print("List Images:")

    for image in conn.image.images():
        print(image)

Full example: image resource list โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/image/list.py

๐Ÿ’œ Create Image ๐Ÿ’œ

Create an image by uploading its data and setting its attributes. Thatโ€™s the whole vibe.

def upload_image(conn):
    print("Upload Image:")

    # Load fake image data for the example.
    data = 'This is fake image data.'

    # Build the image attributes and upload the image.
    image_attrs = {
        'name': EXAMPLE_IMAGE_NAME,
        'data': data,
        'disk_format': 'raw',
        'container_format': 'bare',
        'visibility': 'public',
    }
    conn.image.upload_image(**image_attrs)

Full example: image resource create โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/image/create.py

๐Ÿงš Create Image via interoperable image import process ๐Ÿงš

Create an image, then use interoperable image import process to download data from a web URL.

For more information about the image import process, please check interoperable image import โ€” https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html

def import_image(conn):
    print("Import Image:")

    # Url where glance can download the image
    uri = (
        'https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img'
    )

    # Build the image attributes and import the image.
    image_attrs = {
        'name': EXAMPLE_IMAGE_NAME,
        'disk_format': 'qcow2',
        'container_format': 'bare',
        'visibility': 'public',
    }
    image = conn.image.create_image(**image_attrs)
    conn.image.import_image(image, method="web-download", uri=uri)

Full example: image resource import โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/image/import.py

๐Ÿ’€ Downloading an Image with stream=True ๐Ÿ’€

As images are often very large pieces of data, storing their entire contents in the memory of your application can be less than desirable. A more efficient method may be to iterate over a stream of the response data.

By choosing to stream the response content, you determine the chunk_size that is appropriate for your needs, meaning only that many bytes of data are read for each iteration of the loop until all data has been consumed. See requests.Response.iter_content() for more information.

When you choose to stream an image download, openstacksdk is no longer able to compute the checksum of the response data for you. This example shows how you might do that yourself, in a very similar manner to how the library calculates checksums for non-streamed responses. Ngl, youโ€™re on checksum duty now.

def download_image_stream(conn):
    print("Download Image via streaming:")

    # Find the image you would like to download.
    image = conn.image.find_image("myimage")

    # As the actual download now takes place outside of the library
    # and in your own code, you are now responsible for checking
    # the integrity of the data. Create an MD5 has to be computed
    # after all of the data has been consumed.
    md5 = hashlib.md5(usedforsecurity=False)

    with open("myimage.qcow2", "wb") as local_image:
        response = conn.image.download_image(image, stream=True)

        # Read only 1 MiB of memory at a time until
        # all of the image data has been consumed.
        for chunk in response.iter_content(chunk_size=1024 * 1024):
            # With each chunk, add it to the hash to be computed.
            md5.update(chunk)

            local_image.write(chunk)

        # Now that you've consumed all of the data the response gave you,
        # ensure that the checksums of what the server offered and
        # what you downloaded are the same.
        if response.headers["Content-MD5"] != md5.hexdigest():
            raise Exception("Checksum mismatch in downloaded content")

๐Ÿ™ˆ Downloading an Image with stream=False ๐Ÿ™ˆ

If you wish to download an imageโ€™s contents all at once and to memory, simply set stream=False, which is the default. Easy.

def download_image(conn):
    print("Download Image:")

    # Find the image you would like to download.
    image = conn.image.find_image("myimage")

    with open("myimage.qcow2", "w") as local_image:
        response = conn.image.download_image(image)

        # Response will contain the entire contents of the Image.
        local_image.write(response)

Full example: image resource download โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/image/download.py

๐Ÿ‘‘ Delete Image ๐Ÿ‘‘

Delete an image. Bye bestie.

def delete_image(conn):
    print("Delete Image:")

    example_image = conn.image.find_image(EXAMPLE_IMAGE_NAME)

    conn.image.delete_image(example_image, ignore_missing=False)

Full example: image resource delete โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/image/delete.py

๐Ÿ’– Using OpenStack Key Manager ๐Ÿ’–

Okay bestie, before you can vibe with the Key Manager service, you gotta make a connection to your OpenStack cloud by following the Connect <> user guide. That's what gives you the conn variable used in all the examples below, periodt โœจ

๐ŸŽ€ Table of Contents ๐ŸŽ€

  • Create a Secret
  • List Secrets
  • Get Secret Payload
  • Find Secret
  • Delete Secret
  • Create a Secret Consumer
  • List Secret Consumers
  • Delete Secret Consumer
โš ๏ธ Note, bestie: some interactions with the Key Manager service differ from other services in that resources do not have a proper id parameter, and likeโ€ฆ you need that for some calls ๐Ÿ˜ญ Instead, resources have a separately named id attribute, e.g., the Secret resource has secret_id. The examples below show you exactly when to pass in those id values. Don't skip this, iykyk ๐Ÿ’…

๐Ÿ” Create a Secret

The Key Manager service lets you create new secrets by passing the attributes of the Secret <#openstack.key_manager.v1.secret.Secret> to the create_secret() method. Slay ๐Ÿซถ

def create_secret(conn):
    print("Create a secret:")

    conn.key_manager.create_secret(
        name="My public key",
        secret_type="public",
        expiration="2020-02-28T23:59:59",
        payload="ssh rsa...",
        payload_content_type="text/plain",
    )

๐Ÿ“‹ List Secrets

Once you've stored some secrets, they're available for you to list via the secrets() method. This method returns a generator, which yields each Secret <#openstack.key_manager.v1.secret.Secret>. Iconic behavior honestly โœจ

def list_secrets(conn):
    print("List Secrets:")

    for secret in conn.key_manager.secrets():
        print(secret)

The secrets() method can also make more advanced queries to limit the secrets that are returned. Fancy ๐Ÿ’…

def list_secrets_query(conn):
    print("List Secrets:")

    for secret in conn.key_manager.secrets(
        secret_type="symmetric", expiration="gte:2020-01-01T00:00:00"
    ):
        print(secret)

๐Ÿ”‘ Get Secret Payload

Once you've received a Secret <#openstack.key_manager.v1.secret.Secret>, you can obtain the payload for it by passing the secret's id value to the secrets() method. Use the secret_id attribute when making this request โ€” yes, the separately-named one, that's the whole vibe check from earlier ๐Ÿ’€

def get_secret_payload(conn):
    print("Get a secret's payload:")

    # Assuming you have an object `s` which you perhaps received from
    # a conn.key_manager.secrets() call...
    secret = conn.key_manager.get_secret(s.secret_id)
    print(secret.payload)

๐Ÿ” Find Secret

To find a secret by name or ID, use the find_secret() method. This method can search for a Secret <#openstack.key_manager.v1.secret.Secret> by either its name or ID, making it flexible when you don't have the exact secret ID. Literally so convenient ๐ŸŒธ

def find_secret(conn, name_or_id):
    print(f"Find Secret: {name_or_id}")

    secret = conn.key_manager.find_secret(name_or_id)

    if secret:
        print(secret)
        return secret
    else:
        print("Secret not found")
        return None

๐Ÿ—‘๏ธ Delete Secret

To delete a secret, use the delete_secret() method. The secret can be identified by its ID or by using find_secret() to locate it by name first. Main character energy from find_secret() ngl ๐Ÿ‘‘

def delete_secret(conn, name_or_id):
    print(f"Delete Secret: {name_or_id}")

    secret = conn.key_manager.find_secret(name_or_id)

    if secret:
        conn.key_manager.delete_secret(secret)
    else:
        print("Secret not found")

๐Ÿงš Create a Secret Consumer

The Key Manager service lets you create a secret consumer by passing the attributes of the SecretConsumer <#openstack.key_manager.v1.secret_consumer.SecretConsumer> to the create_secret_consumer() method. Obsessed ๐ŸŽ€

def create_secret_consumer(conn):
    print("Create a secret consumer:")

    secret = conn.key_manager.find_secret("My public key")

    conn.key_manager.create_secret_consumer(
        secret=secret,
        service="service",
        resource_type="resource_type",
        resource_id="resource-id",
    )

๐Ÿ“œ List Secret Consumers

The Key Manager service lets you list secret consumers by passing the attributes of the SecretConsumer <#openstack.key_manager.v1.secret_consumer.SecretConsumer> to the secret_consumers() method.

def list_secret_consumers(conn, secret):
    print("List Secret Consumers:")

    for consumer in conn.key_manager.secret_consumers(secret=secret):
        print(consumer)

โŒ Delete Secret Consumer

The Key Manager service lets you delete a secret consumer by passing the attributes of the SecretConsumer <#openstack.key_manager.v1.secret_consumer.SecretConsumer> to the delete_secret_consumer() method. Bye bestie ๐Ÿ‘‹

def delete_secret_consumer(conn, secret):
    print("Delete a secret consumer:")

    conn.key_manager.delete_secret_consumer(
        secret=secret,
        service="service",
        resource_type="resource_type",
        resource_id="resource-id",
    )

๐Ÿ’Œ Using OpenStack Message ๐Ÿ’Œ

Before working with the Message service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. That gives you the conn variable used in the examples below. Yes, same drill every time, it's giving consistent ๐Ÿ’…

๐ŸŽ€ Table of Contents ๐ŸŽ€

  • Working with Queues
  • Working with Messages
  • Subscriptions and Claims

The Message service provides message queues, along with the messages, subscriptions and claims associated with them. The examples below show a representative subset of what's possible; for the complete set of operations, see the Message proxy reference <>. Lowkey there's so much more, go look ๐Ÿ”ฅ

๐Ÿ“ฌ Working with Queues

To list the existing queues, use the queues() method, which returns a generator of Queue objects. Create and delete queues with create_queue() and delete_queue():

>>> queue = conn.message.create_queue(name='my-queue')
>>> for queue in conn.message.queues():
...     print(queue.name)

โœ‰๏ธ Working with Messages

Producers post messages to a queue with post_message(), and consumers read them back with messages():

>>> conn.message.post_message(
...     queue.name, messages=[{'body': 'hello', 'ttl': 300}])
>>> for message in conn.message.messages(queue.name):
...     print(message.body)

๐Ÿงพ Subscriptions and Claims

Subscriptions notify an endpoint when messages arrive; manage them with create_subscription() and subscriptions(). Claims let a consumer reserve a batch of messages for processing; manage them with create_claim() and the related claim methods. Cute little system, honestly ๐Ÿฆ‹


๐ŸŒ Using OpenStack Network ๐ŸŒ

Before working with the Network service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. Same deal, that's where conn comes from, you know the vibe by now ๐Ÿ’–

๐ŸŽ€ Table of Contents ๐ŸŽ€

  • List Networks
  • List Subnets
  • List Ports
  • List Security Groups
  • List Routers
  • List Network Agents
  • Create Network
  • Open a Port
  • Accept Pings
  • Delete Network

The primary resource of the Network service is the network. Periodt.

๐Ÿ•ธ๏ธ List Networks

A network is an isolated Layer 2 <https://en.wikipedia.org/wiki/Data_link_layer> networking segment. There are two types of networks, project and provider networks. Project networks are fully isolated and are not shared with other projects. Provider networks map to existing physical networks in the data center and provide external network access for servers. Only an OpenStack administrator can create provider networks. Networks can be connected via routers. So much lore honestly ๐Ÿ˜ญ

def list_networks(conn):
    print("List Networks:")

    for network in conn.network.networks():
        print(network)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

๐Ÿงฉ List Subnets

A subnet is a block of IP addresses and associated configuration state. Subnets are used to allocate IP addresses when new ports are created on a network. That's it, that's the whole subnet ๐Ÿซถ

def list_subnets(conn):
    print("List Subnets:")

    for subnet in conn.network.subnets():
        print(subnet)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

๐Ÿ”Œ List Ports

A port is a connection point for attaching a single device, such as the NIC <https://en.wikipedia.org/wiki/Network_interface_controller> of a server, to a network. The port also describes the associated network configuration, such as the MAC <https://en.wikipedia.org/wiki/Media_access_control> and IP addresses to be used on that port. Very demure, very network-y โœจ

def list_ports(conn):
    print("List Ports:")

    for port in conn.network.ports():
        print(port)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

๐Ÿ›ก๏ธ List Security Groups

A security group acts as a virtual firewall for servers. It's a container for security group rules which specify the type of network traffic and direction that is allowed to pass through a port. Protecting the servers, we love to see it ๐Ÿ’…

def list_security_groups(conn):
    print("List Security Groups:")

    for port in conn.network.security_groups():
        print(port)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

๐Ÿ›ฃ๏ธ List Routers

A router is a logical component that forwards data packets between networks. It also provides Layer 3 <https://en.wikipedia.org/wiki/Network_layer> and NAT <https://en.wikipedia.org/wiki/Network_address_translation> forwarding to provide external network access for servers on project networks. Iconic forwarding behavior ๐Ÿ‘‘

def list_routers(conn):
    print("List Routers:")

    for router in conn.network.routers():
        print(router)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

๐Ÿค– List Network Agents

A network agent is a plugin that handles various tasks used to implement virtual networks. These agents include neutron-dhcp-agent, neutron-l3-agent, neutron-metering-agent, and neutron-lbaas-agent, among others. Little worker bees fr fr ๐Ÿ

def list_network_agents(conn):
    print("List Network Agents:")

    for agent in conn.network.agents():
        print(agent)

Full example: network resource list <https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/list.py>

Create Network ๐ŸŒธ

Okay so you're making a project network and subnet. This network can be used when creating a server and lets the server talk to other servers on the same project network. Here's the function:

def create_network(conn):
    print("Create Network:")

    example_network = conn.network.create_network(
        name='openstacksdk-example-project-network'
    )

    print(example_network)

    example_subnet = conn.network.create_subnet(
        name='openstacksdk-example-project-subnet',
        network_id=example_network.id,
        ip_version='4',
        cidr='10.0.2.0/24',
        gateway_ip='10.0.2.1',
    )

    print(example_subnet)

Full example: network resource create โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/create.py


Open a Port ๐Ÿ”“

When you're creating a security group for a network, you need to open certain ports so communication can happen through them. For example, you might need to enable HTTPS access on port 443.

def open_port(conn):
    print("Open a port:")

    example_sec_group = conn.network.create_security_group(
        name='openstacksdk-example-security-group'
    )

    print(example_sec_group)

    example_rule = conn.network.create_security_group_rule(
        security_group_id=example_sec_group.id,
        direction='ingress',
        remote_ip_prefix='0.0.0.0/0',
        protocol='tcp',
        port_range_max='443',
        port_range_min='443',
        ethertype='IPv4',
    )

    print(example_rule)

Full example: network security group create โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/security_group_rules.py


Accept Pings ๐Ÿ“

To ping a machine on your network inside a security group, you need to create a rule that allows inbound ICMP packets. Iconic networking behavior, honestly.

def allow_ping(conn):
    print("Allow pings:")

    example_sec_group = conn.network.create_security_group(
        name='openstacksdk-example-security-group2'
    )

    print(example_sec_group)

    example_rule = conn.network.create_security_group_rule(
        security_group_id=example_sec_group.id,
        direction='ingress',
        remote_ip_prefix='0.0.0.0/0',
        protocol='icmp',
        port_range_max=None,
        port_range_min=None,
        ethertype='IPv4',
    )

    print(example_rule)

Full example: network security group create โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/security_group_rules.py


Delete Network ๐Ÿ—‘๏ธ

This deletes a project network and its subnets. Bye-bye, little network.

def delete_network(conn):
    print("Delete Network:")

    example_network = conn.network.find_network(
        'openstacksdk-example-project-network'
    )

    for example_subnet in example_network.subnet_ids:
        conn.network.delete_subnet(example_subnet, ignore_missing=False)
    conn.network.delete_network(example_network, ignore_missing=False)

Full example: network resource delete โ€” https://opendev.org/openstack/openstacksdk/src/branch/master/examples/network/delete.py


Using OpenStack Object Store ๐Ÿฆ‹

Before working with the Object Store service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. That gives you the conn variable used in the examples below.


Table of Contents ๐Ÿ“š

  • Working with Containers
    • Listing Containers
    • Creating Containers
    • Working with Container Metadata
  • Working with Objects
    • Listing Objects
    • Getting Object Data
    • Uploading Objects
    • Working with Object Metadata

The primary resources of the Object Store service are containers and objects. ๐Ÿ’–


Working with Containers ๐Ÿงบ

Listing Containers ๐Ÿ”

To list existing containers, use the containers() method.

>>> for cont in conn.object_store.containers():
...     print cont
...
openstack.object_store.v1.container.Container: {u'count': 5,
u'bytes': 500, u'name': u'my container'}
openstack.object_store.v1.container.Container: {u'count': 0,
u'bytes': 0, u'name': u'empty container'}
openstack.object_store.v1.container.Container: {u'count': 100,
u'bytes': 1000000, u'name': u'another container'}

The containers method returns a generator that yields Container <#openstack.object_store.v1.container.Container> objects. It handles pagination for you, and you can adjust that with the limit argument. By default, it yields as many containers as the service will return, and it keeps requesting until it gets no more.

>>> for cont in conn.object_store.containers(limit=500):
...     print(cont)
...
<500 Containers>
... another request transparently made to the Object Store service
<500 more Containers>
...

Creating Containers ๐ŸŽ

To create a container, use the create_container() method.

>>> cont = conn.object_store.create_container(name="new container")
>>> cont
openstack.object_store.v1.container.Container: {'name': u'new container'}

Working with Container Metadata ๐Ÿท๏ธ

To get the metadata for a container, use the get_container_metadata() method. This method either takes the name of a container or a Container <#openstack.object_store.v1.container.Container> object, and it returns a Container object with all of its metadata attributes set.

>>> cont = conn.object_store.get_container_metadata("new container")
openstack.object_store.v1.container.Container: {'content-length': '0',
'x-container-object-count': '0', 'name': u'new container',
'accept-ranges': 'bytes',
'x-trans-id': 'tx22c5de63466e4c05bb104-0054740c39',
'date': 'Tue, 25 Nov 2014 04:57:29 GMT',
'x-timestamp': '1416889793.23520', 'x-container-read': '.r:mysite.com',
'x-container-bytes-used': '0', 'content-type': 'text/plain; charset=utf-8'}

To set the metadata for a container, use the set_container_metadata() method. This method takes a Container <#openstack.object_store.v1.container.Container> object. For example, to grant another user write access to this container, you can call set_container_metadata passing it the Container to update and keyword argument key/value pairs representing the metadata name and value to set.

>>> acl = "big_project:another_user"
>>> conn.object_store.set_container_metadata(cont, write_ACL=acl)
openstack.object_store.v1.container.Container: {'content-length': '0',
'x-container-object-count': '0',
'name': u'my new container', 'accept-ranges': 'bytes',
'x-trans-id': 'txc3ee751f971d41de9e9f4-0054740ec1',
'date': 'Tue, 25 Nov 2014 05:08:17 GMT',
'x-timestamp': '1416889793.23520', 'x-container-read': '.r:mysite.com',
'x-container-bytes-used': '0', 'content-type': 'text/plain; charset=utf-8',
'x-container-write': 'big_project:another_user'}

Working with Objects ๐Ÿ“ฆ

Objects are held in containers. From an API standpoint, you work with them using similarly named methods, typically with an additional argument to specify their container.


Listing Objects ๐Ÿ”Ž

To list the objects that exist in a container, use the objects() method.

If you have a Container <#openstack.object_store.v1.container.Container> object, you can pass it to objects.

>>> print cont.name
pictures
>>> for obj in conn.object_store.objects(cont):
...     print obj
...
openstack.object_store.v1.container.Object:
{u'hash': u'0522d4ccdf9956badcb15c4087a0c4cb',
u'name': u'pictures/selfie.jpg', u'bytes': 15744,
'last-modified': u'2014-10-31T06:33:36.618640',
u'last_modified': u'2014-10-31T06:33:36.618640',
u'content_type': u'image/jpeg', 'container': u'pictures',
'content-type': u'image/jpeg'}
...

Similar to the containers() method, objects returns a generator which yields Object <#openstack.object_store.v1.obj.Object> objects stored in the container. It also handles pagination for you, which you can adjust with the limit parameter, otherwise making each request for the maximum that your Object Store will return.

If you have the name of a container instead of an object, you can also pass that to the objects method.

>>> for obj in conn.object_store.objects("pictures".decode("utf8"),
                                         limit=100):
...     print obj
...
<100 Objects>
... another request transparently made to the Object Store service
<100 more Objects>

Getting Object Data ๐Ÿ“ฅ

Once you have an Object <#openstack.object_store.v1.obj.Object>, you get the data stored inside of it with the get_object_data() method.

>>> print ob.name
message.txt
>>> data = conn.object_store.get_object_data(ob)
>>> print data
Hello, world!

Additionally, if you want to save the object to disk, the download_object() convenience method takes an Object <#openstack.object_store.v1.obj.Object> and a path to write the contents to.

>>> conn.object_store.download_object(ob, "the_message.txt")

Uploading Objects ๐Ÿ“ค

Once you have data you'd like to store in the Object Store service, you use the upload_object() method. This method takes the data to be stored, along with at least an object name and the container it is to be stored in.

>>> hello = conn.object_store.upload_object(container="messages",
                                            name="helloworld.txt",
                                            data="Hello, world!")
>>> print hello
openstack.object_store.v1.container.Object: {'content-length': '0',
'container': u'messages', 'name': u'helloworld.txt',
'last-modified': 'Tue, 25 Nov 2014 17:39:29 GMT',
'etag': '5eb63bbbe01eeed093cb22bb8f5acdc3',
'x-trans-id': 'tx3035d41b03334aeaaf3dd-005474bed0',
'date': 'Tue, 25 Nov 2014 17:39:28 GMT',
'content-type': 'text/html; charset=UTF-8'}

Working with Object Metadata ๐Ÿท๏ธโœจ

Working with metadata on objects is identical to how it's done with containers. You use the get_object_metadata() and set_object_metadata() methods.

The metadata attributes to be set can be found on the Object <#openstack.object_store.v1.obj.Object> object.

>>> secret.delete_after = 300
>>> secret = conn.object_store.set_object_metadata(secret)

We set the delete_after value to 500 seconds, causing the object to be deleted in 300 seconds, or five minutes. That attribute corresponds to the X-Delete-After header value, which you can see is returned when we retrieve the updated metadata.

Yes bestie, the original literally says 500 and 300 right there โ€” both numbers stay. ๐Ÿซถ
>>> conn.object_store.get_object_metadata(ob)
openstack.object_store.v1.container.Object: {'content-length': '11',
'container': u'Secret Container',
'name': u'selfdestruct.txt', 'x-delete-after': 300,
'accept-ranges': 'bytes', 'last-modified': 'Tue, 25 Nov 2014 17:50:45 GMT',
'etag': '5eb63bbbe01eeed093cb22bb8f5acdc3',
'x-timestamp': '1416937844.36805',
'x-trans-id': 'tx5c3fd94adf7c4e1b8f334-005474c17b',
'date': 'Tue, 25 Nov 2014 17:50:51 GMT', 'content-type': 'text/plain'}

๐ŸŽผ Using OpenStack Orchestration

Okay bestie, before you touch the Orchestration service you gotta make a connection to your cloud โ€” follow the Connect <> user guide, and that's what hands you the conn variable used in all the examples below. No connection, no vibes. ๐Ÿ’œ

๐Ÿ“‘ Table of Contents

  • Working with Stacks
  • Software Configurations and Deployments

The Orchestration service creates and manages stacks โ€” collections of resources described by a template โ€” along with the software configurations and deployments applied to them. The examples below show a representative subset of what's possible; for the complete set of operations, see the Orchestration proxy reference <>. โœจ

๐Ÿ—๏ธ Working with Stacks

To list the existing stacks, use the stacks() method, which returns a generator of Stack <#openstack.orchestration.v1.stack.Stack> objects:

>>> for stack in conn.orchestration.stacks():
...     print(stack.name, stack.status)

To create a stack from a template, use the create_stack() method:

>>> stack = conn.orchestration.create_stack(
...     name='my-stack',
...     template_url='https://example.com/template.yaml',
...     parameters={'key_name': 'my-key'})

To retrieve, update or delete a stack, use the get_stack(), update_stack() and delete_stack() methods. Each accepts either a stack ID or a Stack <#openstack.orchestration.v1.stack.Stack> instance:

>>> stack = conn.orchestration.get_stack(stack.id)
>>> conn.orchestration.delete_stack(stack)

You can validate a template before using it with validate_template(), and inspect the resources that make up a stack with resources(). Literally so helpful, ngl. ๐Ÿ”ฅ

๐Ÿงฉ Software Configurations and Deployments

Software configurations and the deployments that apply them to servers are managed through the corresponding create_software_config / software_configs and create_software_deployment / software_deployments methods. Slay. ๐Ÿ’…


๐Ÿ—‚๏ธ Using OpenStack Shared File Systems

Before working with the Shared File System service, you'll need to create a connection to your OpenStack cloud by following the Connect <> user guide. This will provide you with the conn variable used in the examples below. Same drill as always, bestie โ€” get that conn first. ๐Ÿซถ

๐Ÿ“‘ Table of Contents

  • List Availability Zones
  • Share Instances
  • Get Share Instance
  • Reset Share Instance Status
  • Delete Share Instance
  • Resize Share
  • List Share Group Snapshots
  • Get Share Group Snapshot
  • List Share Group Snapshot Members
  • Create Share Group Snapshot
  • Reset Share Group Snapshot
  • Update Share Group Snapshot
  • Delete Share Group Snapshot
  • List Share Metadata
  • Get Share Metadata Item
  • Create Share Metadata
  • Update Share Metadata
  • Delete Share Metadata
  • Manage Share
  • Unmanage Share
  • List Share replicas
  • Create Share Replica
  • Get Share Replica
  • Delete Share Replica
  • Reset Status of Share Replica
  • Reset Replica State of Share Replica
  • Force Delete Share Replica
  • Promote Share Replica
  • Resync Share Replica

๐ŸŒ List Availability Zones

A Shared File System service availability zone is a failure domain for your shared file systems. You may create a shared file system (referred to simply as shares) in a given availability zone, and create replicas of the share in other availability zones. Spreading the love, as one does. ๐ŸŒˆ

def list_availability_zones(conn):
    print("List Shared File System Availability Zones:")
    for az in conn.share.availability_zones():
        print(az)

๐Ÿงš Share Instances

Administrators can list, show information for, explicitly set the state of, and force-delete share instances. Admin kid energy, iykyk. ๐Ÿ‘‘

def share_instances(conn, **query):
    print('List all share instances:')
    for si in conn.share.share_instances(**query):
        print(si)

๐Ÿ” Get Share Instance

Shows details for a single share instance.

def get_share_instance(conn, share_instance_id):
    print('Get share instance with given Id:')
    share_instance = conn.share.get_share_instance(share_instance_id)
    print(share_instance)

๐Ÿ”„ Reset Share Instance Status

Explicitly updates the state of a share instance.

def reset_share_instance_status(conn, share_instance_id, status):
    print(
        'Reset the status of the share instance with the given '
        'share_instance_id to the given status'
    )
    conn.share.reset_share_instance_status(share_instance_id, status)

๐Ÿ’€ Delete Share Instance

Force-deletes a share instance. Dramatic but effective.

def delete_share_instance(conn, share_instance_id):
    print('Force-delete the share instance with the given share_instance_id')
    conn.share.delete_share_instance(share_instance_id)

๐Ÿ“ Resize Share

Shared File System shares can be resized (extended or shrunk) to a given size. For details on resizing shares, refer to the Manila docs <https://docs.openstack.org/manila/latest/user/create-and-manage-shares.html#extend-share>.

def resize_share(conn, share_id, share_size):
    # Be explicit about not wanting to use force if the share
    # will be extended.
    use_force = False
    print('Resize the share to the given size:')
    conn.share.resize_share(share_id, share_size, use_force)

def resize_shares_without_shrink(conn, min_size):
    # Sometimes, extending shares without shrinking
    # them (effectively setting a min size) is desirable.

    # Get list of shares from the connection.
    shares = conn.share.shares()

    # Loop over the shares:
    for share in shares:
        # Extend shares smaller than min_size to min_size,
        # but don't shrink shares larger than min_size.
        conn.share.resize_share(share.id, min_size, no_shrink=True)

๐Ÿ“ธ List Share Group Snapshots

A share group snapshot is a point-in-time, read-only copy of the data that is contained in a share group. You can list all share group snapshots โ€” like a little time capsule of your data, obsessed. ๐ŸŽ€

def list_share_group_snapshots(conn, **query):
    print("List all share group snapshots:")
    share_group_snapshots = conn.share.share_group_snapshots(**query)
    for share_group_snapshot in share_group_snapshots:
        print(share_group_snapshot)

๐Ÿ‘€ Get Share Group Snapshot

Show share group snapshot details.

def get_share_group_snapshot(conn, group_snapshot_id):
    print("Show share group snapshot with given Id:")
    share_group_snapshot = conn.share.get_share_group_snapshots(
        group_snapshot_id
    )
    print(share_group_snapshot)

๐Ÿซ‚ List Share Group Snapshot Members

Lists all share group snapshots members.

def share_group_snapshot_members(conn, group_snapshot_id):
    print("Show share group snapshot members with given Id:")
    members = conn.share.share_group_snapshot_members(group_snapshot_id)
    for member in members:
        print(member)

โœจ Create Share Group Snapshot

Creates a snapshot from a share group.

def create_share_group_snapshot(conn, share_group_id, **attrs):
    print("Creating a share group snapshot from given attributes:")
    share_group_snapshot = conn.share.create_share_group_snapshot(
        share_group_id, **attrs
    )
    print(share_group_snapshot)

๐Ÿ” Reset Share Group Snapshot

Reset share group snapshot state.

def reset_share_group_snapshot_status(conn, group_snapshot_id, status):
    print("Reseting the share group snapshot status:")
    conn.share.reset_share_group_snapshot_status(group_snapshot_id, status)

๐Ÿ› ๏ธ Update Share Group Snapshot

Updates a share group snapshot.

def update_share_group_snapshot(conn, group_snapshot_id, **attrs):
    print("Updating a share group snapshot with given Id:")
    share_group_snapshot = conn.share.update_share_group_snapshot(
        group_snapshot_id, **attrs
    )
    print(share_group_snapshot)

๐Ÿ—‘๏ธ Delete Share Group Snapshot

Deletes a share group snapshot. Bye bestie, it was real. ๐Ÿ‘‹

def delete_share_group_snapshot(conn, group_snapshot_id):
    print("Deleting a share group snapshot with given Id:")
    conn.share.delete_share_group_snapshot(group_snapshot_id)

๐Ÿท๏ธ List Share Metadata

Lists all metadata for a given share.

def list_share_metadata(conn, share_id):
    # Method returns the entire share with the metadata inside it.
    returned_share = conn.get_share_metadata(share_id)

    # Access metadata of share
    metadata = returned_share['metadata']

    print("List All Share Metadata:")
    for meta_key in metadata:
        print(f"{meta_key}={metadata[meta_key]}")

๐Ÿ”‘ Get Share Metadata Item

Retrieves a specific metadata item from a shares metadata by its key.

def get_share_metadata_item(conn, share_id, key):
    # Method returns the entire share with the metadata inside it.
    returned_share = conn.get_share_metadata_item(share_id, key)

    # Access metadata of share
    metadata = returned_share['metadata']

    print("Get share metadata item given item key and share id:")
    print(metadata[key])

๐ŸŒฑ Create Share Metadata

Creates share metadata.

def create_share_metadata(conn, share_id, metadata):
    # Method returns the entire share with the metadata inside it.
    created_share = conn.create_share_metadata(share_id, metadata)

    # Access metadata of share
    metadata = created_share['metadata']

    print("Metadata created for given share:")
    print(metadata)

๐ŸŒธ Update Share Metadata

Updates metadata of a given share.

def update_share_metadata(conn, share_id, metadata):
    # Method returns the entire share with the metadata inside it.
    updated_share = conn.update_share_metadata(share_id, metadata, True)

    # Access metadata of share
    metadata = updated_share['metadata']

    print("Updated metadata for given share:")
    print(metadata)

๐Ÿ“ Delete Share Metadata

Deletes a specific metadata item from a shares metadata by its key. Can specify multiple keys to be deleted.

def delete_share_metadata(conn, share_id, keys):
    # Method doesn't return anything.
    conn.delete_share_metadata(share_id, keys)

๐Ÿงฐ Manage Share

Manage a share with Manila.

Okay so the manage-share function wraps up like this โ€” no cap, this is the part where you finally get the ID:

def manage_share(conn, protocol, export_path, service_host, **params):
    # Manage a share with the given protocol, export path, service host, and
    # optional additional parameters
    managed_share = conn.share.manage_share(
        protocol, export_path, service_host, **params
    )

    # Can get the ID of the share, which is now being managed with Manila
    managed_share_id = managed_share.id
    print("The ID of the share which was managed: %s", managed_share_id)

๐Ÿงน Unmanage Share ๐Ÿงน

Unmanage a share from Manila. Bye-bye, management era ๐Ÿ’…

def unmanage_share(conn, share_id):
    # Unmanage the share with the given share ID
    conn.share.unmanage_share(share_id)

    try:
        # Getting the share will raise an exception as it has been unmanaged
        conn.share.get_share(share_id)
    except Exception:
        pass

๐Ÿชž List Share replicas ๐Ÿชž

Share replicas are literally the replicated copies of the existing share. You can use Share Replicas to sync data so each share replica has an identical copy of the same share. Share replication can be a disaster recovery solution or a load sharing mirroring solution โ€” iconic multitasking, fr fr โœจ

def list_share_replicas(conn, **attrs):
    print("List share replicas for the shared file system:")
    for sr in conn.share.share_replicas(**attrs):
        print(sr)

๐ŸŒฑ Create Share Replica ๐ŸŒฑ

Creates a share replica from attributes. New replica just dropped ๐ŸŽ€

def create_share_replica(conn, share_id, **attrs):
    print("Creating share replica:")
    share_replica = conn.share.create_share_replica(share_id, **attrs)
    print(share_replica)

๐Ÿ” Get Share Replica ๐Ÿ”

List details of a single share replica. Gotta get that one specific replica, bestie ๐Ÿ’–

def get_share_replica(conn, share_replica_id):
    print("Getting share replica with give Id:")
    share_replica = conn.share.share_replica(share_replica_id)
    print(share_replica)

๐Ÿ—‘๏ธ Delete Share Replica ๐Ÿ—‘๏ธ

Delete a share replica. It's giving cleanup era ๐Ÿงน

def delete_share_replica(conn, share_replica_id):
    print("Deleting share replica with give Id:")
    conn.share.delete_share_replica(share_replica_id)

๐Ÿ”„ Reset Status of Share Replica ๐Ÿ”„

Reset status of the share replica. Fresh status, fresh vibes ๐ŸŒˆ

def reset_status_share_replica(conn, share_replica_id, status):
    print("Resetting status for given share replica Id:")
    conn.share.share_replica_reset_status(share_replica_id, status)

๐Ÿงš Reset Replica State of Share Replica ๐Ÿงš

Reset replica_state of the share replica. State reset supremacy ๐Ÿ‘‘

def reset_replica_state_share_replica(conn, share_replica_id, reset_state):
    print("Resetting replica state for given share replica Id:")
    conn.share.share_replica_reset_replica_state(share_replica_id, reset_state)

๐Ÿ’€ Force Delete Share Replica ๐Ÿ’€

Force-delete share replica. It is not subtle, and that's the point ๐Ÿ˜ญ

def force_delete_share_replica(conn, share_replica_id):
    print("Force deleting the share replica for the given Id:")
    conn.share.share_replica_force_delete(share_replica_id)

๐Ÿ‘‘ Promote Share Replica ๐Ÿ‘‘

Promote share replica. Main character replica behavior, periodt โญ

def promote_share_replica(conn, share_replica_id):
    print("Promoting share replica with given Id:")
    conn.share.share_replica_promote(share_replica_id)

๐Ÿ” Resync Share Replica ๐Ÿ”

Resync share replica. Sync it back into alignment, bestie ๐Ÿซถ

def resync_share_replica(conn, share_replica_id):
    print("Resyncing share replica with given Id:")
    conn.share.share_replica_resync(share_replica_id)

๐Ÿงช Testing ๐Ÿงช

The SDK provides a number of utilities to help you test your applications. Test era, but make it cute ๐Ÿ’–

๐Ÿงช Testing applications using OpenStack SDK ๐Ÿงช

๐ŸŽญ Fakes ๐ŸŽญ

The fakes module exists to help application developers using the OpenStack SDK unit test their applications. It provides a number of helper utilities to generate fake Resource and Proxy instances. These fakes do not require an established connection, and they let you validate that your application is using valid attributes and methods for both Resource and Proxy instances. Lowkey so useful ๐ŸŽ€

openstack.test.fakes.generate_fake_resource(resource_type, **attrs)

Generate a fake resource. Fake it till you make it, but make it type-correct โœจ

Example usage:

>>> from openstack.compute.v2 import server
>>> from openstack.test import fakes
>>> fakes.generate_fake_resource(server.Server)
openstack.compute.v2.server.Server(...)

Parameters

  • resource_type โ€” Object class.
  • attrs โ€” Optional attributes to be set on resource.

Returns Instance of resource_type class populated with fake values of expected types.

Raises NotImplementedError โ€” If a resource attribute specifies a type or list_type that cannot be automatically generated.

openstack.test.fakes.generate_fake_resources(resource_type, count=1, attrs=None)

Generate a given number of fake resource entities. A little generator full of fake besties ๐ŸŒธ

Example usage:

>>> from openstack.compute.v2 import server
>>> from openstack.test import fakes
>>> fakes.generate_fake_resources(server.Server, count=3)
<generator object generate_fake_resources at 0x7f075dc65040>

Parameters

  • resource_type โ€” Object class.
  • count โ€” Number of objects to return.
  • attrs โ€” Attribute values to set into each instance.

Returns Generator of resource_type class instances populated with fake values of expected types.

openstack.test.fakes.generate_fake_proxy(service, api_version=None)

Generate a fake proxy for the given service type. Proxy methods whose return type annotation is a Resource subclass (or a Generator / optional thereof) are automatically configured to return fake resource instances via generate_fake_resource() or generate_fake_resources(). Return values can still be overridden on the returned mock after the fact. That's the autospec magic, iykyk ๐Ÿ’…

Example usage:

>>> from openstack.compute import compute_service
>>> from openstack.compute.v2 import server
>>> from openstack.test import fakes
>>> fake_compute_proxy = fakes.generate_fake_proxy(
...    compute_service.ComputeService,
... )
>>> # get_server is pre-configured; returns a fake Server
>>> fake_server = fake_compute_proxy.get_server('some-uuid')
>>> isinstance(fake_server, server.Server)
True
>>> # servers() is pre-configured; yields fake Server instances
>>> fake_servers = list(fake_compute_proxy.servers())
>>> isinstance(fake_servers[0], server.Server)
True
>>> fake_compute_proxy.serverssss()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.11/unittest/mock.py", line 653, in __getattr__
    raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'serverssss'. Did you mean: 'server_ips'?

Parameters

  • service (ServiceDescription) โ€” The service to generate the fake proxy for.
  • api_version (int or None) โ€” The API version to generate the fake proxy for. This should be a major version and must be supported by openstacksdk, as specified in the supported_versions attribute of the provided service. This is only required if openstacksdk supports multiple API versions for the given service.

Raises ValueError โ€” if the service is not a valid ServiceDescription or if api_version is not supported.

Returns An autospecced mock of the Proxy implementation for the specified service type and API version.

๐Ÿ“š API Documentation ๐Ÿ“š

Service APIs are exposed through a two-layered approach. The classes exposed through our Connection interface are the place to start if you're an application developer consuming an OpenStack cloud. The Resource interface is the layer upon which the Connection is built, with Connection methods accepting and returning Resource objects.

The Cloud Abstraction layer has a data model.

๐Ÿงฌ Data Model ๐Ÿงฌ

openstacksdk has a very strict policy on not breaking backwards compatibility ever. However, with the data structures returned from OpenStack, there are places where the resource structures from OpenStack are returned to the user somewhat directly, leaving an openstacksdk user open to changes/differences in result content. No cap, that's the risk ๐Ÿ’€

To combat that, openstacksdk "normalizes" the return structure from OpenStack in many places, and the results of that normalization are listed below. Where openstacksdk performs normalization, a user can count on any fields declared in the docs as being completely safe to use โ€” they are as much a part of openstacksdk's API contract as any other Python method. That's the good part ๐Ÿซถ

Some OpenStack objects allow for arbitrary attributes at the root of the object. openstacksdk will pass those through so as not to break anyone who may be counting on them, but as they are arbitrary openstacksdk can make no guarantees as to their existence. As part of normalization, openstacksdk will put any attribute from an OpenStack resource that is not in its data model contract into an attribute called properties. The contents of properties are defined to be an arbitrary collection of key value pairs with no promises as to any particular key ever existing.

If a user passes strict=True to the openstacksdk constructor, openstacksdk will not pass through arbitrary objects to the root of the resource, and will instead only put them in the properties dict. If a user is worried about accidentally writing code that depends on an attribute that is not part of the API contract, this can be a useful tool. Keep in mind all data can still be accessed via the properties dict, but any code touching anything in the properties dict should be aware that the keys found there are highly user/cloud specific. Any key that is transformed as part of the openstacksdk data model contract will not wind up with an entry in properties โ€” only keys that are unknown.

๐Ÿ“ The location field ๐Ÿ“

A Location defines where a resource lives. It includes a cloud name and a region name, an availability zone as well as information about the project that owns the resource. Location lore, honestly ๐Ÿ—บ๏ธ

The project info can be a project ID, or a combo of a project name plus a domain name or ID. If there's a project ID in there, bestie, just trust it โ€” it's correct. ๐Ÿ’ฏ

Some resources are out here with zero ownership info. For those, we fill in the project info from the project your current token is for. (The token knows, okay? ๐Ÿ™ˆ)

And some resources don't even have availability zone info, or they're just out here existing region-wide. Those get None as their availability zone. No zone, no drama. ๐ŸŽ€

Location = dict(
    cloud=str(),
    region_name=str(),
    zone=str() or None,
    project=dict(
        id=str() or None,
        name=str() or None,
        domain_id=str() or None,
        domain_name=str() or None,
    )
)

๐Ÿซถ Connection Interface ๐Ÿซถ

A Connection instance is like, the main character of your cloud config. It holds your cloud config, your session, your auth info, and it gives you a whole set of higher-level interfaces to work with all your OpenStack services. Iconic behavior. ๐Ÿ‘‘

โœจ Connection โœจ

The Connection class is the primary interface to the Python SDK. It keeps a context for a connection to a region of a cloud provider. And it has an attribute to access each OpenStack service โ€” so you just vibe with conn.network, conn.compute, etc. ๐ŸŒˆ

At minimum, bestie, the Connection class needs to be created with a config or the parameters to build one. That's non-negotiable.

The whole system is super flexible (it's giving โœจ adaptability โœจ), but there are four main use cases for different ways to create a Connection:

  • Using config settings and keyword arguments as described in Configuring OpenStack SDK Applications <#openstack-config>
  • Using only keyword arguments passed to the constructor, ignoring config files and environment variables. (No outside noise, just vibes. ๐Ÿ™…โ€โ™€๏ธ)
  • Using an existing authenticated keystoneauth1.session.Session, such as might exist inside of an OpenStack service operational context.
  • Using an existing CloudRegion <#openstack.config.cloud_region.CloudRegion>.

๐Ÿ› ๏ธ Creating the Connection ๐Ÿ› ๏ธ

Using config settings

For users who want to create a Connection making use of named clouds in clouds.yaml files, OS_ environment variables, and Python keyword arguments, the openstack.connect() factory function is the recommended way to go. It's the moment. ๐Ÿ’…

import openstack

conn = openstack.connect(cloud='example', region_name='earth1')

If the app in question is a command line application that should also accept command line arguments, an argparse.Namespace can be passed to openstack.connect() โ€” it'll have relevant arguments added to it and then subsequently consumed by the constructor. So clean. โœจ

import argparse
import openstack

options = argparse.ArgumentParser(description='Awesome OpenStack App')
conn = openstack.connect(options=options)

Using only keyword arguments

If the application wants to avoid loading any settings from clouds.yaml or environment variables, use the Connection constructor directly. As long as the cloud argument is omitted or None, the Connection constructor will not load settings from files or the environment. It literally minds its own business. ๐Ÿ’โ€โ™€๏ธ

Note: This is a different default behavior than the connect() factory function. In connect() if cloud is omitted or None, a default cloud will be loaded, defaulting to the envvars cloud if it exists. (So like, connect() is nosy, Connection is chill. Different vibes entirely. ๐Ÿซถ)
from openstack import connection

conn = connection.Connection(
    region_name='example-region',
    auth={
        'auth_url': 'https://auth.example.com',
        'username': 'amazing-user',
        'password': 'super-secret-password',
        'project_id': '33aa1afc-03fe-43b8-8201-4e0d3b4b8ab5',
        'user_domain_id': '054abd68-9ad9-418b-96d3-3437bb376703',
    },
    compute_api_version='2',
    identity_interface='internal',
)

Per-service settings as needed by keystoneauth1.adapter.Adapter โ€” like api_version, service_name, and interface โ€” can be set, as seen above, by prefixing them with the official service-type name of the service. And region_name is a setting for the entire CloudRegion <#openstack.config.cloud_region.CloudRegion> and cannot be set per service. It's a whole-cloud mood, not a per-service one. fyi. ๐ŸŒ

From existing authenticated Session

For applications that already have an authenticated Session, simply passing it to the Connection constructor is all that's needed. Easy. Slay. โœจ

from openstack import connection

conn = connection.Connection(
    session=session,
    region_name='example-region',
    compute_api_version='2',
    identity_interface='internal',
)

From oslo.conf CONF object

For applications that have an oslo.config CONF object that has been populated with keystoneauth1.loading.register_adapter_conf_options in groups named by the OpenStack service's project name, it is possible to construct a Connection with the CONF object and an authenticated Session. Big brain energy. ๐Ÿง โœจ

Note: This is primarily intended for use by OpenStack services to talk amongst themselves. (It's giving internal group chat. ๐Ÿ’ฌ)
from keystoneauth1 import loading as ks_loading
from openstack import connection
from oslo_config import cfg

CONF = cfg.CONF

group = cfg.OptGroup('neutron')
ks_loading.register_session_conf_options(CONF, group)
ks_loading.register_auth_conf_options(CONF, group)
ks_loading.register_adapter_conf_options(CONF, group)

CONF()

auth = ks_loading.load_auth_from_conf_options(CONF, 'neutron')
sess = ks_loading.load_session_from_conf_options(
    CONF, 'neutron', auth=auth
)

conn = connection.Connection(
    session=sess,
    oslo_conf=CONF,
)

This can then be used with an appropriate configuration file. ๐Ÿ“„

[neutron]
region_name = RegionOne
auth_strategy = keystone
project_domain_name = Default
project_name = service
user_domain_name = Default
password = password
username = neutron
auth_url = http://10.0.110.85/identity
auth_type = password
service_metadata_proxy = True
default_floating_pool = public

You may also wish to configure a service user. As discussed in the Keystone documentation <https://docs.openstack.org/keystone/latest/admin/manage-services.html>, service users are users with specific roles that identify the user as a service. The use of service users can avoid issues caused by the expiration of the original user's token during long running operations, as a fresh token issued for the service user will always accompany the user's token, which may have expired. (Long story short: your token might expire mid-operation and that's a whole mess. Service users fix that. ๐Ÿ’…)

from keystoneauth1 import loading as ks_loading
from keystoneauth1 import service_token
from oslo_config import cfg
import openstack
from openstack import connection

CONF = cfg.CONF

neutron_group = cfg.OptGroup('neutron')
ks_loading.register_session_conf_options(CONF, neutron_group)
ks_loading.register_auth_conf_options(CONF, neutron_group)
ks_loading.register_adapter_conf_options(CONF, neutron_group)

service_group = cfg.OptGroup('service_user')
ks_loading.register_session_conf_options(CONF, service_group)
ks_loading.register_auth_conf_options(CONF, service_group)

CONF()
user_auth = ks_loading.load_auth_from_conf_options(CONF, 'neutron')
service_auth = ks_loading.load_auth_from_conf_options(CONF, 'service_user')
auth = service_token.ServiceTokenAuthWrapper(user_auth, service_auth)

sess = ks_loading.load_session_from_conf_options(
    CONF, 'neutron', auth=auth
)

conn = connection.Connection(
    session=sess,
    oslo_conf=CONF,
)

This will necessitate an additional section in the configuration file used. ๐Ÿ‘€

[service_user]
auth_strategy = keystone
project_domain_name = Default
project_name = service
user_domain_name = Default
password = password
username = nova
auth_url = http://10.0.110.85/identity
auth_type = password

From existing CloudRegion

If you already have an CloudRegion <#openstack.config.cloud_region.CloudRegion> you can pass it in instead. Reuse, recycle, slay. โ™ป๏ธโœจ

from openstack import connection
import openstack.config

config = openstack.config.get_cloud_region(
    cloud='example',
    region_name='earth',
)
conn = connection.Connection(config=config)

๐Ÿ’ซ Using the Connection ๐Ÿ’ซ

Services are accessed through an attribute named after the service's official service-type. So conn.identity, conn.network, conn.compute โ€” it's giving organized. ๐Ÿ—‚๏ธ

List

An iterator containing a list of all the projects is retrieved in this manner:

projects = conn.identity.projects()

Find or create

If you wanted to make sure you had a network named 'zuul', you would first try to find it and if that fails, you would create it. (Find-or-create: the "if not found, make it" of cloud resources. ๐Ÿซถ)

network = conn.network.find_network("zuul")
if network is None:
    network = conn.network.create_network(name="zuul")

Additional information about the services can be found in the Service Proxies <#service-proxies> documentation.

๐ŸŒŸ from_config ๐ŸŒŸ

openstack.connection.from_config(cloud=None, config=None, options=None, **kwargs)

Create a Connection using openstack.config. It's the factory vibes.

Parameters

  • cloud (str) โ€” Use the cloud configuration details when creating the Connection.
  • config (openstack.config.cloud_region.CloudRegion <#openstack.config.cloud_region.CloudRegion>) โ€” An existing CloudRegion configuration. If no config is provided, openstack.config.OpenStackConfig will be called, and the provided name will be used in determining which cloud's configuration details will be used in creation of the Connection instance.
  • options (argparse.Namespace) โ€” Allows direct passing in of options to be added to the cloud config. This does not have to be an actual instance of argparse.Namespace, despite the naming of the openstack.config.loader.OpenStackConfig.get_one argument to which it is passed. (Naming is just quirky like that, bestie. ๐Ÿคทโ€โ™€๏ธ)

Return type: Connection

๐Ÿ‘‘ Connection Object ๐Ÿ‘‘

class openstack.connection.Connection(cloud=None, config=None, session=None, app_name=None, app_version=None, extra_services=None, strict=False, use_direct_get=None, task_manager=None, rate_limit=None, oslo_conf=None, service_types=None, global_request_id=None, strict_proxies=False, pool_executor=None, **kwargs)

Create a connection to a cloud. Main character constructor energy. ๐Ÿ’…

A connection needs information about how to connect, how to authenticate, and how to select the appropriate services to use. (The holy trinity of cloud vibes. โœจ๐ŸŒฉ๏ธ)

Okay so the recommended way to hand over this info is by referencing a named cloud config from an existing clouds.yaml file. The cloud name envvars may be used to consume a cloud configured via OS_ environment variables.

A pre-existing CloudRegion (openstack.config.cloud_region.CloudRegion) object can be passed in lieu of a cloud name, for cases where you already have a fully formed CloudRegion and literally just want to use it.

Similarly, if for some reason you already have a Session and want to use it, it may be passed in. ๐Ÿ’–

Parameters

  • cloud (str) โ€” Name of the cloud from config to use.
  • config (CloudRegion, i.e. openstack.config.cloud_region.CloudRegion) โ€” CloudRegion object representing the config for the region of the cloud in question.
  • session (Session) โ€” A session object compatible with Session.
  • app_name (str) โ€” Name of the application to be added to User Agent.
  • app_version (str) โ€” Version of the application to be added to User Agent.
  • extra_services โ€” List of ServiceDescription (openstack.service_description.ServiceDescription) objects describing services that openstacksdk otherwise does not know about.
  • use_direct_get (bool) โ€” For get methods, make specific REST calls for server-side filtering instead of making list calls and filtering client-side. Default false.
  • task_manager โ€” Ignored. Exists for backwards compat during transition. Rate limit parameters should be passed directly to the rate_limit parameter.
  • rate_limit โ€” Client-side rate limit, expressed in calls per second. The parameter can either be a single float, or it can be a dict with keys as service-type and values as floats expressing the calls per second for that service. Defaults to None, which means no rate-limiting is performed.
  • oslo_conf (ConfigOpts) โ€” An oslo.config CONF object that has been populated with keystoneauth1.loading.register_adapter_conf_options in groups named by the OpenStack service's project name.
  • service_types โ€” A list/set of service types this Connection should support. All other service types will be disabled (will error if used). Currently only supported in conjunction with the oslo_conf kwarg.
  • strict_proxies (bool) โ€” Throw an openstack.exceptions.ServiceDiscoveryException if the endpoint for a given service doesn't work. This is useful for OpenStack services using sdk to talk to other OpenStack services where it can be expected that the deployer config is correct and errors should be reported immediately. Default false.
  • global_request_id (str) โ€” A Request-id to send with all interactions.
  • pool_executor (Executor) โ€” A futurist Executor object to be used for concurrent background activities. Defaults to None in which case a ThreadPoolExecutor will be created if needed.
  • kwargs โ€” If a config is not provided, the rest of the parameters provided are assumed to be arguments to be passed to the CloudRegion constructor.

add_service(service)

Add a service to the Connection. โœจ

Attaches an instance of the Proxy (openstack.proxy.Proxy) class contained in ServiceDescription (openstack.service_description.ServiceDescription). The Proxy (openstack.proxy.Proxy) will be attached to the Connection by its service_type and by any aliases that may be specified.

Parameters

  • service (openstack.service_description.ServiceDescription from openstack.service_description.ServiceDescription) โ€” Object describing the service to be attached. As a convenience, if service is a string it will be treated as a service_type and a basic ServiceDescription (openstack.service_description.ServiceDescription) will be created.

authorize()

Authorize this Connection ๐Ÿ‘‘

Note: This method is optional. When an application makes a call to any OpenStack service, this method allows you to request a token manually before attempting to do anything else.

Returns โ€” A string token.

Raises HttpException (openstack.exceptions.HttpException) if the authorization fails due to reasons like the credentials provided are unable to be authorized or the auth_type argument is missing, etc.


connect_as(**kwargs)

Make a new Connection object with new auth context.

Take the existing settings from the current cloud and construct a new Connection object with some of the auth settings overridden. This is useful for getting an object to perform tasks with as another user, or in the context of a different project.

conn = openstack.connect(cloud='example')
# Work normally
servers = conn.list_servers()
conn2 = conn.connect_as(username='different-user', password='')
# Work as different-user
servers = conn2.list_servers()

Parameters

  • kwargs โ€” keyword arguments can contain anything that would normally go in an auth dict. They will override the same settings from the parent cloud as appropriate. Entries that do not want to be overridden can be ommitted.

connect_as_project(project)

Make a new Connection object with a new project.

Take the existing settings from the current cloud and construct a new Connection object with the project settings overridden. This is useful for getting an object to perform tasks with as another user, or in the context of a different project.

cloud = openstack.connect(cloud='example')
# Work normally
servers = cloud.list_servers()
cloud2 = cloud.connect_as_project('different-project')
# Work in different-project
servers = cloud2.list_servers()

Parameters

  • project โ€” Either a project name or a project dict as returned by list_projects.

endpoint_for(service_type, interface=None, region_name=None)

Return the endpoint for a given service. ๐Ÿฆ‹

Respects config values for Connection, including *_endpoint_override. For direct values from the catalog regardless of overrides, see get_endpoint_from_catalog() (openstack.config.cloud_region.CloudRegion.get_endpoint_from_catalog).

Parameters

  • service_type โ€” Service Type of the endpoint to search for.
  • interface โ€” Interface of the endpoint to search for. Optional, defaults to the configured value for interface for this Connection.
  • region_name โ€” Region Name of the endpoint to search for. Optional, defaults to the configured value for region_name for this Connection.

Returns โ€” The endpoint of the service, or None if not found.


add_auto_ip(server, wait=False, timeout=60, reuse=True)

Add a floating IP to a server. ๐ŸŒˆ

This method is intended for basic usage. For advanced network architecture (e.g. multiple external networks or servers with multiple interfaces), use other floating IP methods.

This method can reuse available IPs, or allocate new IPs to the current project.

Parameters

  • server โ€” a server dictionary.
  • reuse โ€” Whether or not to attempt to reuse IPs, defaults to True.
  • wait โ€” (optional) Wait for the address to appear as assigned to the server. Defaults to False.
  • timeout โ€” (optional) Seconds to wait, defaults to 60. See the wait parameter.
  • reuse โ€” Try to reuse existing ips. Defaults to True.
yes bestie, reuse is listed twice in the source โ€” both stay, no cap ๐Ÿ’…

Returns โ€” Floating IP address attached to server.


add_flavor_access(flavor_id, project_id)

Grant access to a private flavor for a project/tenant.

Parameters

  • flavor_id (string) โ€” ID of the private flavor.
  • project_id (string) โ€” ID of the project/tenant.

Returns โ€” None

Raises SDKException (openstack.exceptions.SDKException) on operation error.


add_host_to_aggregate(name_or_id, host_name)

Add a host to an aggregate.

Parameters

  • name_or_id โ€” Name or ID of the host aggregate.
  • host_name โ€” Host to add.

Raises SDKException (openstack.exceptions.SDKException) on operation error.


add_ip_list(server, ips, wait=False, timeout=60, fixed_address=None, nat_destination=None)

Attach a list of IPs to a server.

Parameters

  • server โ€” a server object
  • ips โ€” list of floating IP addresses or a single address โœจ
  • wait โ€” (optional) wait for the address to appear as assigned to the server. Defaults to False. ๐Ÿ•ฐ๏ธ
  • timeout โ€” (optional) seconds to wait, defaults to 60. See the wait parameter. โณ
  • fixed_address โ€” (optional) fixed address of the server to attach the IP to
  • nat_destination โ€” (optional) name or ID of the network that the fixed IP to attach the floating IP should be on ๐ŸŒ

Returns: the updated server โ€” openstack.compute.v2.server.Server ๐Ÿ’–

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


add_router_interface(router, subnet_id=None, port_id=None)

Attach a subnet to an internal router interface. ๐Ÿ›ฐ๏ธ

You gotta specify either a subnet ID or a port ID for the internal interface. Supply both and boom โ€” that's an error. No mixing, bestie.

Parameters

  • router (dict) โ€” the dict object of the router being changed
  • subnet_id (string) โ€” the ID of the subnet to use for the interface
  • port_id (string) โ€” the ID of the port to use for the interface

Returns: the raw response body from the request. ๐Ÿ“ฆ

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


add_server_security_groups(server, security_groups)

Add security groups to a server. ๐Ÿ”

Add existing security groups to an existing server. If the security groups are already present on the server, this will continue unaffected. So likeโ€ฆ no drama, it just keeps going.

Parameters

  • server โ€” the server to remove security groups from. (Yep, the page literally says โ€œremoveโ€ here โ€” not me being chaotic ๐Ÿ’€)
  • security_groups โ€” a list of security groups to remove.

Returns: False if server or security groups are undefined, True otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


add_user_to_group(name_or_id, group_name_or_id)

Add a user to a group. ๐Ÿ‘ฏ

Parameters

  • name_or_id โ€” name or unique ID of the user.
  • group_name_or_id โ€” group name or ID.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


add_volume_type_access(name_or_id, project_id)

Grant access on a volume_type to a project. ๐ŸŽŸ๏ธ

NOTE: the call works even if the project does not exist. Yes, really. The page said it, I'm just repeating it.

Parameters

  • name_or_id โ€” ID or name of a volume_type
  • project_id โ€” a project id

Returns: None

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


attach_port_to_machine(name_or_id, port_name_or_id)

Attach a virtual port to the bare metal machine. ๐Ÿ–ฅ๏ธโœจ

Parameters

  • name_or_id (string) โ€” a machine name or UUID.
  • port_name_or_id (string) โ€” a port name or UUID. Note that this is a Network service port, not a bare metal NIC. Important distinction, bestie ๐Ÿซถ

Returns: Nothing.


attach_volume(server, volume, device=None, wait=True, timeout=None)

Attach a volume to a server. ๐Ÿ’ฝ

This will attach a volume, described by the passed-in volume dict (as returned by get_volume()), to the server described by the passed-in server dict (as returned by get_server()) on the named device on the server.

If the volume is already attached to the server, or generally not available, then an exception is raised. To re-attach to a server, but under a different device, the user must detach it first. No sneaky double-attach, okay? ๐Ÿ˜ญ

Parameters

  • server โ€” the server dict to attach to.
  • volume โ€” the volume dict to attach.
  • device โ€” the device name where the volume will attach.
  • wait โ€” if true, waits for volume to be attached.
  • timeout โ€” seconds to wait for volume attachment. None is forever.

Returns: a volume attachment object.

Raises: ResourceTimeout <#openstack.exceptions.ResourceTimeout> if wait time exceeded.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


available_floating_ip(network=None, server=None)

Get a floating IP from a network or a pool. ๐ŸŒŠ

Return the first available floating IP or allocate a new one.

Parameters

  • network โ€” name or ID of the network.
  • server โ€” server the IP is for if known

Returns: a (normalized) structure with a floating IP address description.


bind_accelerator_request(uuid, properties)

Bind an accelerator to VM. โšก

A deprecated alias for patch_accelerator_request. ๐Ÿšจ Deprecated alert, bestie โ€” it's giving โ€œold route, still works, donโ€™t make it your whole personality.โ€


close()

Release any resources held open. ๐Ÿงนโœจ


create_accelerator_request(attrs)

Create an accelerator_request. ๐Ÿš€

Parameters

  • attrs โ€” the info of accelerator_request to be created.

Returns: an accelerator AcceleratorRequest object.


create_aggregate(name, availability_zone=None)

Create a new host aggregate. ๐Ÿ—๏ธ

Parameters

  • name โ€” name of the host aggregate being created
  • availability_zone โ€” availability zone to assign hosts

Returns: the created compute Aggregate object.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


create_cluster_template(name, image_id=None, keypair_id=None, coe=None, **kwargs)

Create a cluster template. ๐Ÿงฉ

Parameters

  • name (string) โ€” name of the cluster template.
  • image_id (string) โ€” name or ID of the image to use.
  • keypair_id (string) โ€” name or ID of the keypair to use.
  • coe (string) โ€” name of the coe for the cluster template. Other arguments will be passed in kwargs.

Returns: a dict containing the cluster template description

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


create_coe_cluster(name, cluster_template_id, **kwargs)

Create a COE cluster based on given cluster template. ๐Ÿณ

Parameters

  • name (string) โ€” name of the cluster.
  • cluster_template_id (string) โ€” ID of the cluster template to use.
  • kwargs (dict) โ€” any other arguments to pass in.

Returns: the created container infrastructure management Cluster object.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


create_container(name, public=False)

Create an object-store container. ๐Ÿ—ƒ๏ธ

Parameters

  • name (str) โ€” name of the container to create.
  • public (bool) โ€” whether to set this container to be public. Defaults to False.

Returns: the created object store Container object.


create_device_profile(attrs)

Create a device_profile. ๐Ÿงฌ

Parameters

  • attrs โ€” the info of device_profile to be created.

Returns: an accelerator DeviceProfile objects.


create_directory_marker_object(container, name, **headers)

Create a zero-byte directory marker object. ๐Ÿ“โœจ

Note: this method is not needed in most cases. Modern swift does not require directory marker objects. However, some swift installs may need these.

When using swift Static Web and Web Listings to serve static content one may need to create a zero-byte object to represent each โ€œdirectoryโ€. Doing so allows Web Listings to generate an index of the objects inside of it, and allows Static Web to render index.html โ€œfilesโ€ that are โ€œinsideโ€ the directory.

Parameters

  • container โ€” the name of the container.
  • name โ€” name for the directory marker object within the container.
  • headers โ€” these will be passed through to the object creation API as HTTP Headers.

Returns: the created object store Object object.


create_domain(name, description=None, enabled=True)

Create a domain. ๐Ÿ‘‘

Parameters

  • name โ€” the name of the domain.
  • description โ€” a description of the domain.
  • enabled โ€” is the domain enabled or not (defaults to True) โœจ

Returns โ€” the created identity Endpoint object ๐Ÿ’–

Raises SDKException if the domain cannot be created ๐Ÿ˜ญ


create_endpoint(service_name_or_id, url=None, interface=None, region=None, enabled=True, **kwargs)

okay so this one makes a Keystone endpoint โ€” the actual addressable thing your service lives at ๐Ÿ”ฅ

Parameters

  • service_name_or_id โ€” service name or id this endpoint belongs to ๐ŸŽ€
  • url โ€” URL of the endpoint
  • interface โ€” interface type of the endpoint
  • public_url โ€” the endpoint's public URL ๐ŸŒˆ
  • internal_url โ€” the endpoint's internal URL
  • admin_url โ€” the endpoint's admin URL ๐Ÿ‘‘
  • region โ€” endpoint region
  • enabled โ€” whether the endpoint is enabled or not

Returns โ€” a list of identity Endpoint objects ๐Ÿ’…

Raises SDKException if the service can't be found, or if something goes sideways during the OpenStack API call ๐Ÿ’€


create_endpoint_group(name, filters, description=None)

creates a Keystone endpoint group, no cap ๐Ÿซถ

Parameters

  • name โ€” the name of the endpoint group ๐ŸŒธ
  • description โ€” the description of the endpoint group
  • filters โ€” describes the filtering performed by the endpoint group ๐Ÿ”

Returns โ€” an identity EndpointGroup object โœจ

Raises SDKException if the endpoint group cannot be created ๐Ÿ˜ญ


create_firewall_group(**kwargs)

creates a firewall group ๐Ÿงฑ Two things worth knowing: the keys egress_firewall_policy and ingress_firewall_policy get looked up and mapped to egress_firewall_policy_id and ingress_firewall_policy_id respectively, and the port name-or-ids list gets turned into a list of port ids before the POST request goes out. iykyk ๐Ÿ’…

Parameters

  • admin_state_up (bool) โ€” state of the firewall group. Setting it to False will block all traffic. Defaults to True โš ๏ธ
  • description โ€” human-readable description
  • egress_firewall_policy โ€” name or id of the egress firewall policy
  • ingress_firewall_policy โ€” name or id of the ingress firewall policy
  • name โ€” human-readable name ๐ŸŽ€
  • ports (list[str]) โ€” list of associated ports (name or id)
  • project_id โ€” project id
  • shared โ€” visibility to other projects. Defaults to False ๐Ÿฆ‹

Raises BadRequestException if parameters are malformed

Raises DuplicateResource on multiple matches ๐Ÿ‘€

Raises NotFoundException if the (ingress-, egress-) firewall policy or a port is not found ๐Ÿ’€

Returns โ€” the created network FirewallGroup object ๐Ÿ’–


create_firewall_policy(**kwargs)

creates a firewall policy, iconic behaviour honestly ๐ŸŒŸ

Parameters

  • audited (bool) โ€” status of audition of firewall policy. It gets set to False every time the firewall policy or its associated firewall rules are changed, and it has to be explicitly set back to True ๐Ÿ™ˆ
  • description โ€” human-readable description
  • firewall_rules (list[str]) โ€” list of associated firewall rules
  • name โ€” human-readable name
  • project_id โ€” project id
  • shared (bool) โ€” visibility to other projects. Defaults to False โœจ

Raises BadRequestException if parameters are malformed

Raises NotFoundException if a resource from firewall_list isn't found ๐Ÿ˜ญ

Returns โ€” the created network FirewallPolicy object ๐Ÿซถ


create_firewall_rule(**kwargs)

creates a firewall rule โ€” this is the one with the most knobs, lowkey a lot ๐ŸŽ›๏ธ

Parameters

  • action โ€” action performed on traffic. Valid values: allow, deny. Defaults to deny โš ๏ธ
  • description โ€” human-readable description
  • destination_firewall_group_id โ€” id of the destination firewall group
  • destination_ip_address โ€” IPv4-, IPv6 address or CIDR
  • destination_port โ€” port or port range (e.g. 80:90)
  • enabled (bool) โ€” status of the firewall rule. you can disable rules without disassociating them from firewall policies. Defaults to True ๐Ÿ’…
  • ip_version (int) โ€” IP version. Valid values: 4, 6. Defaults to 4
  • name โ€” human-readable name ๐ŸŒธ
  • project_id โ€” project id
  • protocol โ€” IP protocol. Valid values: icmp, tcp, udp, null
  • shared (bool) โ€” visibility to other projects. Defaults to False
  • source_firewall_group_id โ€” id of the source firewall group
  • source_ip_address โ€” IPv4-, IPv6 address or CIDR
  • source_port โ€” port or port range (e.g. 80:90) ๐Ÿ”ฅ

Raises BadRequestException if parameters are malformed

Returns โ€” the created network FirewallRule object ๐Ÿ’–


create_flavor(name, ram, vcpus, disk, description=None, flavorid='auto', ephemeral=0, swap=0, rxtx_factor=1.0, is_public=True)

creates a brand new flavor, the blueprint for your servers ๐ŸŽ€

Parameters

  • name โ€” descriptive name of the flavor
  • ram โ€” memory in MB for the flavor
  • vcpus โ€” number of VCPUs for the flavor
  • disk โ€” size of local disk in GB ๐Ÿ’พ
  • description โ€” description of the flavor
  • flavorid โ€” id for the flavor (optional)
  • ephemeral โ€” ephemeral space size in GB
  • swap โ€” swap space in MB
  • rxtx_factor โ€” RX/TX factor
  • is_public โ€” make the flavor accessible to the public ๐ŸŒˆ

Returns โ€” the created compute Flavor object โœจ

Raises SDKException on operation error ๐Ÿ˜ญ


create_floating_ip(network=None, server=None, fixed_address=None, nat_destination=None, port=None, wait=False, timeout=60)

allocates a new floating IP from a network or a pool ๐ŸŒŠ so glamorous of it

Parameters

  • network โ€” name or ID of the network the floating IP should come from
  • server โ€” (optional) server dict for the server to create the IP for and to which it should be attached
  • fixed_address โ€” (optional) fixed IP to attach the floating IP to
  • nat_destination โ€” (optional) name or ID of the network that the fixed IP to attach the floating IP to should be on
  • port โ€” (optional) the port ID the floating IP should be attached to. heads up: specifying a port conflicts with specifying a server, fixed_address or nat_destination โš ๏ธ
  • wait โ€” (optional) whether to wait for the IP to be active. Defaults to False. Only applies if a server is provided
  • timeout โ€” (optional) how long to wait for the IP to be active. Defaults to 60. Only applies if a server is provided โณ

Returns โ€” a floating IP address ๐Ÿ’…

Raises SDKException on operation error ๐Ÿ’€


create_group(name, description, domain=None)

creates a group ๐Ÿ‘ฏโ€โ™€๏ธ literally the friend group of identity objects

Parameters

  • name (string) โ€” group name
  • description (string) โ€” group description
  • domain (string) โ€” domain name or ID for the group ๐ŸŒธ

Returns โ€” an identity Group object ๐Ÿซถ

Raises SDKException if something goes wrong during the OpenStack API call ๐Ÿ˜ญ


create_image(name, filename=None, container=None, md5=None, sha256=None, disk_format=None, container_format=None, disable_vendor_agent=True, wait=False, timeout=3600, tags=None, allow_duplicates=False, meta=None, volume=None, **kwargs)

uploads an image ๐Ÿ–ผ๏ธ main character energy fr fr

Parameters

  • name (str) โ€” name of the image to create. if it's a pathname of an image, the name will be constructed from the extensionless basename of the path โœจ
  • filename (str) โ€” the path to the file to upload, if needed (optional, defaults to None)
  • container (str) โ€” name of the container in swift where images should be uploaded for import if the cloud requires such a thing (optional, defaults to 'images') ๐Ÿฆ‹
  • md5 (str) โ€” md5 sum of the image file. if it's not given, an md5 will be calculated ๐Ÿ”

and there's more params where that came from, don't you worry bestie ๐Ÿ’…

  • sha256 (str) โ€” the sha256 sum of the image file. If you don't pass it, an md5 gets calculated instead. ๐Ÿ’…
    • disk_format (str) โ€” which disk format the image is in. (optional, and it defaults to the os-client-config config value for this cloud)
    • container_format (str) โ€” the container format the image is in. (optional, defaults to the os-client-config config value for this cloud, same deal)
    • tags (list) โ€” the list of tags for this image. Every tag is a string of at most 255 chars. โœจ
    • disable_vendor_agent (bool) โ€” whether or not to append metadata flags to the image so the cloud in question knows not to expect a vendor agent to be running. (optional, defaults to True)
    • wait (bool) โ€” if true, it waits for the image to be created. Defaults to true โ€” but heads up bestie, one of the upload methods is always synchronous, so likeโ€ฆ yeah. ๐Ÿ˜ญ
    • timeout โ€” seconds to wait for image creation. None is forever.
    • allow_duplicates โ€” if true, it skips the checks that enforce unique image name. (optional, defaults to False)
    • meta โ€” a dict of key/value pairs to use for metadata that bypasses automatic type conversion.
    • volume โ€” name or ID or volume object of a volume to create an image from. Mutually exclusive with (optional, defaults to None)

Additional kwargs will be passed to the image creation as additional metadata for the image, and every value gets converted to string โ€” except for min_disk, min_ram, size and virtual_size, which get converted to int. ๐Ÿงฎ

So if you're 100% sure all your data types are correct, or you have some advanced need to be explicit, use meta. If you're just a normal consumer, passing kwargs is probably the move. ๐Ÿซถ

And if a value shows up in both meta and kwargs โ€” meta wins. periodt.

Returns An image openstack.image.v2.image.Image <#openstack.image.v2.image.Image> object.

Raises SDKException <#openstack.exceptions.SDKException> if there are problems uploading.


create_image_snapshot(name, server, wait=False, timeout=3600, **metadata)

Create an image by snapshotting an existing server. ๐Ÿ“ธ

note: on most clouds this is a cold snapshot โ€” meaning the server in question will be shut down before the snapshot is taken. It's possible that it's a live snapshot, but there is literally no way to know as a user, so caveat emptor. ๐Ÿ’€

Parameters

  • name โ€” name of the image to be created
  • server โ€” server name or ID or dict representing the server to be snapshotted
  • wait โ€” if true, waits for image to be created.
  • timeout โ€” seconds to wait for image creation. None is forever.
  • metadata โ€” metadata to give the newly-created image entity

Returns The created image Image object. ๐Ÿ‘‘

Raises SDKException <#openstack.exceptions.SDKException> if there are problems uploading.


create_keypair(name, public_key=None)

Create a new keypair. ๐Ÿ”‘โœจ

Parameters

  • name โ€” name of the keypair being created.
  • public_key โ€” public key for the new keypair.

Returns The created compute Keypair object.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


create_network(name, shared=False, admin_state_up=True, external=False, provider=None, project_id=None, availability_zone_hints=None, port_security_enabled=None, mtu_size=None, dns_domain=None)

Create a network. ๐ŸŒ

Parameters

  • name (string) โ€” name of the network being created.
  • shared (bool) โ€” set the network as shared.
  • admin_state_up (bool) โ€” set the network administrative state to up.
  • external (bool) โ€” whether this network is externally accessible.
  • provider (dict) โ€” a dict of network provider options. Example:
{'network_type': 'vlan', 'segmentation_id': 'vlan1'}
  • project_id (string) โ€” specify the project ID this network will be created on (admin-only). ๐Ÿ‘€
  • availability_zone_hints (types.ListType) โ€” a list of availability zone hints.
  • port_security_enabled (bool) โ€” enable / disable port security
  • mtu_size (int) โ€” maximum transmission unit value to address fragmentation. Minimum value is 68 for IPv4, and 1280 for IPv6.
  • dns_domain (string) โ€” specify the DNS domain associated with this network.

Returns The created network Network object.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


create_object(container, name, filename=None, md5=None, sha256=None, segment_size=None, use_slo=True, metadata=None, generate_checksums=None, data=None, **headers)

Create a file object. ๐Ÿ—‚๏ธ

Automatically uses large-object segments if needed โ€” she's smart like that.

Parameters

  • container โ€” the name of the container to store the file in. This container will be created if it doesn't exist already.
  • name โ€” name for the object within the container.
  • filename โ€” the path to the local file whose contents will be uploaded. Mutually exclusive with data.
  • data โ€” the content to upload to the object. Mutually exclusive with filename.
  • md5 โ€” a hexadecimal md5 of the file. (Optional) if it's known and you can pass it here, it saves repeating the expensive md5 process. It's assumed to be accurate.
  • sha256 โ€” a hexadecimal sha256 of the file. (Optional) see md5.
  • segment_size โ€” break the uploaded object into segments of this many bytes. (Optional) Shade will attempt to discover the maximum value for this from the server if it isn't specified, or will use a reasonable default.
  • headers โ€” these will be passed through to the object creation API as HTTP Headers.
  • use_slo โ€” if the object is large enough to need to be a Large Object, use a static rather than dynamic object. Static Objects will delete segment objects when the manifest object is deleted. (optional, defaults to True)
  • generate_checksums โ€” whether to generate checksums on the client side that get added to headers, for later prevention of double uploads of identical data. (optional, defaults to True)
  • metadata โ€” this dict will get changed into headers that set metadata of the object

Returns The created object store Object object.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


create_port(network_id, **kwargs)

Create a port. ๐Ÿ”Œ

Parameters

  • network_id โ€” the ID of the network. (Required)
  • name โ€” a symbolic name for the port. (Optional)
  • admin_state_up โ€” the administrative status of the port, which is up (true, default) or down (false). (Optional)
  • mac_address โ€” the MAC address. (Optional)
  • fixed_ips โ€” list of ip_addresses and subnet_ids. See subnet_id and ip_address. (Optional) For example:
[
    {
        "ip_address": "10.29.29.13",
        "subnet_id": "a78484c4-c380-4b47-85aa-21c51a2d8cbd",
    },
    ...,
]

where

subnet_id: If you specify only a subnet
       ID,
               OpenStack Networking allocates an
               available IP from that subnet to
               the port.

ip_address: (Optional) If you specify both
a subnet ID and
               an IP address, OpenStack Networking
               tries to allocate the specified
               address to the port.
  • security_groups โ€” list of security group UUIDs. (Optional)
  • allowed_address_pairs โ€” allowed address pairs list (Optional) For example:
  • extra_dhcp_opts โ€” extra DHCP options, optional bestie. Like this:
[{"opt_name": "opt name1", "opt_value": "value1"}, ...]
  • device_owner โ€” the ID of the entity that uses this port. Think a DHCP agent, that kind of thing. (Optional)
  • device_id โ€” the ID of the device using this port, like a virtual server. (Optional)
  • vnic_type (binding) โ€” the type of the port we're creating. (Optional)
  • port_security_enabled โ€” the security port state that gets created on the network. (Optional)
  • qos_policy_id โ€” the ID of the QoS policy you want applied to this port. (Optional)
  • project_id โ€” which project the port lives in. (Optional)
  • description โ€” a lil description of the port. (Optional)
  • dns_domain โ€” the DNS domain relevant for the port. (Optional)
  • dns_name โ€” the DNS name of the port. (Optional)
  • numa_affinity_policy โ€” the numa affinity policy, honestly. Can be "None", "required", "preferred" or "legacy". (Optional)
  • propagate_uplink_status โ€” whether the uplink status of the port should be propagated. (Optional)
  • mac_learning_enabled โ€” whether mac learning should be enabled on the port. (Optional)

Returns โ€” the created network Port object. ๐ŸŽ€

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ˜ญ


create_project(name, domain_id, description=None, enabled=True, **kwargs)

Create a project. Slay, an org chart in code form. โœจ

Parameters

  • name
  • domain_id
  • description
  • enabled

Returns โ€” an identity Project object. ๐Ÿ’œ


create_qos_bandwidth_limit_rule(policy_name_or_id, max_kbps, **kwargs)

Create a QoS bandwidth limit rule. Speed limits but make it cloud. ๐Ÿ”ฅ

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy this rule should be attached to.
  • max_kbps (int) โ€” the maximum bandwidth limit value, in kilobits per second.
  • max_burst_kbps (int) โ€” the maximum burst value, in kilobits.
  • direction (string) โ€” ingress or egress. Basically: which way is the traffic getting limited.

Returns โ€” the created network QoSBandwidthLimitRule object. โœจ

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


create_qos_dscp_marking_rule(policy_name_or_id, dscp_mark)

Create a QoS DSCP marking rule. Fancy packet-labeling behaviour, we love to see it. ๐ŸŽ€

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy this rule should be attached to.
  • dscp_mark (int) โ€” the DSCP mark value.

Returns โ€” the created network QoSDSCPMarkingRule object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


create_qos_minimum_bandwidth_rule(policy_name_or_id, min_kbps, **kwargs)

Create a QoS minimum bandwidth limit rule. The floor, not the ceiling, bestie. ๐Ÿฆ‹

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy this rule should be attached to.
  • min_kbps (int) โ€” the minimum bandwidth value, in kilobits per second.
  • direction (string) โ€” ingress or egress. The direction in which the traffic will be available.

Returns โ€” the created network QoSMinimumBandwidthRule object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


create_qos_policy(**kwargs)

Create a QoS policy. The whole vibe container for the rules above. ๐Ÿ‘‘

Parameters

  • name (string) โ€” the name of the QoS policy being created.
  • description (string) โ€” description of the created QoS policy.
  • shared (bool) โ€” set the QoS policy as shared.
  • default (bool) โ€” set the QoS policy as the default for the project.
  • project_id (string) โ€” specify the project ID this QoS policy will be created on (admin-only).

Returns โ€” the created network QosPolicy object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


create_recordset(zone, name, recordset_type, records, description=None, ttl=None)

Create a recordset. DNS but make it an accessory. ๐Ÿ’…

Parameters

  • zone โ€” name, ID or openstack.dns.v2.zone.Zone <#openstack.dns.v2.zone.Zone> instance of the zone managing the recordset.
  • name โ€” name of the recordset.
  • recordset_type โ€” type of the recordset.
  • records โ€” list of the recordset definitions.
  • description โ€” description of the recordset.
  • ttl โ€” TTL value of the recordset.

Returns โ€” a dict representing the created recordset.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


create_role(name, **kwargs)

Create a Keystone role. Permissions era. ๐ŸŒˆ

Parameters

  • name (string) โ€” the name of the role.
  • domain_id โ€” domain id (v3).

Returns โ€” an identity Role object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> if the role cannot be created.


create_router(name=None, admin_state_up=True, ext_gateway_net_id=None, enable_snat=None, ext_fixed_ips=None, project_id=None, availability_zone_hints=None)

Create a logical router. The main character of your network topology, fr. ๐Ÿšฆ

Parameters

  • name (string) โ€” the router name.
  • admin_state_up (bool) โ€” the administrative state of the router.
  • ext_gateway_net_id (string) โ€” network ID for the external gateway.
  • enable_snat (bool) โ€” enable the Source NAT (SNAT) attribute.
  • ext_fixed_ips โ€” list of dictionaries of the desired IP and/or subnet on the external network. Example:
[
    {
        "subnet_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b",
        "ip_address": "192.168.10.2",
    }
]
  • project_id (string) โ€” project ID for the router.
  • availability_zone_hints (types.ListType) โ€” a list of availability zone hints.

Returns โ€” the created network Router object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


create_security_group(name, description, project_id=None, stateful=None)

Create a new security group. Your little velvet rope for traffic. ๐ŸŽ€

Parameters

  • name (string) โ€” a name for the security group.
  • description (string) โ€” describes the security group.
  • project_id (string) โ€” specify the project ID this security group will be created on (admin-only).
  • stateful (string) โ€” whether the security group is stateful or not.

Returns โ€” a openstack.network.v2.security_group.SecurityGroup representing the new security group.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.

Raises โ€” OpenStackCloudUnavailableFeature if security groups are not supported on this cloud. ๐Ÿ˜ญ Rough.


create_security_group_rule(secgroup_name_or_id, port_range_min=None, port_range_max=None, protocol=None, remote_ip_prefix=None, remote_group_id=None, remote_address_group_id=None, direction='ingress', ethertype='IPv4', project_id=None, description=None)

Create a new security group rule. The actual individual rules of the velvet rope. ๐Ÿ’…

Parameters

  • secgroup_name_or_id (string) โ€” the security group name or ID to associate with this security group rule. Heads up: if you hand it a non-unique group name, an exception is raised.
  • port_range_min (int) โ€” the minimum port number in the range matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the port_range_max attribute value. And like, if nova is used by the cloud provider for security groups, then a value of None will be transformed to -1.
  • port_range_max (int) โ€” the biggest port number in the range this security group rule matches ๐Ÿ’… real talk: port_range_min is the one that constrains port_range_max. And if your cloud provider uses nova for security groups, then a value of None gets transformed into -1. iykyk.
    • protocol (string) โ€” the protocol this security group rule matches. Valid values are None, tcp, udp, and icmp. that's the whole list, bestie, don't get creative ๐ŸŽ€
    • remote_ip_prefix (string) โ€” the remote IP prefix to associate with this security group rule. This attribute matches the specified IP prefix as the source IP address of the IP packet. it's giving "who's allowed in" energy โœจ
    • remote_group_id (string) โ€” the remote group ID to associate with this security group rule.
    • remote_address_group_id (string) โ€” the remote address group ID to associate with this security group rule.
    • direction (string) โ€” ingress or egress: the direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance. so ingress = coming in, egress = heading out ๐Ÿฆ‹
    • ethertype (string) โ€” must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. no mixing, no matching, periodt.
    • project_id (string) โ€” specify the project ID this security group will be created on (admin-only). ๐Ÿ‘‘ admin only, so if that's not you, this one's not for you.
    • description (string) โ€” description of the rule, max 255 characters.

Returns

A openstack.network.v2.security_group.SecurityGroup representing the new security group rule. a whole new rule, freshly created, slay ๐Ÿ’–

Raises

SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ˜ญ


create_server(name, image=None, flavor=None, auto_ip=True, ips=None, ip_pool=None, root_volume=None, terminate_volume=False, wait=False, timeout=180, reuse_ips=True, network=None, boot_from_volume=False, volume_size='50', boot_volume=None, volumes=None, nat_destination=None, group=None, **kwargs)

Create a virtual server instance. this is the big one, the main character of the whole SDK, no cap ๐Ÿ”ฅ

Parameters

  • name โ€” something to name the server. give it a good one, bestie ๐ŸŽ€
  • image โ€” image dict, name or ID to boot with. image is required unless boot_volume is given. one or the other, okurr.
  • flavor โ€” flavor dict, name or ID to boot onto.
  • auto_ip โ€” whether to take actions to find a routable IP for the server. (defaults to True) ๐Ÿซถ
  • ips โ€” list of IPs to attach to the server (defaults to None)
  • ip_pool โ€” name of the network or floating IP pool to get an address from. (defaults to None)
  • root_volume โ€” name or ID of a volume to boot from (defaults to None โ€” deprecated, use boot_volume). โš ๏ธ deprecated, so lowkey don't.
  • boot_volume โ€” name or ID of a volume to boot from (defaults to None)
  • terminate_volume โ€” if booting from a volume, whether it should be deleted when the server is destroyed. (defaults to False) so by default the volume lives, okurr ๐Ÿ’€
  • volumes โ€” (optional) a list of volumes to attach to the server
  • meta โ€” (optional) a dict of arbitrary key/value metadata to store for this server. Both keys and values must be <=255 characters.
  • files โ€” (optional, deprecated) a dict of files to overwrite on the server upon boot. Keys are file names (i.e. /etc/passwd) and values are the file contents (either as a string or as a file-like object). A maximum of five entries is allowed, and each file must be 10k or less. ๐Ÿ™ˆ five files max and 10k each, them's the rules.
  • reservation_id โ€” a UUID for the set of servers being requested.
  • min_count โ€” (optional extension) the minimum number of servers to launch.
  • max_count โ€” (optional extension) the maximum number of servers to launch.
  • security_groups โ€” a list of security group names
  • userdata โ€” user data to pass to be exposed by the metadata server; this can be a file type object as well or a string. โœจ
  • key_name โ€” (optional extension) name of previously created keypair to inject into the instance.
  • availability_zone โ€” name of the availability zone for instance placement.
  • block_device_mapping โ€” (optional) a dict of block device mappings for this server.
  • block_device_mapping_v2 โ€” (optional) a dict of block device mappings for this server. yes there's a v2, no we're not skipping it ๐Ÿ’…
  • nics โ€” (optional extension) an ordered list of nics to be added to this server, with information about connected networks, fixed IPs, port etc.
  • scheduler_hints โ€” (optional extension) arbitrary key-value pairs specified by the client to help boot an instance
  • config_drive โ€” (optional extension) value for config drive either boolean, or volume-id
  • disk_config โ€” (optional extension) control how the disk is partitioned when the server is created. possible values are 'AUTO' or 'MANUAL'. two options, pick one bestie ๐Ÿฆ‹
  • admin_pass โ€” (optional extension) add a user supplied admin password. ๐Ÿ‘‘
  • wait โ€” (optional) wait for the address to appear as assigned to the server. Defaults to False.
  • timeout โ€” (optional) seconds to wait, defaults to 60. See the wait parameter. โณ (yes the signature up there says 180, the description says 60 โ€” we're just reporting what the page says, don't come for me ๐Ÿ˜ญ)
  • reuse_ips โ€” (optional) whether to attempt to reuse pre-existing floating ips should a floating IP be needed (defaults to True)
  • network โ€” (optional) network dict or name or ID to attach the server to. Mutually exclusive with the nics parameter. Can also be a list of network names or IDs or network dicts. mutually exclusive means not both, bestie, pick a lane ๐ŸŽ€
  • boot_from_volume โ€” whether to boot from volume. 'boot_volume' implies True, but boot_from_volume=True with no boot_volume is valid and will create a volume from the image and use that. iconic behaviour honestly โœจ
  • volume_size โ€” when booting an image from volume, how big should the created volume be? Defaults to 50.
  • nat_destination โ€” which network should a created floating IP be attached to, if it's not possible to infer from the cloud's configuration. (Optional, defaults to None)
  • group โ€” ServerGroup dict, name or id to boot the server in. If a group is provided in both scheduler_hints and in the group param, the group param will win. (Optional, defaults to None) ๐Ÿ† group param takes the crown.

Returns

The created compute Server object. ๐Ÿ–ฅ๏ธ your baby is born.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ˜ญ


create_server_group(name, policies=None, policy=None)

Create a new server group. squads, but for servers ๐Ÿซถ

Parameters

  • name โ€” name of the server group being created
  • policies โ€” list of policies for the server group.

Returns

The created compute ServerGroup object.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


create_service(name, enabled=True, **kwargs)

Create a service. โœจ

Parameters

  • name โ€” service name.
  • type โ€” service type. (type or service_type required.)
  • service_type โ€” service type. (type or service_type required.) yes both are listed, and yes one of them is required, we're not making the rules ๐Ÿ’…
  • description โ€” service description (optional).
  • enabled โ€” whether the service is enabled (v3 only)

Returns

an identity Service object

Raises

SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


create_stack(name, tags=None, template_file=None, template_url=None, template_object=None, files=None, rollback=True, wait=False, timeout=3600, environment_files=None, **parameters)

Create a stack. stacking, but make it cloud ๐Ÿงš

Parameters

  • name โ€” name of the stack.
  • tags โ€” list of tag(s) of the stack. (optional)
  • template_file โ€” path to the template.
  • template_url โ€” URL of template.
  • template_object โ€” URL to retrieve template object.
  • files โ€” a dict of extra file content you wanna include ๐Ÿ“
  • rollback โ€” turn on rollback if the create fails (yes queen, safety net)
  • wait โ€” whether to wait for the delete to finish
  • timeout โ€” stack create timeout, counted in seconds โฑ๏ธ
  • environment_files โ€” paths to the environment files you want applied

Any other arguments you throw in get passed along as stack parameters, and those take precedence over anything those same parameters say inside the environments. Lowkey important, bestie.

Only one of template_file, template_url, template_object should be specified. Pick one. Just one. ๐Ÿ’…

Returns โ€” a dict holding the stack description

Raises โ€” SDKException (as in openstack.exceptions.SDKException) if something goes sideways during the OpenStack API call ๐Ÿ˜ญ


create_subnet

create_subnet(network_name_or_id, cidr=None, ip_version=4,
enable_dhcp=False, subnet_name=None, tenant_id=None,
allocation_pools=None, gateway_ip=None, disable_gateway_ip=False,
dns_nameservers=None, host_routes=None, ipv6_ra_mode=None,
ipv6_address_mode=None, prefixlen=None,
use_default_subnetpool=False, subnetpool_name_or_id=None,
**kwargs)

Make a subnet on a network you already picked out. Slay ๐Ÿฆ‹

Parameters

  • network_name_or_id (string) โ€” the unique name or ID of the attached network. Heads up: if the name you give isn't unique, it raises an exception ๐Ÿ™ˆ
  • cidr (string) โ€” the CIDR. Only one of cidr, use_default_subnetpool and subnetpool_name_or_id can be specified at the same time. One. Not two. Not three.
  • ip_version (int) โ€” the IP version, and it's either 4 or 6
  • enable_dhcp (bool) โ€” set to True if DHCP is enabled and False if it's disabled. Default is False.
  • subnet_name (string) โ€” the name of the subnet
  • tenant_id (string) โ€” the ID of the tenant that owns the network. Only admin users can hand out a tenant ID that isn't their own ๐Ÿ‘‘
  • allocation_pools โ€” a list of dictionaries with the start and end addresses for the allocation pools. Like, for example:
[{"start": "192.168.199.2", "end": "192.168.199.254"}]
  • gateway_ip (string) โ€” the gateway IP address. When you specify both allocation_pools and gateway_ip, you must make sure the gateway IP doesn't overlap with the allocation pools you gave. No overlap, no drama ๐Ÿ’€
  • disable_gateway_ip (bool) โ€” set to True if the gateway IP address is disabled and False if it's enabled. It is not allowed alongside gateway_ip. Default is False.
  • dns_nameservers โ€” a list of DNS name servers for the subnet. For example:
["8.8.8.7", "8.8.8.8"]
  • host_routes โ€” a list of host route dictionaries for the subnet. For example:
[
    {"destination": "0.0.0.0/0", "nexthop": "123.456.78.9"},
    {"destination": "192.168.0.0/24", "nexthop": "192.168.0.1"},
]
  • ipv6_ra_mode (string) โ€” IPv6 Router Advertisement mode. Valid values are: 'dhcpv6-stateful', 'dhcpv6-stateless', or 'slaac'.
  • ipv6_address_mode (string) โ€” IPv6 address mode. Valid values are: 'dhcpv6-stateful', 'dhcpv6-stateless', or 'slaac'.
  • prefixlen (string) โ€” the prefix length to use for subnet allocation from a subnetpool
  • use_default_subnetpool (bool) โ€” use the default subnetpool for ip_version to obtain a CIDR. Only one of cidr, use_default_subnetpool and subnetpool_name_or_id may be specified at the same time. (Yes, saying it again. It's that serious.)
  • subnetpool_name_or_id (string) โ€” the unique name or id of the subnetpool to grab a CIDR from. Only one of cidr, use_default_subnetpool and subnetpool_name_or_id may be specified at the same time.
  • kwargs โ€” key value pairs passed straight to the Neutron API โœจ

Returns โ€” the created network Subnet object ๐ŸŽ€

Raises โ€” SDKException (that's openstack.exceptions.SDKException) on operation error


create_user

create_user(name, password=None, email=None,
default_project=None, enabled=True, domain_id=None,
description=None)

Create a user. That's it, that's the whole thing. Iconic minimalism ๐Ÿ’œ


create_volume

create_volume(size, wait=True, timeout=None, image=None,
bootable=None, **kwargs)

Create a volume. Big storage energy ๐Ÿ”ฅ

Parameters

  • size โ€” size, in GB, of the volume you're creating
  • wait โ€” if true, it waits for the volume to be created
  • timeout โ€” seconds to wait for volume creation. None is forever ๐ŸŒˆ
  • image โ€” (optional) image name, ID or object to create the volume from
  • bootable โ€” (optional) make this volume bootable. If it's set, wait also gets set to true.
  • kwargs โ€” keyword arguments as expected for the cinder client

Returns โ€” the created volume Volume object

Raises โ€” ResourceTimeout (openstack.exceptions.ResourceTimeout) if the wait time is exceeded โฐ

Raises โ€” SDKException (openstack.exceptions.SDKException) on operation error


create_volume_backup

create_volume_backup(volume_id, name=None, description=None,
force=False, wait=True, timeout=None, incremental=False,
snapshot_id=None)

Create a volume backup. Because bestie, you need a backup ๐Ÿซถ

Parameters

  • volume_id โ€” the ID of the volume to back up
  • name โ€” name of the backup. One gets generated for you if you don't provide one.
  • description โ€” description of the backup. Same deal, one gets generated if you don't provide one.
  • force โ€” if set to True the backup gets created even if the volume is attached to an instance; if False, it won't
  • wait โ€” if true, it waits for the volume backup to be created
  • timeout โ€” seconds to wait for the volume backup creation. None is forever
  • incremental โ€” if set to true, the backup will be incremental
  • snapshot_id โ€” the UUID of the source snapshot to back up

Returns โ€” the created volume Backup object

Raises โ€” ResourceTimeout (openstack.exceptions.ResourceTimeout) if the wait time is exceeded

Raises โ€” SDKException (openstack.exceptions.SDKException) on operation error


create_volume_snapshot

create_volume_snapshot(volume_id, force=False, wait=True,
timeout=None, **kwargs)

Create a snapshot ๐Ÿ“ธ

Parameters

  • volume_id โ€” the ID of the volume to snapshot
  • force โ€” if set to True the snapshot gets created even if the volume is attached to an instance; if False, it won't
  • name โ€” name of the snapshot. One gets generated if you don't provide one.
  • description โ€” description of the snapshot. One gets generated if you don't provide one.
  • wait โ€” if true, it waits for the volume snapshot to be created
  • timeout โ€” seconds to wait for the volume snapshot creation. None is forever

Returns โ€” the created volume Snapshot object

Raises โ€” ResourceTimeout (openstack.exceptions.ResourceTimeout) if the wait time is exceeded

Raises โ€” SDKException (openstack.exceptions.SDKException) on operation error


create_zone

create_zone(name, zone_type=None, email=None, description=None,
ttl=None, masters=None)

Create a brand new zone ๐ŸŒธ

Parameters

  • name โ€” name of the zone being created
  • zone_type โ€” type of the zone (primary/secondary)
  • email โ€” email of the zone owner (only applies if zone_type is primary)
  • description โ€” description of the zone
  • ttl โ€” TTL (Time to live) value in seconds
  • masters โ€” master nameservers (only applies if zone_type is secondary)

Returns โ€” a dict representing the created zone โœจ

Raises โ€” SDKException (openstack.exceptions.SDKException) on operation error


property current_location

Returns a utils.Munch explaining the current cloud location ๐ŸŒ


property current_project

Returns a utils.Munch describing the current project


property current_project_id

Get the current project ID ๐Ÿชช

Returns the project_id of the current token scope. None means the token is domain scoped or unscoped.

Raises

  • keystoneauth1.exceptions.auth.AuthorizationFailure โ€” if a new token fetch fails. ๐Ÿ˜ญ
  • keystoneauth1.exceptions.auth_plugins.MissingAuthPlugin โ€” if a plugin is not available. ๐Ÿ’€

property current_user_id โ€” grabs the id of whoever's logged in rn, straight from the token. no cap, it just reads it off the token. ๐Ÿซถ

delete_accelerator_request(uuid, filters=None)

Deletes a accelerator_request. bye bestie ๐Ÿ‘‹

Parameters:

  • uuid โ€” the UUID of the accelerator request you're deleting.
  • filters โ€” dict of filter conditions to push down.

Returns: True if delete succeeded, False otherwise.


delete_aggregate(name_or_id)

Deletes a host aggregate. it's giving cleanup era โœจ

Parameters:

  • name_or_id โ€” Name or ID of the host aggregate to delete.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


delete_autocreated_image_objects(container=None, segment_prefix=None)

Deletes all objects autocreated for image uploads. like, every single one. ๐Ÿงน

Lowkey you should NOT need this method most of the time โ€” shade is supposed to clean up the objects it uses for object-based image creation all on its own. but if something goes wrong and it turns out there are leaked objects chilling there, this method is the one to call to delete any objects that shade created on the user's behalf in service of image uploads. it's the cleanup crew fr fr. ๐ŸŽ€

Parameters:

  • container (str) โ€” Name of the container. Defaults to 'images'.
  • segment_prefix (str) โ€” Prefix for the image segment names to delete. If not given, all image upload segments present are deleted.

Returns: True if deletion was successful, else False.


delete_cluster_template(name_or_id)

Deletes a cluster template. poof ๐Ÿ’…

Parameters:

  • name_or_id โ€” Name or unique ID of the cluster template.

Returns: True if the delete succeeded, False if the cluster template was not found.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


delete_coe_cluster(name_or_id)

Deletes a COE cluster. โœจ

Parameters:

  • name_or_id โ€” Name or unique ID of the cluster.

Returns: True if the delete succeeded, False if the cluster was not found.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


delete_compute_quotas(name_or_id)

Deletes quota for a project. quota? gone. ๐Ÿฆ‹

Parameters:

  • name_or_id โ€” project name or id.

Raises: SDKException <#openstack.exceptions.SDKException> if it's not a valid project or the nova client call failed.


delete_container(name)

Deletes an object-store container. ๐ŸŽ€

Parameters:

  • name (str) โ€” Name of the container to delete.

delete_device_profile(uuid, filters=None)

Deletes a device_profile. slay ๐Ÿ’œ

Parameters:

  • uuid โ€” the UUID of the device profile to be deleted.
  • filters โ€” dict of filter conditions to push down.

Returns: True if delete succeeded, False otherwise.


delete_domain(domain_id=None, name_or_id=None)

Deletes a Keystone domain. ๐Ÿ‘‘

Parameters:

  • domain_id โ€” ID of the domain to delete.
  • name_or_id โ€” Name or unique ID of the domain.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


delete_endpoint(id)

Deletes a Keystone endpoint. icon behavior ๐Ÿ”ฅ

Parameters:

  • id โ€” ID of the endpoint to delete.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


delete_endpoint_group(id)

Deletes a Keystone endpoint group. the whole squad, deleted. ๐Ÿ˜ญ

Parameters:

  • id โ€” ID of the endpoint group to delete.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


delete_firewall_group(name_or_id, filters=None)

Deletes a firewall group. prints a debug message in case the to-be-deleted resource was not found โ€” so it's not just silently ghosting you, ok? ๐Ÿ™ˆ

Parameters:

  • name_or_id โ€” firewall group name or id.
  • filters (dict) โ€” optional filters.

Raises: DuplicateResource on multiple matches.

Returns: True if resource is successfully deleted, False otherwise.

Return type: bool


delete_firewall_policy(name_or_id, filters=None)

Deletes a firewall policy. prints a debug message in case the to-be-deleted resource was not found. ๐ŸŽ€

Parameters:

  • name_or_id โ€” firewall policy name or id.
  • filters โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Raises: DuplicateResource on multiple matches.

Returns: True if resource is successfully deleted, False otherwise.

Return type: bool


delete_firewall_rule(name_or_id, filters=None)

Deletes a firewall rule.

Prints a debug message in case the to-be-deleted resource was not found. (again, no silent ghosting ๐Ÿ’€)

Parameters:

  • name_or_id โ€” firewall rule name or id.
  • filters โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Raises: DuplicateResource on multiple matches.

Returns: True if resource is successfully deleted, False otherwise.

Return type: bool


delete_flavor(name_or_id)

Deletes a flavor. bye flavor ๐Ÿ’…

Parameters:

  • name_or_id โ€” ID or name of the flavor to delete.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


delete_floating_ip(floating_ip_id, retry=1)

Deallocates a floating IP from a project. releasing it back into the wild ๐ŸŒˆ

Parameters:

  • floating_ip_id โ€” a floating IP address ID.
  • retry โ€” number of times to retry. Optional, defaults to 1, which is in addition to the initial delete call. A value of 0 will also cause no checking of results to occur.

Returns: True if the IP address has been deleted, False if the IP address was not found.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


delete_group(name_or_id)

Deletes a group. ๐Ÿ‘ฏ

Parameters:

  • name_or_id โ€” Name or unique ID of the group.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


delete_image(name_or_id, wait=False, timeout=3600, delete_objects=True)

Deletes an existing image. ๐Ÿ–ผ๏ธ

Parameters:

  • name_or_id โ€” Name of the image to be deleted.
  • wait โ€” If True, waits for image to be deleted.
  • timeout โ€” Seconds to wait for image deletion. None is forever. (yes, forever forever ๐Ÿ˜ญ)
  • delete_objects โ€” If True, also deletes uploaded swift objects.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> if there are problems deleting.


delete_keypair(name)

Deletes a keypair. ๐Ÿ”‘

Parameters:

  • name โ€” Name of the keypair to delete.

Returns: True if delete succeeded, False otherwise.

(...and yeah, that previous one raises SDKException on operation error too โ€” forgot to mention it before the page break, my bad bestie ๐Ÿ˜ญ)


โœ‚๏ธ delete_network(name_or_id)

Delete a network. Poof. Gone. ๐Ÿ’จ

Parameters

  • name_or_id โ€” Name or ID of the network being deleted.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.


๐Ÿงฎ delete_network_quotas(name_or_id)

Delete network quotas for a project. Bye-bye limits ๐ŸŽ€

Parameters

  • name_or_id โ€” project name or id

Returns

dict with the quotas

Raises SDKException if it's not a valid project or the network client call failed


๐Ÿ—ƒ๏ธ delete_object(container, name, meta=None)

Delete an object from a container. Like yeeting a file out of a bucket, but make it cloud โ˜๏ธ

Parameters

  • container (string) โ€” Name of the container holding the object.
  • name (string) โ€” Name of the object to delete.
  • meta (dict) โ€” Metadata for the object in question. (optional, will be fetched if not provided)

Returns

True if delete succeeded, False if the object was not found.

Raises SDKException on operation error.


๐Ÿ”Œ delete_port(name_or_id)

Delete a port ๐Ÿšช

Parameters

  • name_or_id โ€” ID or name of the port to delete.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.


๐Ÿ“ delete_project(name_or_id, domain_id=None)

Delete a project. Iconic behaviour, honestly ๐Ÿ‘‘

Parameters

  • name_or_id โ€” Name or unique ID of the project.
  • domain_id โ€” Domain ID to scope the retrieved project.

Returns

True if delete succeeded, False if the project was not found.

Raises SDKException if something goes wrong during the OpenStack API call


๐Ÿšฆ delete_qos_bandwidth_limit_rule(policy_name_or_id, rule_id)

Delete a QoS bandwidth limit rule. Speed limits, but make it deletion ๐Ÿ’…

Parameters

  • policy_name_or_id (string) โ€” Name or ID of the QoS policy to which rule is associated.
  • rule_id (string) โ€” ID of rule to update.

Raises SDKException on operation error.


๐Ÿท๏ธ delete_qos_dscp_marking_rule(policy_name_or_id, rule_id)

Delete a QoS DSCP marking rule ๐ŸŽฏ

Parameters

  • policy_name_or_id (string) โ€” Name or ID of the QoS policy to which rule is associated.
  • rule_id (string) โ€” ID of rule to update.

Raises SDKException on operation error.


๐Ÿ“‰ delete_qos_minimum_bandwidth_rule(policy_name_or_id, rule_id)

Delete a QoS minimum bandwidth rule. (Note: this one says delete, not update โ€” the other two said update, we're just reporting what the page says, no cap ๐Ÿคทโ€โ™€๏ธ)

Parameters

  • policy_name_or_id (string) โ€” Name or ID of the QoS policy to which rule is associated.
  • rule_id (string) โ€” ID of rule to delete.

Raises SDKException on operation error.


๐ŸŽ€ delete_qos_policy(name_or_id)

Delete a QoS policy. Whole policy, gone, slay โœจ

Parameters

  • name_or_id โ€” Name or ID of the policy being deleted.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.


๐Ÿ“ delete_recordset(zone, name_or_id)

Delete a recordset.

Parameters

  • zone โ€” Name, ID or openstack.dns.v2.zone.Zone instance of the zone managing the recordset.
  • name_or_id โ€” Name or ID of the recordset being deleted.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.


๐Ÿ”‘ delete_role(name_or_id, **kwargs)

Delete a Keystone role. Bye permission-dispenser ๐Ÿซถ

Parameters

  • name_or_id โ€” Name or unique ID of the role.
  • domain_id โ€” domain id (v3)

Returns

True if delete succeeded, False otherwise.

Raises SDKException if something goes wrong during the OpenStack API call.


๐Ÿ›ฐ๏ธ delete_router(name_or_id)

Delete a logical router.

Heads up bestie, this is the important bit: if a name, instead of a unique UUID, is supplied, it is possible that we could find more than one matching router since names are not required to be unique. An error will be raised in this case. So like... use the ID if you can ๐Ÿ˜ญ

Parameters

  • name_or_id โ€” Name or ID of the router being deleted.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.


๐Ÿ›ก๏ธ delete_security_group(name_or_id)

Delete a security group

Parameters

  • name_or_id (string) โ€” The name or unique ID of the security group.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.

Raises OpenStackCloudUnavailableFeature if security groups are not supported on this cloud.


๐Ÿšง delete_security_group_rule(rule_id)

Delete a security group rule

Parameters

  • rule_id (string) โ€” The unique ID of the security group rule.

Returns

True if delete succeeded, False otherwise.

Raises SDKException on operation error.

Raises OpenStackCloudUnavailableFeature if security groups are not supported on this cloud.


๐Ÿ’€ delete_server(name_or_id, wait=False, timeout=180, delete_ips=False, delete_ip_retry=1)

Delete a server instance. Whole entire server. Into the void ๐Ÿ”ฅ

Parameters

  • name_or_id โ€” name or ID of the server to delete
  • wait (bool) โ€” If true, waits for server to be deleted.
  • timeout (int) โ€” Seconds to wait for server deletion.
  • delete_ips (bool) โ€” If true, deletes any floating IPs associated with the instance.
  • delete_ip_retry (int) โ€” Number of times to retry deleting any floating ips, should the first try be unsuccessful.

Returns

True if delete succeeded, False otherwise if the server does not exist.

Raises SDKException on operation error.


๐Ÿ‘ฏ delete_server_group(name_or_id)

Delete a server group.

Parameters

  • name_or_id โ€” Name or ID of the server group to delete

Returns

True if delete succeeded, False otherwise

Raises SDKException on operation error.


๐Ÿท๏ธ delete_server_metadata(name_or_id, metadata_keys)

Delete metadata from a server instance.

Parameters

  • name_or_id (str) โ€” The name or ID of the server instance to update.
  • metadata_keys โ€” A list with the keys to be deleted from the server instance.

Returns

None

Raises SDKException on operation error.


๐Ÿงพ delete_service(name_or_id)

Delete a Keystone service.

Parameters

  • name_or_id โ€” Name or unique ID of the service.

Returns

True if delete succeeded, False otherwise.

Raises SDKException if something goes wrong during the OpenStack API call


๐Ÿฅž delete_stack(name_or_id, wait=False)

Delete a stack

Parameters

  • name_or_id โ€” Stack name or ID.
  • wait โ€” Whether to wait for the delete to finish

Returns

True if delete succeeded, False if the stack was not found.

Raises SDKException if something goes wrong during the OpenStack API call


๐ŸŒ delete_subnet(name_or_id)

Delete a subnet.

Okay same warning as the router one, because apparently we gotta say it twice: if a name, instead of a unique UUID, is supplied, it is possible that we could find more than one matching subnet since names are not required to be unique. An error will be raised in this case. Names are lowkey not it, use IDs ๐Ÿ’…

Parameters

  • name_or_id โ€” Name or ID of the subnet being deleted.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


delete_unattached_floating_ips(retry=1)

Okay so this one safely deletes unattached floating IPs. If the cloud can safely purge any unattached floating IPs without race conditions, it does so. ๐Ÿ’…

Safely here means a specific thing. It means that you are not running this while another process that might do a two step create/attach is running. You can safely run this method while another process is creating servers and attaching floating IPs to them if either that process is using add_auto_ip from shade, or is creating the floating IPs by passing in a server to the create_floating_ip call. iykyk โœจ

Parameters

  • retry โ€” number of times to retry. Optional, defaults to 1, which is in addition to the initial delete call. A value of 0 will also cause no checking of results to occur.

Returns: Number of Floating IPs deleted, False if none.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


delete_volume(name_or_id, wait=True, timeout=None, force=False)

Delete a volume. Main character deletion energy, but make it safe. ๐Ÿฆ‹

Parameters

  • name_or_id โ€” Name or unique ID of the volume.
  • wait โ€” If true, waits for volume to be deleted.
  • timeout โ€” Seconds to wait for volume deletion. None is forever.
  • force โ€” Force delete volume even if the volume is in deleting or error_deleting state.

Returns: True if deletion was successful, else False.

Raises: ResourceTimeout (#openstack.exceptions.ResourceTimeout) if wait time exceeded.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


delete_volume_backup(name_or_id=None, force=False, wait=False, timeout=None)

Delete a volume backup. Bestie, check the force/wait combo before you yeet it. ๐ŸŽ€

Parameters

  • name_or_id โ€” Name or unique ID of the volume backup.
  • force โ€” Allow delete in state other than error or available.
  • wait โ€” If true, waits for volume backup to be deleted.
  • timeout โ€” Seconds to wait for volume backup deletion. None is forever.

Returns: True if deletion was successful, else False.

Raises: ResourceTimeout (#openstack.exceptions.ResourceTimeout) if wait time exceeded.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


delete_volume_quotas(name_or_id)

Delete volume quotas for a project. Quota cleanup era. ๐Ÿ’œ

Parameters

  • name_or_id โ€” project name or id.

Returns: The deleted volume QuotaSet object.

Raises: SDKException (#openstack.exceptions.SDKException) if it's not a valid project or the call failed.


delete_volume_snapshot(name_or_id=None, wait=False, timeout=None)

Delete a volume snapshot. Snap it away, but mind the wait. ๐Ÿ“

Parameters

  • name_or_id โ€” Name or unique ID of the volume snapshot.
  • wait โ€” If true, waits for volume snapshot to be deleted.
  • timeout โ€” Seconds to wait for volume snapshot deletion. None is forever.

Returns: True if deletion was successful, else False.

Raises: ResourceTimeout (#openstack.exceptions.ResourceTimeout) if wait time exceeded.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


delete_zone(name_or_id)

Delete a zone. Zone be gone, respectfully. ๐Ÿฆ‹

Parameters

  • name_or_id โ€” Name or ID of the zone being deleted.

Returns: True if delete succeeded, False otherwise.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


detach_ip_from_server(server_id, floating_ip_id)

Detach a floating IP from a server. Unattach that little IP, bestie. โœจ

Parameters

  • server_id โ€” ID of a server.
  • floating_ip_id โ€” Id of the floating IP to detach.

Returns: True if the IP has been detached, or False if the IP wasn't attached to any server.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


detach_port_from_machine(name_or_id, port_name_or_id)

Detach a virtual port from the bare metal machine. Port detachment, but make it metal. ๐Ÿ’…

Parameters

  • name_or_id (string) โ€” A machine name or UUID.
  • port_name_or_id (string) โ€” A port name or UUID. Note that this is a Network service port, not a bare metal NIC.

Returns: Nothing.


detach_volume(server, volume, wait=True, timeout=None)

Detach a volume from a server. Volume breakup, but clean. ๐Ÿ’”โœจ

Parameters

  • server โ€” The server dict to detach from.
  • volume โ€” The volume dict to detach.
  • wait โ€” If true, waits for volume to be detached.
  • timeout โ€” Seconds to wait for volume detachment. None is forever.

Returns: None

Raises: ResourceTimeout (#openstack.exceptions.ResourceTimeout) if wait time exceeded.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


download_image(name_or_id, output_path=None, output_file=None, chunk_size=1048576, stream=False)

Download an image by name or ID. Literally saving the whole image to your whole vibe. ๐ŸŽ€

Parameters

  • name_or_id (str) โ€” Name or ID of the image.
  • output_path โ€” the output path to write the image to. Either this or output_file must be specified.
  • output_file โ€” a file object (or file-like object) to write the image data to. Only write() will be called on this object. Either this or output_path must be specified.
  • chunk_size (int) โ€” size in bytes to read from the wire and buffer at one time. Defaults to 1024 * 1024 = 1 MiB.
  • Param bool stream: โ€” whether to stream the output in chunk_size.

Returns: When output_path and output_file are not given - the bytes comprising the given Image when stream is False, otherwise a requests.Response instance. When output_path or output_file are given - an image Image instance (#openstack.image.v2.image.Image).

Raises: SDKException (#openstack.exceptions.SDKException) in the event download_image is called without exactly one of either output_path or output_file.

Raises: BadRequestException (#openstack.exceptions.BadRequestException) if no images are found matching the name or ID provided.


export_volume_backup(backup_id)

Export a volume backup. Backup export, no cap. ๐Ÿฆ‹

Parameters

  • backup_id โ€” the ID of the backup.

Returns: The backup export record fields. This is a dict when using the (deprecated) v2 API and a requests.Response when using the v3 API.

Raises: ResourceTimeout (#openstack.exceptions.ResourceTimeout) if wait time exceeded.

Raises: SDKException (#openstack.exceptions.SDKException) on operation error.


get_aggregate(name_or_id, filters=None)

Get an aggregate by name or ID. Aggregate fetch, lowkey iconic. โญ

Parameters

  • name_or_id โ€” Name or ID of the aggregate.
  • filters (dict) โ€” DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{
    'availability_zone': 'nova',
    'metadata': {'cpu_allocation_ratio': '1.0'},
}

Returns: An aggregate dict or None if no matching aggregate is found.


get_cluster_template(name_or_id, filters=None, detail=False)

Get a cluster template by name or ID. Cluster template fetch, bestie edition. ๐Ÿ‘‘

Parameters

  • name_or_id โ€” Name or ID of the cluster template.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example::

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: A cluster template dict or None if no matching cluster template is found.

get_coe_cluster(name_or_id, filters=None)

Get a COE cluster by name or ID. ๐Ÿซถ

Parameters:

  • name_or_id โ€” name or ID of the cluster, bestie.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries, iykyk. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] |
[?other.gender]==`Female`]"

Returns: a container infrastructure management Cluster object if found, else None.


get_coe_cluster_certificate(cluster_id)

Get details about the CA certificate for a cluster by name or ID ๐Ÿ” (yes, "by name or ID" in the summary but the arg is the ID, that's just how it is, don't @ me).

Parameters:

  • cluster_id โ€” ID of the cluster.

Returns: details about the CA certificate for the given cluster.


get_compute_limits(name_or_id=None)

Get absolute compute limits for a project.

Parameters:

  • name_or_id โ€” (optional) project name or ID to get limits for, if it's different from the current project.

Returns: a compute AbsoluteLimits object.

Raises: SDKException <#openstack.exceptions.SDKException> if it's not a valid project ๐Ÿ˜ญ


get_compute_quotas(name_or_id)

Get quota for a project.

Parameters:

  • name_or_id โ€” project name or id.

Returns: a compute QuotaSet object if found, else None.

Raises: SDKException <#openstack.exceptions.SDKException> if it's not a valid project.


get_compute_usage(name_or_id, start=None, end=None)

Get usage for a specific project โฐ

Parameters:

  • name_or_id โ€” project name or id.
  • start โ€” datetime.datetime or string. Start date in UTC. Defaults to 2010-07-06T12:00:00Z (the date the OpenStack project was started, iconic origin story ngl).
  • end โ€” datetime.datetime or string. End date in UTC. Defaults to now.

Returns: a Usage <#openstack.compute.v2.usage.Usage> object.

Raises: SDKException <#openstack.exceptions.SDKException> if it's not a valid project.


get_container(name, skip_cache=False)

Get metadata about a container ๐Ÿ“

Parameters:

  • name (str) โ€” name of the container to get metadata for.
  • skip_cache (bool) โ€” ignored. Present for backwards compatibility. (It literally does nothing, bestie, it's just there so old code doesn't break ๐Ÿ’€)

Returns: an object store Container object if found, else None.


get_container_access(name)

Get the control list from a container ๐Ÿ”‘

Parameters:

  • name (str) โ€” name of the container.

Returns: the control list for the container.

Raises: SDKException <#openstack.exceptions.SDKException> if the container was not found or container access could not be determined.


get_default_network()

Return the network that is configured to be the default interface. The main character network, basically ๐Ÿ‘‘

Returns: a network Network object if one is found.


get_domain(domain_id=None, name_or_id=None, filters=None)

Get exactly one Keystone domain.

Parameters:

  • domain_id โ€” ID of the domain.
  • name_or_id โ€” name or unique ID of the domain.
  • filters โ€” DEPRECATED ๐Ÿšจ A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: an identity Domain object.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


get_endpoint(id, filters=None)

Get exactly one Keystone endpoint.

Parameters:

  • id โ€” ID of endpoint.

Returns: an identity Endpoint object.


get_endpoint_group(id)

Get exactly one Keystone endpoint group.

Parameters:

  • id โ€” ID of endpoint group.

Returns: an identity EndpointGroup object.


get_external_ipv4_floating_networks()

Return the networks that are configured to route northbound ๐ŸŒˆ

Returns: a list of network Network objects if any are found.


get_external_ipv4_networks()

Return the networks that are configured to route northbound.

Returns: a list of network Network objects if any are found.


get_external_ipv6_networks()

Return the networks that are configured to route northbound.

Returns: a list of network Network objects if any are found.


get_external_networks()

Return the networks that are configured to route northbound.

Heads up bestie โš ๏ธ โ€” this one should be avoided in favor of the specific ipv4/ipv6 method, but is here for backwards compatibility. It's giving legacy energy.

Returns: a list of network Network objects if any are found.


get_firewall_group(name_or_id, filters=None)

Retrieves firewall group ๐Ÿ”ฅ

Parameters:

  • name_or_id โ€” firewall group name or id.
  • filters (dict) โ€” optional filters.

Raises: DuplicateResource on multiple matches.

Returns: a network FirewallGroup object if found, else None.


get_firewall_policy(name_or_id, filters=None)

Retrieves a single firewall policy.

Parameters:

  • name_or_id โ€” firewall policy name or id.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] |
[?other.gender]==`Female`]"

Raises: DuplicateResource on multiple matches.

Returns: a network FirewallPolicy object if found, else None.


get_firewall_rule(name_or_id, filters=None)

Retrieves a single firewall rule.

Parameters:

  • name_or_id โ€” firewall rule name or id.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] |
[?other.gender]==`Female`]"

Raises: DuplicateResource on multiple matches.

Returns: a network FirewallRule object if found, else None.


get_flavor(name_or_id, filters=None, get_extra=True)

Get a flavor by name or ID, slay ๐Ÿ“

Parameters:

  • name_or_id โ€” name or ID of the flavor.
  • filters โ€” DEPRECATED ๐Ÿšจ A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] |
[?other.gender]==`Female`]"
  • get_extra โ€” whether or not the list_flavors call should get the extra flavor specs.

Returns: a compute Flavor object if found, else None.


get_flavor_by_id(id, get_extra=False)

Get a flavor by ID.

Parameters:

  • id โ€” ID of the flavor.
  • get_extra โ€” whether or not the list_flavors call should get the extra flavor specs. (Note it defaults to False here, not True โ€” different vibe from its sibling above ๐Ÿ‘€)

Returns: a compute Flavor object if found, else None.


get_flavor_by_ram(ram, include=None, get_extra=True)

Get a flavor based on amount of RAM available ๐Ÿง 

Finds the flavor with the least amount of RAM that is at least as much as the specified amount. If include is given, further filter based on matching flavor name.

Parameters:

  • ram (int) โ€” minimum amount of RAM.
  • include (string) โ€” If given, will return a flavor whose name contains this string as a substring. ๐Ÿ“
  • get_extra โ€” Whether to fetch extra specs. โœจ

Returns: A compute Flavor object. ๐Ÿ‘‘

Raises SDKException <#openstack.exceptions.SDKException> if no matching flavour could be found. ๐Ÿ˜ญ


get_flavor_name(flavor_id)

Get the name of a flavor, bestie. ๐Ÿ’…

Parameters:

  • flavor_id โ€” ID of the flavor.

Returns: The name of the flavor if a match if found, else None. ๐ŸŽ€


get_floating_ip(id, filters=None)

Get a floating IP by ID. ๐ŸŒˆ

Parameters:

  • id โ€” ID of the floating IP.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: A floating IP openstack.network.v2.floating_ip.FloatingIP or None if no matching floating IP is found. ๐Ÿฆ‹


get_floating_ip_by_id(id)

Get a floating ip by ID.

Parameters:

  • id โ€” ID of the floating ip.

Returns: A floating ip :class:`~openstack.network.v2.floating_ip.FloatingIP. ๐Ÿ’œ


get_group(name_or_id, filters=None, domain_id=None)

Get exactly one Keystone group. ๐Ÿ‘‘

Parameters:

  • name_or_id โ€” Name or unique ID of the group(s).
  • domain_id โ€” Domain ID to scope the retrieved group.

Returns: An identity Group object.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


get_image(name_or_id, filters=None)

Get an image by name or ID. ๐Ÿ–ผ๏ธ

Parameters:

  • name_or_id โ€” Name or ID of the image.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: An image openstack.image.v2.image.Image <#openstack.image.v2.image.Image> object. ๐ŸŒธ


get_image_by_id(id)

Get a image by ID.

Parameters:

  • id โ€” ID of the image.

Returns: An image openstack.image.v2.image.Image <#openstack.image.v2.image.Image> object. โœจ


get_internal_ipv4_networks()

Return the networks that are configured to not route northbound. ๐Ÿ›ฐ๏ธ

Returns: A list of network Network objects if any are found.


get_internal_ipv6_networks()

Return the networks that are configured to not route northbound. ๐Ÿ›ฐ๏ธ

Returns: A list of network Network objects if any are found.


get_internal_networks()

Return the networks that are configured to not route northbound. ๐Ÿ›ฐ๏ธ

โš ๏ธ This should be avoided in favor of the specific ipv4/ipv6 method, but is here for backwards compatibility.

Returns: A list of network Network objects if any are found.


get_keypair(name_or_id, filters=None, *, user_id=None)

Get a keypair by name or ID. ๐Ÿ”‘

Parameters:

  • name_or_id โ€” Name or ID of the keypair.
  • filters โ€” ๐Ÿšจ DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • user_id โ€” User to retrieve keypair from.

Returns: A compute Keypair object if found, else None. ๐Ÿ’–


get_machine(name_or_id)

Get Machine by name or uuid. ๐Ÿค–

Search the baremetal host out by utilizing the supplied id value which can consist of a name or UUID.

Parameters:

  • name_or_id โ€” A node name or UUID that will be looked up.

Return type: Node <#openstack.baremetal.v1.node.Node>.

Returns: The node found or None if no nodes are found. ๐Ÿฆ‹


get_machine_by_mac(mac)

Get machine by port MAC address. ๐Ÿ”Œ

Parameters:

  • mac โ€” Port MAC address to query in order to return a node.

Return type: Node <#openstack.baremetal.v1.node.Node>.

Returns: The node found or None if no nodes are found. ๐Ÿ’ซ


get_nat_destination()

Return the network that is configured to be the NAT destination. ๐ŸŒ

Returns: A network Network object if one is found.


get_nat_source()

Return the network that is configured to be the NAT destination. ๐ŸŒ

Returns: A network Network object if one is found.


get_network(name_or_id, filters=None)

Get a network by name or ID. ๐Ÿ•ธ๏ธ

Parameters:

  • name_or_id โ€” Name or ID of the network.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: A network Network object if found, else None. โœจ


get_network_by_id(id)

Get a network by ID.

Parameters:

  • id โ€” ID of the network.

Returns: A network Network object if found, else None. ๐Ÿ’œ


get_network_extensions()

Get Cloud provided network extensions. โ˜๏ธ

Returns: A set of Neutron extension aliases. ๐ŸŽ€


get_network_quotas(name_or_id, details=False)

Get network quotas for a project. ๐Ÿ“Š

Parameters:

  • name_or_id โ€” project name or id
  • details โ€” if set to True it will return details about usage of quotas by given project

Returns: A network Quota object if found, else None.

Raises SDKException <#openstack.exceptions.SDKException> if it's not a valid project. ๐Ÿ˜ญ


get_nic_by_mac(mac)

Get bare metal NIC by its hardware address (usually MAC). ๐Ÿ”Ž


get_object(container, obj, query_string=None, resp_chunk_size=1024, outfile=None, stream=False)

Get the headers and body of an object. ๐Ÿ“ฆ

Parameters:

  • container (string) โ€” Name of the container.
  • obj (string) โ€” Name of the object.
  • query_string (string) โ€” Query args for uri. (delimiter, prefix, etc.)
  • resp_chunk_size (int) โ€” Chunk size of data to read. Only used if the results are being written to a file or stream is True. (optional, defaults to 1k)
  • outfile โ€” Write the object to a file instead of returning the contents. If this option is given, body in the return tuple will be None. outfile can either be a file path given as a string, or a File like object.

Returns: Tuple (headers, body) of the object, or None if the object is not found (404). ๐Ÿซถ

Raises SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ’€


get_object_capabilities()

Get infomation about the object-storage service. ๐Ÿ—‚๏ธ

The object-storage service publishes a set of capabilities that include metadata about maximum values and thresholds.

Returns: An object store Info object. ๐Ÿ‘‘


get_object_metadata(container, name)

Get object metadata. ๐Ÿท๏ธ

Parameters:

  • container
  • name

Returns: The object metadata. โœจ


get_object_raw(container, obj, query_string=None, stream=False)

Get a raw response object for an object. ๐Ÿงš

Parameters:

  • container (string) โ€” Name of the container.
  • obj (string) โ€” the name of the object, bestie.
  • query_string (string) โ€” the query args for the uri (delimiter, prefix, etc., all that good stuff).
  • stream (bool) โ€” whether we're streaming the response or not.

Returns โ€” a requests.Response ๐Ÿ’Œ

Raises SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ˜ญ


get_object_segment_size(segment_size)

okay so this one gets you a segment size that will actually work given the capabilities. so thoughtful of it ๐Ÿซถ

Parameters โ€” segment_size

Returns โ€” a segment size. literally that's it, slay.


get_port(name_or_id, filters=None)

Get a port by name or ID.

Parameters

  • name_or_id โ€” the name or ID of the port.
  • filters โ€” a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a network Port object if found, else None. ๐Ÿ’…


get_port_by_id(id)

Get a port by ID.

Parameters โ€” id โ€” the ID of the port.

Returns โ€” a network Port object if found, else None.


get_project(name_or_id, filters=None, domain_id=None)

Get exactly one project. exactly one. no crumbs, no extras ๐Ÿ‘‘

Parameters

  • name_or_id โ€” name or unique ID of the project.
  • filters โ€” DEPRECATED โš ๏ธ a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • domain_id โ€” domain ID to scope the retrieved project.

Returns โ€” an identity Project object.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


get_qos_bandwidth_limit_rule(policy_name_or_id, rule_id)

Get a QoS bandwidth limit rule by name or ID.

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy to which the rule should be associated.
  • rule_id โ€” ID of the rule.

Returns โ€” a network QoSBandwidthLimitRule object if found, else None.


get_qos_dscp_marking_rule(policy_name_or_id, rule_id)

Get a QoS DSCP marking rule by name or ID.

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy to which the rule should be associated.
  • rule_id โ€” ID of the rule.

Returns โ€” a network QoSDSCPMarkingRule object if found, else None.


get_qos_minimum_bandwidth_rule(policy_name_or_id, rule_id)

Get a QoS minimum bandwidth rule by name or ID.

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy to which the rule should be associated.
  • rule_id โ€” ID of the rule.

Returns โ€” a network QoSMinimumBandwidthRule object if found, else None.


get_qos_policy(name_or_id, filters=None)

Get a QoS policy by name or ID.

Parameters

  • name_or_id โ€” name or ID of the policy.
  • filters โ€” a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a network QoSPolicy object if found, else None. โœจ


get_qos_rule_type_details(rule_type, filters=None)

Get QoS rule type details by rule type name.

Parameters

  • rule_type โ€” name of the QoS rule type.
  • filters โ€” a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a network QoSRuleType object if found, else None.


get_recordset(zone, name_or_id)

Get a recordset by name or ID.

Parameters

  • zone โ€” name, ID or openstack.dns.v2.zone.Zone <# openstack.dns.v2.zone.Zone> instance of the zone managing the recordset.
  • name_or_id โ€” name or ID of the recordset.

Returns โ€” a recordset dict or None if no matching recordset is found. ๐Ÿฆ‹


get_role(name_or_id, filters=None, domain_id=None)

Get a Keystone role.

Parameters

  • name_or_id โ€” name or unique ID of the role.
  • domain_id โ€” domain ID to scope the retrieved role.

Returns โ€” an identity Role object if found, else None.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


get_router(name_or_id, filters=None)

Get a router by name or ID.

Parameters

  • name_or_id โ€” name or ID of the router.
  • filters โ€” a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a network Router object if found, else None. ๐Ÿ’œ


get_security_group(name_or_id, filters=None)

Get a security group by name or ID.

Parameters

  • name_or_id โ€” name or ID of the security group.
  • filters โ€” a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a security group openstack.network.v2.security_group.SecurityGroup or None if no matching security group is found. ๐ŸŽ€


get_security_group_by_id(id)

Get a security group by ID.

Parameters โ€” id โ€” the ID of the security group.

Returns โ€” a security group openstack.network.v2.security_group.SecurityGroup.


get_server(name_or_id=None, filters=None, detailed=False, bare=False, all_projects=False)

Get a server by name or ID. the main character of compute calls ngl ๐Ÿ’…

Parameters

  • name_or_id โ€” name or ID of the server.
  • filters โ€” DEPRECATED โš ๏ธ a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • detailed โ€” whether or not to add detailed additional information. Defaults to False.
  • bare โ€” whether to skip adding any additional information to the server record. Defaults to False, meaning the addresses dict will be populated as needed from neutron. Setting to True implies detailed = False. ๐Ÿ”ฅ
  • all_projects โ€” whether to get the server from all projects or just the current auth scoped project.

Returns โ€” a compute Server object if found, else None.


get_server_by_id(id)

Get a server by ID.

Parameters

  • id โ€” ID of the server.

Returns

A compute Server object if found, else None.


๐Ÿ–ฅ๏ธ get_server_console(server, length=None)

Pulls the console log for a server โ€” yes, the actual scrolling wall of text, like the server's diary. ๐Ÿ““โœจ

Parameters

  • server โ€” the server you wanna fetch the console log for. Can be either a server dict or the Name or ID of the server.
  • length (int) โ€” the number of lines you want from the end of the log. (optional, defaults to all โ€” so if you skip it you get the whole thing, no cap)

Returns

A string containing the text of the console log, or an empty string if the cloud does not support console logs.

Raises โ€” SDKException (openstack.exceptions.SDKException) if an invalid server argument is given, or if something else unforeseen happens. ๐Ÿ˜ญ


๐Ÿซ‚ get_server_group(name_or_id=None, filters=None)

Grabs a server group by name or ID. Affinity girlies rise ๐Ÿ’…

Parameters

  • name_or_id โ€” Name or ID of the server group.
  • filters โ€” DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{
    'policy': 'affinity',
}

OR a string containing a jmespath expression for further filtering. Example::

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns

A compute ServerGroup object if found, else None.


๐Ÿ†” get_server_id(name_or_id)

Finds the ID of a server. โœจ

Parameters

  • name_or_id

Returns

The name of the server if found, else None. (yeah bestie, it says name โ€” that's literally what the manpage says, I'm not fixing it ๐Ÿ’€)


๐Ÿท๏ธ get_server_meta(server)

Gets the metadata for a server.

Deprecated since version โ€” use cloud.compute.fetch_server_metadata(server) instead. She's retired, respect her legacy though ๐ŸŽ€

Parameters

  • server

Returns

The metadata for the server if found, else None.


๐Ÿ”’ get_server_private_ip(server)

Gets the private IP of a server โ€” the inside-voice address, iykyk.

Parameters

  • server

Returns

The private IP of the server if set, else None.


๐ŸŒ get_server_public_ip(server)

Gets the public IP of a server โ€” the one that's out here living its main character life on the internet.

Parameters

  • server

Returns

The public IP of the server if set, else None.


๐ŸŽซ get_service(name_or_id, filters=None)

Gets exactly one Keystone service. Not two. Not zero. One. ๐Ÿ‘‘

Parameters

  • name_or_id โ€” Name or unique ID of the service.

Returns

an identity Service object

Raises โ€” SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call, or if multiple matches are found. ๐Ÿ˜ค


๐Ÿฅž get_stack(name_or_id, filters=None, resolve_outputs=True)

Gets exactly one stack. Heat stack bestie, not a pancake stack, but honestly same energy. ๐Ÿฅž๐Ÿ”ฅ

Parameters

  • name_or_id โ€” Name or ID of the desired stack.
  • filters โ€” a dict containing additional filters to use. e.g. {'stack_status': 'CREATE_COMPLETE'}
  • resolve_outputs โ€” If True, then outputs for this stack will be resolved.

Returns

a openstack.orchestration.v1.stack.Stack containing the stack description

Raises โ€” SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call, or if multiple matches are found.


๐ŸŒ get_subnet(name_or_id, filters=None)

Gets a subnet by name or ID.

Parameters

  • name_or_id โ€” Name or ID of the subnet.
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

Returns

A network Subnet object if found, else None.


๐Ÿ”Ž get_subnet_by_id(id)

Gets a subnet by ID โ€” no name games, straight to the ID.

Parameters

  • id โ€” ID of the subnet.

Returns

A network Subnet object if found, else None.


๐Ÿงบ get_subnetpool(name_or_id)

Gets a subnetpool by name or ID. The subnet pool, bestie โ€” the whole collection, not one little subnet. ๐Ÿซถ

Parameters

  • name_or_id โ€” Name or ID of the subnetpool.

Returns

A network Subnetpool object if found, else None.


๐Ÿ‘ค get_user(name_or_id, filters=None, domain_id=None)

Gets exactly one user. One. Singular. ๐ŸŒŸ

Parameters

  • name_or_id โ€” Name or unique ID of the user.
  • filters โ€” DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • domain_id โ€” Domain ID to scope the retrieved user.

Returns

an identity User object

Raises โ€” SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call.


๐Ÿชช get_user_by_id(user_id, normalize=None)

Gets a user by ID. Very demure, very ID-based. ๐ŸŽ€

Parameters

  • user_id (string) โ€” user ID

Returns

an identity User object


๐Ÿ’พ get_volume(name_or_id, filters=None)

Gets a volume by name or ID.

Parameters

  • name_or_id โ€” Name or unique ID of the volume.
  • filters โ€” DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns

A volume Volume object if found, else None.


๐Ÿ”Œ get_volume_attach_device(volume, server_id)

Returns the device name a volume is attached to, for a server. Handy lil trick: this can also be used to verify whether a volume is attached to a particular server at all. Vibe check for attachments ๐Ÿ’…

Parameters

  • volume โ€” The volume to fetch the device name from.
  • server_id โ€” ID of server to check.

Returns

Device name if attached, None if volume is not attached.


๐Ÿ—„๏ธ get_volume_backup(name_or_id, filters=None)

Gets a volume backup by name or ID. Your data's safety net, iconic behaviour honestly. ๐Ÿฆ‹

Parameters

  • name_or_id โ€” Name or unique ID of the volume backup.
  • filters โ€” DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns

A volume Backup object if found, else None.


๐Ÿ” get_volume_by_id(id)

Gets a volume by ID.

Parameters

  • id โ€” ID of the volume.

Returns

A volume Volume object if found, else None.


๐Ÿท๏ธ get_volume_id(name_or_id)

Gets the ID of a volume.

Parameters

  • name_or_id โ€” Name or unique ID of the volume.

Returns

The ID of the volume if found, else None.


๐Ÿ“Š get_volume_limits(name_or_id=None)

Gets volume limits for the current project โ€” the receipts on how much room you've got. ๐Ÿ”ฅ

Parameters

  • name_or_id โ€” (optional) Project name or ID to get limits for, if different from the current project

Returns

The volume Limits object if found, else None.


๐Ÿ“ get_volume_quotas(name_or_id)

Gets volume quotas for a project.

Parameters

  • name_or_id โ€” project name or id

Returns

A volume QuotaSet object with the quotas

Raises โ€” SDKException (openstack.exceptions.SDKException) if it's not a valid project. ๐Ÿšซ


๐Ÿ“ธ get_volume_snapshot(name_or_id, filters=None)

Gets a volume by name or ID. (yep โ€” the manpage literally says "volume" here even though this is the snapshot one; I'm just the messenger bestie ๐Ÿ’€)

Parameters

  • name_or_id โ€” Name or unique ID of the volume snapshot.
  • filters โ€” (and this is where our part cuts off โ€” catch you in the next bit ๐Ÿซถ๐Ÿ’–)
  • filters โ€” DEPRECATED ๐Ÿ’€ A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: A volume Snapshot object if found, else None.


๐Ÿซถ get_volume_snapshot_by_id(snapshot_id)

Takes a snapshot_id and gets a dict of the snapshot that matches that ID.

Note: this is more efficient than get_volume_snapshot. โšก

param: snapshot_id: ID of the volume snapshot. :returns: A volume Snapshot object if found, else None.


๐Ÿฆ‹ get_volume_type(name_or_id, filters=None)

Get a volume type by name or ID.

Parameters:

  • name_or_id โ€” Name or unique ID of the volume type.
  • filters โ€” DEPRECATED A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns: A volume Type object if found, else None.


๐ŸŽ€ get_volume_type_access(name_or_id)

Return a list of volume_type_access.

Parameters:

  • name_or_id โ€” Name or unique ID of the volume type.

Returns: A volume Type object if found, else None.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ˜ญ


๐ŸŒธ get_volumes(server, cache=None)

Get volumes for a server.

Parameters:

  • server โ€” The server to fetch volumes for.
  • cache โ€” DEPRECATED This parameter no longer does anything. ๐Ÿ’€

Returns: A list of volume Volume objects.


โœจ get_zone(name_or_id, filters=None)

Get a zone by name or ID.

Parameters:

  • name_or_id โ€” Name or ID of the zone.
  • filters โ€” A dictionary of meta data to use for further filtering.

Returns: A zone dict or None if no matching zone is found.


๐ŸŒˆ global_request(global_request_id)

Make a new Connection object with a global request id set.

Take the existing settings from the current Connection and construct a new Connection object with the global_request_id overridden.

from oslo_context import context

cloud = openstack.connect(cloud='example')
# Work normally
servers = cloud.list_servers()
cloud2 = cloud.global_request(context.generate_request_id())
# cloud2 sends all requests with global_request_id set
servers = cloud2.list_servers()

Additionally, this can be used as a context manager:

from oslo_context import context

c = openstack.connect(cloud='example')
# Work normally
servers = c.list_servers()
with c.global_request(context.generate_request_id()) as c2:
    # c2 sends all requests with global_request_id set
    servers = c2.list_servers()

Parameters:

  • global_request_id โ€” The global_request_id to send.

๐Ÿ‘‘ grant_role(name_or_id, user=None, group=None, project=None, domain=None, system=None, inherited=False, wait=False, timeout=60)

Grant a role to a user. ๐Ÿ’…

Parameters:

  • name_or_id (string) โ€” Name or unique ID of the role.
  • user (string) โ€” The name or id of the user.
  • group (string) โ€” The name or id of the group. (v3)
  • project (string) โ€” The name or id of the project.
  • domain (string) โ€” The id of the domain. (v3)
  • system (bool) โ€” The name of the system. (v3)
  • inherited (bool) โ€” Whether the role assignment is inherited. (v3)
  • wait (bool) โ€” Wait for role to be granted.
  • timeout (int) โ€” Timeout to wait for role to be granted.
NOTE: domain is a required argument when the grant is on a project, user or group specified by name. In that situation, they are all considered to be in that domain. If different domains are in use in the same role grant, it is required to specify those by ID.
NOTE: for wait and timeout, sometimes granting roles is not instantaneous. ๐Ÿ˜ญ
NOTE: precedence is given first to project, then domain, then system.

Returns: True if the role is assigned, otherwise False.

Raises: SDKException <#openstack.exceptions.SDKException> if the role cannot be granted.


๐Ÿงš insert_rule_into_policy(name_or_id, rule_name_or_id, insert_after=None, insert_before=None, filters=None)

Add firewall rule to a policy.

Adds firewall rule to the firewall_rules list of a firewall policy. Short-circuits and returns the firewall policy early if the firewall rule id is already present in the firewall_rules list. This method doesn't do re-ordering. If you want to move a firewall rule or down the list, you have to remove and re-add it. ๐Ÿซ 

Parameters:

  • name_or_id โ€” firewall policy name or id.
  • rule_name_or_id โ€” firewall rule name or id.
  • insert_after โ€” rule name or id that should precede added rule.
  • insert_before โ€” rule name or id that should succeed added rule.
  • filters (dict) โ€” optional filters.

Raises: DuplicateResource on multiple matches.

Raises: NotFoundException if firewall policy or any of the firewall rules (inserted, after, before) is not found.

Returns: updated firewall policy.

Return type: FirewallPolicy.


๐Ÿ”ฅ inspect_machine(name_or_id, wait=False, timeout=3600)

Inspect a Barmetal machine.

Engages the Ironic node inspection behavior in order to collect metadata about the baremetal machine.

Parameters:

  • name_or_id โ€” String representing machine name or UUID value in order to identify the machine.
  • wait โ€” Boolean value controlling if the method is to wait for the desired state to be reached or a failure to occur.
  • timeout โ€” Integer value, defaulting to 3600 seconds, for the wait state to reach completion.

Return type: Node <#openstack.baremetal.v1.node.Node>.

Returns: Current state of the node.


๐Ÿ“ is_object_stale(container, name, filename, file_md5=None, file_sha256=None)

Check to see if an object matches the hashes of a file.

Parameters:

  • container โ€” Name of the container.
  • name โ€” Name of the object.
  • filename โ€” Path to the file.
  • file_md5 โ€” Pre-calculated md5 of the file contents. Defaults to None which means calculate locally.
  • file_sha256 โ€” Pre-calculated sha256 of the file contents. Defaults to None which means calculate locally.

๐Ÿ’œ is_user_in_group(name_or_id, group_name_or_id)

Check to see if a user is in a group.

Parameters:

  • name_or_id โ€” Name or unique ID of the user.
  • group_name_or_id โ€” Group name or ID.

Returns: True if user is in the group, False otherwise.

Raises: SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


โญ list_accelerator_requests(filters=None)

List all accelerator_requests.

Parameters:

  • filters โ€” (optional) dict of filter conditions to push down.

Returns: A list of accelerator AcceleratorRequest objects.


๐ŸŽ€ list_aggregates(filters=None)

List all available host aggregates.

Returns: A list of compute Aggregate objects.


๐ŸŒธ list_availability_zone_names(unavailable=False)

List names of availability zones.

Parameters:

  • unavailable (bool) โ€” Whether or not to include unavailable zones in the output. Defaults to False.

Returns: A list of availability zone names, or an empty list if the list could not be fetched.


๐Ÿฆ‹ list_cluster_templates(detail=False)

List cluster templates. โœจ

  • detail (bool) โ€” ignored, bestie. Kept purely for backwards compat. ClusterTemplates always come back with full details anyway, no cap.

Returns โ€” a list of dicts holding the cluster template details.

Raises SDKException <#openstack.exceptions.SDKException> if literally anything goes sideways during the OpenStack API call.


list_coe_clusters()

List COE (Container Orchestration Engine) clusters. That's the whole vibe.

Returns โ€” a list of container infrastructure management Cluster objects.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


list_containers(full_listing=None, prefix=None)

List containers. Yes like the object store kind. ๐Ÿซ™

Parameters

  • full_listing โ€” ignored. Present for backwards compat, periodt.
  • prefix โ€” only objects with this prefix will be returned. (optional)

Returns โ€” a list of object store Container objects.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


list_deployables(filters=None)

List all the available deployables. Every single one. ๐Ÿ‘‘

Parameters

  • filters โ€” (optional) dict of filter conditions to push down.

Returns โ€” a list of accelerator Deployable objects.


list_device_profiles(filters=None)

List all device_profiles โ€” the whole roster.

Parameters

  • filters โ€” (optional) dict of filter conditions to push down.

Returns โ€” a list of accelerator DeviceProfile objects.


list_devices(filters=None)

List all devices. All of them. Every last one. ๐Ÿ”ฅ

Parameters

  • filters โ€” (optional) dict of filter conditions to push down.

Returns โ€” a list of accelerator Device objects.


list_domains(**filters)

List Keystone domains. ๐ŸŽ€

Returns โ€” a list of identity Domain objects.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


list_endpoint_groups(**kwargs)

List Keystone endpoint groups.

Returns โ€” a list of identity EndpointGroup objects.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


list_endpoints()

List Keystone endpoints.

Returns โ€” a list of identity Endpoint objects.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


list_firewall_groups(filters=None)

Lists firewall groups. ๐Ÿ”ฅ๐Ÿงฑ

Returns โ€” a list of network FirewallGroup objects.


list_firewall_policies(filters=None)

Lists firewall policies.

Parameters

  • filters โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] |
[?other.gender]==`Female`]"

Returns โ€” a list of network FirewallPolicy objects.

Return type โ€” list[FirewallPolicy]


list_firewall_rules(filters=None)

Lists firewall rules.

Parameters

  • filters โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] |
[?other.gender]==`Female`]"

Returns โ€” a list of network FirewallRule objects.

Return type โ€” list[FirewallRule]


list_flavor_access(flavor_id)

List access from a private flavor for a project/tenant. Private flavors stay private, iykyk. ๐Ÿ™ˆ

Parameters

  • flavor_id (string) โ€” ID of the private flavor.

Returns โ€” list of dicts with flavor_id and tenant_id attributes.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


list_flavors(get_extra=False)

List all available flavors. ๐ŸŒˆ

Parameters

  • get_extra โ€” whether or not to fetch extra specs for each flavor. The doc says defaults to True (yes, while the signature up there says =False โ€” I'm just the messenger ๐Ÿ’€). The default behavior value can be overridden in clouds.yaml by setting openstack.cloud.get_extra_specs to False.

Returns โ€” a list of compute Flavor objects.


list_floating_ip_pools()

List all available floating IP pools. ๐ŸŽˆ

NOTE: This function supports the nova-net view of the world. nova-net has been deprecated, so it's highly recommended to switch to using neutron. get_external_ipv4_floating_networks is what you should almost certainly be using. Like, seriously bestie.

Returns โ€” a list of floating IP pool objects.


list_floating_ips(filters=None)

List all available floating IPs. Floats, but make it cloud. โ˜๏ธ

Parameters

  • filters โ€” (optional) dict of filter conditions to push down.

Returns โ€” a list of floating IP openstack.network.v2.floating_ip.FloatingIP.


list_groups(**kwargs)

List Keystone groups. Girl groups, but identity. ๐Ÿ’…

Parameters

  • domain_id โ€” domain ID.

Returns โ€” a list of identity Group objects.

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


list_hypervisors(filters=None)

List all hypervisors.

Parameters

  • filters โ€” additional query parameters passed to the API server.

Returns โ€” a list of compute Hypervisor objects.


list_images(filter_deleted=True, show_all=False)

Get available images. ๐Ÿ“ธ

Parameters

  • filter_deleted โ€” control whether deleted images are returned.
  • show_all โ€” show all images, including images that are shared but not accepted. (By default in glance v2, shared images that have not been accepted are not shown.) show_all will override the value of filter_deleted to False. Yes, override. Watch out for that.

Returns โ€” a list of glance images.


list_keypairs(filters=None)

List all available keypairs. ๐Ÿ”‘

Parameters

  • filters

Returns โ€” a list of compute Keypair objects.


list_machines()

List Machines. Bare metal ones, main character energy. ๐Ÿค–

Returns โ€” list of Node <#openstack.baremetal.v1.node.Node>.


list_magnum_services()

List all Magnum services.

Returns โ€” a list of dicts containing the service details.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


list_networks(filters=None)

List all available networks. The whole web. ๐Ÿ•ธ๏ธ

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network Network objects.


list_nics()

Return a list of all bare metal ports.


list_nics_for_machine(uuid)

Returns a list of ports present on the machine node.

Parameters

  • uuid โ€” string representing the machine UUID value, in order to identify the machine.

Returns โ€” a list of ports.


list_objects(container, full_listing=True, prefix=None)

List objects. ๐Ÿ“ฆ

Parameters

  • container โ€” name of the container to list objects in.
  • full_listing โ€” ignored. Present for backwards compat.
  • prefix โ€” only objects with this prefix will be returned. (optional)

Returns โ€” a list of object store Object objects.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


list_ports(filters=None)

List all available ports. ๐Ÿ”Œ

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network Port objects.


list_ports_attached_to_machine(name_or_id)

List virtual ports attached to the bare metal machine. Bestie, note the arg is literally called name_or_id โ€” you get to pick which one. ๐Ÿซถ

  • name_or_id (string) โ€” a machine name or a UUID, whichever you vibe with.

Returns โ€” a list of openstack.Resource objects that represent the ports. ๐Ÿ’–


list_projects(domain_id=None, name_or_id=None, filters=None)

List projects. Bestie, this one's a classic โœจ

With no parameters at all? It returns a full listing of every visible project. No cap, the whole thing.

Parameters

  • domain_id โ€” the Domain ID used to scope which projects get searched.
  • name_or_id โ€” the name or the ID of the project(s) you're after.
  • filters โ€” a dictionary of meta data for further filtering. Heads up: the elements of this dictionary may themselves be dictionaries, iykyk. Like this:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR โ€” plot twist โ€” it can be a string containing a jmespath expression for further filtering:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of identity Project objects.

Raises SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


list_qos_bandwidth_limit_rules(policy_name_or_id, filters=None)

List all the available QoS bandwidth limit rules. ๐ŸŒˆ

Parameters

  • policy_name_or_id (string) โ€” the name or ID of the QoS policy from which rules should be listed.
  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network QoSBandwidthLimitRule objects.

Raises ~openstack.exceptions.BadRequestException if the QoS policy will not be found. ๐Ÿ™ˆ


list_qos_dscp_marking_rules(policy_name_or_id, filters=None)

List all the available QoS DSCP marking rules. ๐ŸŽ€

Parameters

  • policy_name_or_id (string) โ€” the name or ID of the QoS policy from which rules should be listed.
  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network QoSDSCPMarkingRule objects.

Raises ~openstack.exceptions.BadRequestException if the QoS policy will not be found. ๐Ÿ™ˆ


list_qos_minimum_bandwidth_rules(policy_name_or_id, filters=None)

List all the available QoS minimum bandwidth rules. ๐ŸŒธ

Parameters

  • policy_name_or_id (string) โ€” the name or ID of the QoS policy from which rules should be listed.
  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network QoSMinimumBandwidthRule objects.

Raises ~openstack.exceptions.BadRequestException if the QoS policy will not be found. ๐Ÿ™ˆ


list_qos_policies(filters=None)

List all the available QoS policies. Periodt. ๐Ÿ‘‘

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network QosPolicy objects.


list_qos_rule_types(filters=None)

List all the available QoS rule types. Literally all of them. ๐Ÿ’…

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network QosRuleType objects.


list_recordsets(zone)

List all the available recordsets. ๐Ÿฆ‹

Parameters

  • zone โ€” the name, the ID, or an openstack.dns.v2.zone.Zone instance of the zone that manages the recordset.

Returns โ€” a list of recordsets.


list_role_assignments(filters=None)

List Keystone role assignments. ๐ŸŒŸ

Parameters

  • filters (dict) โ€” a dict of filter conditions. The acceptable keys are:
    • 'user' (string) โ€” User ID to be used as the query filter.
    • 'group' (string) โ€” Group ID to be used as the query filter.
    • 'project' (string) โ€” Project ID to be used as the query filter.
    • 'domain' (string) โ€” Domain ID to be used as the query filter.
    • 'system' (string) โ€” System name to be used as the query filter.
    • 'role' (string) โ€” Role ID to be used as the query filter.
    • 'inherited_to' (string) โ€” return inherited role assignments for either 'projects' or 'domains'.
    • 'os_inherit_extension_inherited_to' (string) โ€” deprecated, use 'inherited_to' instead. (yes bestie, it's giving legacy ๐Ÿ˜ฌ)
    • 'effective' (boolean) โ€” return effective role assignments.
    • 'include_subtree' (boolean) โ€” include subtree.
Heads up: 'user' and 'group' are mutually exclusive, and so are 'domain' and 'project'. Pick a lane. ๐Ÿ’€

Returns โ€” a list of identity openstack.identity.v3.role_assignment.RoleAssignment objects.

Raises SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


list_roles(**kwargs)

List Keystone roles. Simple. Iconic. ๐ŸŽ€

Returns โ€” a list of identity Role objects.

Raises SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


list_router_interfaces(router, interface_type=None)

List all the interfaces for a router. ๐Ÿ›œ

Parameters

  • router (dict) โ€” a router dict object.
  • interface_type (string) โ€” one of None, "internal", or "external". This controls whether all interfaces, internal interfaces, or external interfaces get returned. Your call, bestie โœจ

Returns โ€” a list of network Port objects.


list_routers(filters=None)

List all the available routers. ๐ŸŒˆ

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network Router objects.


list_security_groups(filters=None)

List all the available security groups. ๐Ÿ›ก๏ธ

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of security group openstack.network.v2.security_group.SecurityGroup.


list_server_groups()

List all the available server groups. ๐Ÿ‘ฏโ€โ™€๏ธ

Returns โ€” a list of compute ServerGroup objects.


list_server_security_groups(server)

List all the security groups associated with the given server. ๐Ÿ”

Returns โ€” a list of security group dictionary objects.


list_servers(detailed=False, all_projects=False, bare=False, filters=None)

List all the available servers. The main character of listing methods, honestly. ๐Ÿ’…

Parameters

  • detailed โ€” whether or not to add detailed additional information. Defaults to False.
  • all_projects โ€” whether to list servers from all projects or just the current auth-scoped project.
  • bare โ€” whether to skip adding any additional information to the server record. Defaults to False, meaning the addresses dict will be populated as needed from neutron. Setting this to True implies detailed = False.
  • filters โ€” additional query parameters passed to the API server.

Returns โ€” a list of compute Server objects.


list_services()

List all Keystone services. โœจ

Returns โ€” a list of identity Service object.

Raises SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


list_share_availability_zones()

List all the availability zones for the Shared File Systems service. ๐ŸŒธ

Returns โ€” a list of Shared File Systems Availability Zones.


list_stacks(**query)

List all the stacks. ๐Ÿฅž

Parameters

  • query โ€” query parameters to limit the stacks.

Returns โ€” a list of openstack.orchestration.v1.stack.Stack objects containing the stack description.

Raises SDKException (openstack.exceptions.SDKException) if something goes wrong during the OpenStack API call. ๐Ÿ˜ญ


list_subnets(filters=None)

List all the available subnets. ๐ŸŒ

Parameters

  • filters โ€” (optional) a dict of filter conditions to push down.

Returns โ€” a list of network Subnet objects.


list_users(**kwargs)

List users. ๐Ÿซถ

Parameters

  • name
  • domain_id โ€” the Domain ID used to scope the retrieved users.

Returns โ€” a list of identity User objects. โœจ

Raises SDKException if literally anything goes sideways during the OpenStack API call. ๐Ÿ˜ญ


๐Ÿ’พ list_volume_backups(detailed=True, filters=None)

List out all the volume backups, bestie.

Parameters

  • detailed โ€” whether or not you want the detailed extra info added on. More is more, honestly.
  • filters โ€” a dictionary of meta data for further filtering. Example:
{
    'name': 'my-volume-backup',
    'status': 'available',
    'volume_id': 'e126044c-7b4c-43be-a32a-c9cbbc9ddb56',
    'all_tenants': 1,
}

Returns โ€” a list of volume Backup objects. ๐ŸŽ€


๐Ÿ“ธ list_volume_snapshots(detailed=True, filters=None)

Same energy, but for all the volume snapshots.

Parameters

  • detailed โ€” whether or not to add detailed additional information.
  • filters โ€” a dictionary of meta data to use for further filtering. Example:
{
    'name': 'my-volume-snapshot',
    'volume_id': 'e126044c-7b4c-43be-a32a-c9cbbc9ddb56',
    'all_tenants': 1,
}

Returns โ€” a list of volume Snapshot objects. ๐Ÿ’–


๐Ÿ—‚๏ธ list_volume_types(get_extra=None)

List every volume type that's available.

Parameters

  • get_extra โ€” DEPRECATED. This parameter no longer does anything. It's giving legacy, it's giving decorational. ๐Ÿซ 

Returns โ€” a list of volume Type objects.


๐Ÿ’ฝ list_volumes(cache=None)

List all the available volumes, periodt.

Parameters

  • cache โ€” DEPRECATED. This parameter no longer does anything either. Rip bozo, no cap. ๐Ÿ’€

Returns โ€” a list of volume Volume objects.


๐ŸŒ list_zones(filters=None)

List all the available zones.

Returns โ€” a list of zone dicts.


๐Ÿ–ฅ๏ธ node_set_provision_state(name_or_id, state, configdrive=None, wait=False, timeout=3600)

Set Node Provision State โ€” the main character method of baremetal setup, honestly.

It lets a user provision a Machine and, if they want, define a config drive to be utilized.

Parameters

  • name_or_id (string) โ€” the Name or UUID value representing the baremetal node.
  • state (string) โ€” the desired provision state for the baremetal node.
  • configdrive (string) โ€” an optional URL or file or path representing the configdrive. In the case of a directory, the client API will create a properly formatted configuration drive file and post the file contents to the API for deployment. She does the formatting for you, so slay. โœจ
  • wait (boolean) โ€” a boolean value, defaulted to false, controlling whether the method waits for the desired end state to be reached before returning.
  • timeout (integer) โ€” integer value, defaulting to 3600 seconds, representing the amount of time to wait for the desired end state to be reached. That's a whole hour of patience btw.

Returns โ€” the current state of the machine upon exit of the method.

Return type โ€” Node <#openstack.baremetal.v1.node.Node>

Raises SDKException on operation error. ๐Ÿ˜ญ


โšก patch_accelerator_request(uuid, patch)

Update an accelerator request.

Parameters

  • uuid โ€” the UUID of the accelerator request to be updated.
  • patch โ€” the (patch) that will bind the accelerator.

Returns โ€” True if bind succeeded, False otherwise. Binary queen. ๐Ÿ’…


๐Ÿฉน patch_machine(name_or_id, patch)

Patch Machine Information โ€” this one gives you an interface to manipulate node entries within Ironic.

Parameters

  • name_or_id (string) โ€” a machine name or UUID to be updated.
  • patch โ€” the JSON Patch document, which is a list of dictionary objects that comply with RFC 6902, found at <https://tools.ietf.org/html/rfc6902>.

Example patch construction:

patch = []
patch.append({'op': 'remove', 'path': '/instance_info'})
patch.append(
    {'op': 'replace', 'path': '/name', 'value': 'newname'}
)
patch.append(
    {
        'op': 'add',
        'path': '/driver_info/username',
        'value': 'administrator',
    }
)

Returns โ€” the current state of the node.

Return type โ€” Node <#openstack.baremetal.v1.node.Node>

Raises SDKException on operation error. ๐Ÿฆ‹


๐ŸŽ€ pformat(resource)

A wrapper around pformat that groks munch objects. Short, sweet, iconic.


๐ŸŽ€ pprint(resource)

A wrapper around pprint that groks munch objects. Same vibes, prettier printing. โœจ


๐Ÿงน project_cleanup(dry_run=True, wait_timeout=120, status_queue=None, filters=None, resource_evaluation_fn=None, skip_resources=None)

Cleanup the project resources. Basically the spring cleaning of all spring cleanings.

It cleans up all resources in all services, which provide cleanup methods.

Parameters

  • dry_run โ€” cleanup, or only list the identified resources. (Spoiler: dry run just lists. Very "looking respectfully" of it. ๐Ÿ™ˆ)
  • wait_timeout โ€” maximum amount of time given to each service to complete the cleanup.
  • status_queue โ€” a threading queue object used to get current process status. The queue contains processed resources.
  • filters โ€” additional filters for the cleanup (only resources matching all filters will be deleted, if there are no other dependencies).
  • resource_evaluation_fn โ€” a callback function which will be invoked for each resource and must return True/False depending on whether the resource needs to be deleted or not.
  • skip_resources โ€” list of specific resources whose cleanup should be skipped. Leave my faves alone pls. ๐Ÿ’…

๐Ÿ”ข range_search(data, filters)

Perform integer range searches across a list of dictionaries. Ngl this one's kind of a flex.

Given a list of dictionaries, it searches across the list using the given dictionary keys and a range of integer values for each key. Only dictionaries that match ALL search filters across the entire original data set will be returned.

It is not a requirement that each dictionary contain the key used for searching. Those without the key will be considered non-matching.

The range values must be string values, and each is either a set of digits representing an integer for matching, or a range operator followed by a set of digits representing an integer for matching. If a range operator is not given, exact value matching will be used. Valid operators are one of: <,>,<=,>=

Parameters

  • data โ€” list of dictionaries to be searched.
  • filters โ€” dict describing the one or more range searches to perform. If more than one search is given, the result will be the members of the original data set that match ALL searches. An example of filtering by multiple ranges:
{"vcpus": "<=5", "ram": "<=2048", "disk": "1"}

Returns โ€” a list subset of the original data set.

Raises SDKException on invalid range expressions. ๐Ÿšจ


๐Ÿ”จ rebuild_server(server_id, image_id, admin_pass=None, detailed=False, bare=False, wait=False, timeout=180)

Rebuild a server. Fresh start, new you, etc.

Parameters

  • server_id
  • image_id
  • admin_pass
  • detailed
  • bare
  • wait
  • timeout

Returns โ€” a compute Server object.


๐Ÿ—๏ธ register_machine(nics, wait=False, timeout=3600, lock_timeout=600, provision_state='available', **kwargs)

Register Baremetal with Ironic โ€” okay this one ate, fr fr.

It allows for the registration of Baremetal nodes with Ironic and population of pertinent node information or configuration to be passed to the Ironic API for the node.

This method also creates ports for a list of MAC addresses passed in, to be utilized for boot and potentially network configuration. Ports! Plural! ๐Ÿซถ

If a failure is detected creating the network ports, any ports created are deleted, and the node is removed from Ironic. It cleans up after itself, we love a self-aware icon. โœจ

Parameters

  • nics โ€”
  • An array of ports that represent the network interfaces for the node we're creating โ€” and the timing matters, bestie: these ports get created after the node is enrolled but before it heads off into cleaning ๐Ÿงผ

Example:

[
    {'address': 'aa:bb:cc:dd:ee:01'},
    {'address': 'aa:bb:cc:dd:ee:02'},
]

Alternatively you can just pass an array of MAC addresses. Lowkey easier, tbh ๐Ÿ’…

  • wait โ€” Boolean value, defaults to false, and it makes the method wait for the node to reach the available state, y'know, the state where the node can actually be provisioned. But important caveat, so listen up ๐Ÿ‘€: when it's set to false, the method will still wait for locks to clear before it sends the next required command. So there's no fully skipping the lock wait, ever, periodt.
  • timeout โ€” Integer value, defaults to 3600 seconds, for the wait state to reach completion. Give it an hour, she'll get there โœจ
  • lock_timeout โ€” Integer value, defaults to 600 seconds, for locks to clear.
  • provision_state โ€” the expected provision state, one of "enroll", "manageable" or "available". Heads up: using "available" results in automated cleaning ๐Ÿงฝ
  • kwargs โ€” key value pairs that get passed along to the Ironic API, including uuid, name, chassis_uuid, driver_info, properties.

Returns

Current state of the node.

Return type

Node <#openstack.baremetal.v1.node.Node>.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


remove_flavor_access(flavor_id, project_id)

Revoke access from a private flavor for a project/tenant. Bye-bye access ๐Ÿ‘‹

Parameters

  • flavor_id (string) โ€” ID of the private flavor.
  • project_id (string) โ€” ID of the project/tenant.

Returns

None

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


remove_host_from_aggregate(name_or_id, host_name)

Remove a host from an aggregate. Just yeet it out of the group ๐Ÿซถ

Parameters

  • name_or_id โ€” name or ID of the host aggregate.
  • host_name โ€” host to remove.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


remove_machine_from_maintenance(name_or_id)

Remove Baremetal Machine from Maintenance State ๐Ÿ”ง

Very much the mirror twin of set_machine_maintenance_state โ€” this method removes a machine from maintenance state. And ngl, the way it works is charmingly lazy: it simply calls set_machine_maintenace_state for the name_or_id you requested and sets the state to False. That's it, that's the whole trick ๐Ÿ’€

Parameters

  • name_or_id (string) โ€” the Name or UUID value representing the baremetal node.

Returns

None

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


remove_router_interface(router, subnet_id=None, port_id=None)

Detach a subnet from an internal router interface โœ‚๏ธ

At least one of subnet_id or port_id must be supplied. Non-negotiable, bestie.

And if you specify both subnet and port ID, the subnet ID must correspond to the subnet ID of the first IP address on the port specified by the port ID. Otherwise an error occurs. Like, an actual error ๐Ÿ˜ญ

Parameters

  • router (dict) โ€” the dict object of the router being changed.
  • subnet_id (string) โ€” the ID of the subnet to use for the interface.
  • port_id (string) โ€” the ID of the port to use for the interface.

Returns

None on success.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


remove_rule_from_policy(name_or_id, rule_name_or_id, filters=None)

Remove a firewall rule from a firewall policy's firewall_rules list. And the icon move here: it short-circuits and returns the firewall policy early if the firewall rule is already absent from the firewall_rules list. Efficient queen ๐Ÿ‘‘

Parameters

  • name_or_id โ€” firewall policy name or id.
  • rule_name_or_id โ€” firewall rule name or id.
  • filters (dict) โ€” optional filters.

Raises

DuplicateResource on multiple matches.

Raises

NotFoundException if firewall policy is not found.

Returns

Updated firewall policy.

Return type

FirewallPolicy


remove_server_security_groups(server, security_groups)

Remove security groups from a server ๐Ÿ›ก๏ธ

Remove existing security groups from an existing server. And the chill part: if the security groups aren't even present on the server, this will continue unaffected. No drama, no crash ๐Ÿ’…

Parameters

  • server โ€” the server to remove security groups from.
  • security_groups โ€” a list of security groups to remove.

Returns

False if server or security groups are undefined, True otherwise.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


remove_user_from_group(name_or_id, group_name_or_id)

Remove a user from a group. Sorry bestie, you're out of the group chat ๐Ÿšช

Parameters

  • name_or_id โ€” name or unique ID of the user.
  • group_name_or_id โ€” group name or ID.

Raises

SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


remove_volume_type_access(name_or_id, project_id)

Revoke access on a volume_type to a project. Access: revoked. Vibe: immaculate โœจ

Parameters

  • name_or_id โ€” ID or name of a volume_type.
  • project_id โ€” a project id.

Returns

None

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


revoke_role(name_or_id, user=None, group=None, project=None, domain=None, system=None, inherited=False, wait=False, timeout=60)

Revoke a role from a user. Taking the crown back ๐Ÿ‘‘

Parameters

  • name_or_id (string) โ€” name or unique ID of the role.
  • user (string) โ€” the name or id of the user.
  • group (string) โ€” the name or id of the group. (v3)
  • project (string) โ€” the name or id of the project.
  • domain (string) โ€” the id of the domain. (v3)
  • system (bool) โ€” the name of the system. (v3)
  • inherited (bool) โ€” whether the role assignment is inherited.
  • wait (bool) โ€” wait for role to be revoked.
  • timeout (int) โ€”

Timeout to wait for role to be revoked.

NOTE: for wait and timeout, sometimes revoking roles is not instantaneous. Patience, gorgeous ๐Ÿซถ
NOTE: project is required for keystone v2.
NOTE: precedence is given first to project, then domain, then system.

Returns

True if the role is revoked, otherwise False.

Raises

SDKException <#openstack.exceptions.SDKException> if the role cannot be removed.


search_aggregates(name_or_id=None, filters=None)

Search host aggregates ๐Ÿ” (the original page says "Seach", and honestly? she's searching for her keys, we love her anyway ๐Ÿ’€)

Parameters

  • name โ€” aggregate name or id.
  • filters (dict) โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{
    'availability_zone': 'nova',
    'metadata': {'cpu_allocation_ratio': '1.0'},
}

Returns

A list of compute Aggregate objects matching the search criteria.

Raises

SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


search_cluster_templates(name_or_id=None, filters=None, detail=False)

Search cluster templates ๐ŸŒธ

Parameters

  • name_or_id โ€” cluster template name or ID.
  • filters โ€” a dict containing additional filters to use.
  • detail โ€” a boolean to control if we need summarized or detailed output.

Returns

A list of dict containing the cluster templates.

Raises

SDKException <#openstack.exceptions.SDKException>: if something goes wrong during the OpenStack API call.


search_coe_clusters(name_or_id=None, filters=None)

Search COE cluster ๐Ÿ (container orchestration energy, iykyk)

Parameters

  • name_or_id โ€” cluster name or ID.
  • filters โ€” a dict containing additional filters to use.
  • detail โ€” a boolean to control if we need summarized or detailed output.

Returns

A list of container infrastructure management Cluster objects.

Raises SDKException (that's openstack.exceptions.SDKException, bestie) โ€” only if something goes totally sideways during the OpenStack API call. ๐Ÿ˜ญ


search_containers(name=None, filters=None)

Search containers. Your lil treasure hunt through the object store ๐Ÿ’–

search_containers(name=None, filters=None)

Parameters

  • name (string) โ€” Container name.
  • filters โ€” A dict containing additional filters to use. OR a string containing a jmespath expression for further filtering. Example:
"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” A list of object store Container objects matching the search criteria.

Raises SDKException: if something goes wrong during the OpenStack API call.


search_domains(filters=None, name_or_id=None)

Search Keystone domains. ๐Ÿ‘‘

search_domains(filters=None, name_or_id=None)

Parameters

  • name_or_id โ€” Name or ID of the domain(s).
  • filters โ€” dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of identity Domain objects.

Raises SDKException if something goes wrong during the OpenStack API call.


search_endpoint_groups(name_or_id=None, filters=None)

Search Keystone endpoint groups. Grouping endpoints together = iconic behaviour, no cap โœจ

search_endpoint_groups(name_or_id=None, filters=None)

Parameters

  • name_or_id โ€” Name or ID of the endpoint group(s).
  • filters โ€” dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” A list of identity EndpointGroup objects.

Raises SDKException if something goes wrong during the OpenStack API call.


search_endpoints(id=None, filters=None)

List Keystone endpoints. Slightly different flavour from the others โ€” this one takes an id, not a name_or_id. Read the signature, babe ๐Ÿซถ

search_endpoints(id=None, filters=None)

Parameters

  • id โ€” ID of endpoint(s).
  • filters โ€” dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” A list of identity Endpoint objects.

Raises SDKException if something goes wrong during the OpenStack API call.


search_flavors(name_or_id=None, filters=None, get_extra=True)

Search flavors. Get you a flavor that fits ๐Ÿ’…

search_flavors(name_or_id=None, filters=None, get_extra=True)

Parameters

  • name_or_id โ€” Name or unique ID of the flavor(s).
  • filters โ€” (yep, that's the whole description, she's mysterious like that ๐Ÿ™ˆ)
  • get_extra โ€” Whether to fetch extra specs.

Returns โ€” A list of compute Flavor objects matching the search criteria.

Heads up: no Raises listed for this one โ€” don't go inventing one. ๐Ÿ˜Œ

search_groups(name_or_id=None, filters=None, domain_id=None)

Search Keystone groups. Besties of the identity world ๐ŸŒธ

search_groups(name_or_id=None, filters=None, domain_id=None)

Parameters

  • name_or_id โ€” Name or ID of the group(s).
  • filters โ€” dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • domain_id โ€” Domain ID to scope the searched groups.

Returns โ€” A list of identity Group objects.

Raises SDKException if something goes wrong during the OpenStack API call.


search_keypairs(name_or_id=None, filters=None)

Search keypairs. ๐Ÿ”‘ Lowkey the most useful search ever.

search_keypairs(name_or_id=None, filters=None)

Parameters

  • name_or_id โ€” Name or unique ID of the keypair(s).
  • filters โ€” A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Invalid filters will be ignored. (noted. behaviour check: they get dropped, not errored ๐Ÿซก)

Returns โ€” A list of compute Keypair objects matching the search criteria.

Raises SDKException if something goes wrong during the OpenStack API call.


search_networks(name_or_id=None, filters=None)

Search networks. Networking era ๐Ÿฆ‹

search_networks(name_or_id=None, filters=None)

Parameters

  • name_or_id โ€” Name or ID of the desired network.
  • filters โ€” A dict containing additional filters to use, e.g. {'router:external': True}

Returns โ€” A list of network Network objects matching the search criteria.

Raises SDKException if something goes wrong during the OpenStack API call.


search_objects(container, name=None, filters=None)

Search objects. Note the required container first โ€” objects live inside containers, she's not optional โœจ

search_objects(container, name=None, filters=None)

Parameters

  • name (string) โ€” Object name.
  • filters โ€” A dict containing additional filters to use. OR a string containing a jmespath expression for further filtering. Example:
"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” A list of object store Object objects matching the search criteria.

Raises SDKException: if something goes wrong during the OpenStack API call.


search_ports(name_or_id=None, filters=None)

Search ports. The little connectors that carry everything ๐ŸŽ€

search_ports(name_or_id=None, filters=None)

Parameters

  • name_or_id โ€” Name or ID of the desired port.
  • filters โ€” A dict containing additional filters to use, e.g. {'device_id': '2711c67a-b4a7-43dd-ace7-6187b791c3f0'} (yes, that UUID is exactly correct, don't retype it, copy it ๐Ÿ˜ญ)

Returns โ€” A list of network Port objects matching the search criteria.

Raises SDKException if something goes wrong during the OpenStack API call.


search_projects(name_or_id=None, filters=None, domain_id=None)

Backwards compatibility method for search_projects. ๐Ÿซถ

Okay so the lore: search_projects originally had a parameter list that was name_or_id, filters, and list had domain_id first. This method exists in this form to allow code written with positional parameters to still work. But really โ€” use keyword arguments. Fr fr, use keyword arguments.

search_projects(name_or_id=None, filters=None, domain_id=None)

Parameters

  • name_or_id โ€” Name or ID of the project(s).
  • filters โ€” dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • domain_id โ€” Domain ID to scope the searched projects.

Returns โ€” A list of identity Project objects.

No Raises block on this one in the source โ€” so I'm not adding one. Periodt. ๐Ÿ’…

search_qos_bandwidth_limit_rules(policy_name_or_id, rule_id=None, filters=None)

Search QoS bandwidth limit rules. Bandwidth, but make it governed ๐Ÿ”ฅ

search_qos_bandwidth_limit_rules(policy_name_or_id, rule_id=None,
        filters=None)

Parameters

  • policy_name_or_id (string) โ€” Name or ID of the QoS policy to which rules should be associated.
  • rule_id (string) โ€” ID of searched rule.
  • filters โ€” a dict containing additional filters to use, e.g. {'max_kbps': 1000}

Returns โ€” A list of network QoSBandwidthLimitRule objects matching the search criteria.

Raises SDKException if something goes wrong during the OpenStack API call.


search_qos_dscp_marking_rules(policy_name_or_id, rule_id=None, filters=None)

Search QoS DSCP marking rules

  • policy_name_or_id (string) โ€” the name or the ID of the QoS policy these rules are supposed to be attached to ๐Ÿซถ
  • rule_id (string) โ€” the ID of the rule we're hunting for
  • filters โ€” a dict of extra filters to narrow stuff down, like {'dscp_mark': 32}

Returns โ€” a list of network QoSDSCPMarkingRule objects that match what you asked for โœจ

Raises SDKException <#openstack.exceptions.SDKException> if anything goes sideways during the OpenStack API call ๐Ÿ˜ญ


search_qos_minimum_bandwidth_rules(policy_name_or_id, rule_id=None, filters=None)

Search QoS minimum bandwidth rules, lowkey the bandwidth bouncers of the network ๐Ÿ’…

Parameters

  • policy_name_or_id (string) โ€” name or ID of the QoS policy the rules belong to
  • rule_id (string) โ€” ID of the rule you're searching for
  • filters โ€” a dict of extra filters, e.g. {'min_kbps': 1000}

Returns โ€” a list of network QoSMinimumBandwidthRule objects matching the search criteria ๐ŸŒธ

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_qos_policies(name_or_id=None, filters=None)

Search QoS policies, the main character energy of network traffic shaping ๐Ÿ‘‘

Parameters

  • name_or_id โ€” name or ID of the policy you want
  • filters โ€” a dict of extra filters, e.g. {'shared': True}

Returns โ€” a list of network QosPolicy objects matching the search criteria โœจ

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_resources(resource_type, name_or_id, get_args=None, get_kwargs=None, list_args=None, list_kwargs=None, **filters)

Search resources โ€” like, search resources that match certain conditions, bestie ๐Ÿ”

Parameters

  • resource_type โ€” a string version of the resource you expect, written as service.resource (so like "network.security_group")
  • name_or_id โ€” name or ID of the resource
  • get_args โ€” optional args passed along to the _get call
  • get_kwargs โ€” optional kwargs passed along to the _get call
  • list_args โ€” optional args passed along to the _list call
  • list_kwargs โ€” optional kwargs passed along to the _list call
  • filters โ€” extra filters used when querying resources

search_roles(name_or_id=None, filters=None, domain_id=None)

Search Keystone roles ๐ŸŽ€

Parameters

  • name โ€” name or ID of the role(s)
  • filters โ€”

a dictionary of meta data for further filtering. The elements of this dictionary may themselves be dictionaries too. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

a string holding a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • domain_id โ€” domain ID used to scope the searched roles

Returns โ€” a list of identity Role objects ๐Ÿ’–

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_routers(name_or_id=None, filters=None)

Search routers ๐ŸŒˆ

Parameters

  • name_or_id โ€” name or ID of the router you want
  • filters โ€” a dict of extra filters, e.g. {'admin_state_up': True}

Returns โ€” a list of network Router objects matching the search criteria

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_server_groups(name_or_id=None, filters=None)

Search server groups, we love a squad ๐Ÿซถ

Parameters

  • name_or_id โ€” name or unique ID of the server group(s)
  • filters โ€”

a dictionary of meta data for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

a string containing a jmespath expression for further filtering. Invalid filters get ignored, no cap ๐Ÿ™ˆ

Returns โ€” a list of compute ServerGroup objects matching the search criteria โœจ

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_servers(name_or_id=None, filters=None, detailed=False, all_projects=False, bare=False)

Search servers โ€” the whole server roster ๐Ÿ”ฅ

Parameters

  • name_or_id โ€” name or unique ID of the server(s)
  • filters โ€”

a dictionary of meta data for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

a string containing a jmespath expression for further filtering. Invalid filters will be ignored ๐Ÿ’€

  • detailed
  • all_projects
  • bare

Returns โ€” a list of compute Server objects matching the search criteria โญ


search_services(name_or_id=None, filters=None)

Search Keystone services ๐ŸŒธ

Parameters

  • name_or_id โ€” name or ID of the service(s)
  • filters โ€”

a dictionary of meta data for further filtering. The elements of this dictionary may themselves be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of identity Service objects ๐Ÿ’œ

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_stacks(name_or_id=None, filters=None)

Search stacks, orchestration girlies rise ๐Ÿงš

Parameters

  • name_or_id โ€” name or ID of the stack you want
  • filters โ€” a dict of extra filters, e.g. {'stack_status': 'CREATE_COMPLETE'}

Returns โ€” a list of openstack.orchestration.v1.stack.Stack containing the stack description

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_subnets(name_or_id=None, filters=None)

Search subnets ๐ŸŒ

Parameters

  • name_or_id โ€” name or ID of the subnet you want
  • filters โ€” a dict of extra filters, e.g. {'enable_dhcp': True}

Returns โ€” a list of network Subnet objects matching the search criteria

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_users(name_or_id=None, filters=None, domain_id=None)

Search users, the people of the cloud ๐ŸŽ€

Parameters

  • name_or_id โ€” name or ID of the user(s)
  • domain_id โ€” domain ID used to scope the retrieved users
  • filters โ€”

a dictionary of meta data for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

a string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of identity User objects ๐Ÿ’–

Raises SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call


search_volume_backups(name_or_id=None, filters=None)

Search for one or more volume backups, so you never lose the precious data ๐Ÿ“

Parameters

  • name_or_id โ€” name or unique ID of the volume backup(s)
  • filters โ€”
  • filters โ€” DEPRECATED bestie it's a whole dictionary of meta data you can use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of volume Backup objects, if any are found. ๐Ÿซถ


search_volume_snapshots(name_or_id=None, filters=None) ๐Ÿซ™

Search for one or more volume snapshots. Iconic little lookup, no notes.

Parameters

  • name_or_id โ€” name or unique ID of the volume snapshot(s).
  • filters โ€” DEPRECATED a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of volume Snapshot objects, if any are found. โœจ


search_volume_types(name_or_id=None, filters=None, get_extra=None) ๐ŸงŠ

Search for one or more volume types.

Parameters

  • name_or_id โ€” name or unique ID of the volume type(s).
  • filters โ€” DEPRECATED a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of volume Type objects, if any are found.

Yes, get_extra=None is in the signature, and nope, the page doesn't say anything else about it. That's the whole vibe check. ๐Ÿ’€

search_volumes(name_or_id=None, filters=None) ๐ŸŒŠ

Search for one or more volumes. The classic.

Parameters

  • name_or_id โ€” name or unique ID of the volume(s).
  • filters โ€” DEPRECATED a dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:
{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR

A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"

Returns โ€” a list of volume Volume objects, if any are found. ๐Ÿ’–


set_aggregate_metadata(name_or_id, metadata) ๐Ÿ—๏ธ

Set aggregate metadata, replacing the existing metadata. Not merging โ€” replacing, so read that twice before you run it, fr fr.

Parameters

  • name_or_id โ€” name of the host aggregate to update.
  • metadata โ€” dict containing metadata to replace. Pro tip straight from the page: use {'key': None} to remove a key.

Returns โ€” a dict representing the new host aggregate.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_compute_quotas(name_or_id, **kwargs) ๐Ÿ“Š

Set a quota in a project.

Parameters

  • name_or_id โ€” project name or id.
  • kwargs โ€” key/value pairs of quota name and quota value.

Raises SDKException <#openstack.exceptions.SDKException> if the resource to set the quota does not exist.


set_container_access(name, access, refresh=False) ๐Ÿ”

Set the access control list on a container.

Parameters

  • name (str) โ€” name of the container.
  • access (str) โ€” ACL string to set on the container. Can also be public or private, which will be translated into appropriate ACL strings. Slay.
  • refresh โ€” flag to trigger refresh of the container properties.

set_flavor_specs(flavor_id, extra_specs) ๐Ÿฆ

Add extra specs to a flavor.

Parameters

  • flavor_id (string) โ€” ID of the flavor to update.
  • extra_specs (dict) โ€” dictionary of key-value pairs.

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.

Raises BadRequestException <#openstack.exceptions.BadRequestException> if flavor ID is not found.


set_machine_maintenance_state(name_or_id, state=True, reason=None) ๐Ÿ› ๏ธ

Set Baremetal Machine Maintenance State.

Sets the Baremetal maintenance state and the maintenance reason. Two-for-one.

Parameters

  • name_or_id (string) โ€” the Name or UUID value representing the baremetal node.
  • state (boolean) โ€” the desired state of the node. True being in maintenance, whereas False means the machine is not in maintenance mode. This value defaults to True if not explicitly set.
  • reason (string) โ€” an optional freeform string that is supplied to the baremetal API to allow for notation as to why the node is in maintenance state. Receipts, basically. ๐Ÿงพ

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_machine_power_off(name_or_id) ๐Ÿ”Œ

De-activate baremetal machine power.

This is a method that sets the node power state to "off". That's it, that's the whole thing.

Parameters

  • name_or_id โ€” a string representing the baremetal node to have power turned to an "off" state.

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_machine_power_on(name_or_id) โšก

Activate baremetal machine power.

This is a method that sets the node power state to "on". The comeback era.

Parameters

  • name_or_id โ€” a string representing the baremetal node to have power turned to an "on" state.

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_machine_power_reboot(name_or_id) ๐Ÿ”

De-activate baremetal machine power.

(Yes, that's the summary line the page gives it. Not me, I'm just the messenger. ๐Ÿ™ˆ)

This is a method that sets the node power state to "reboot", which in essence changes the machine power state to "off", and then back to "on". Glow-down, glow-up, immediately.

Parameters

  • name_or_id โ€” a string representing the baremetal node to have power turned to an "off" state.

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_network_quotas(name_or_id, **kwargs) ๐ŸŒ

Set a network quota in a project.

Parameters

  • name_or_id โ€” project name or id.
  • kwargs โ€” key/value pairs of quota name and quota value.

Raises SDKException <#openstack.exceptions.SDKException> if the resource to set the quota does not exist.


set_server_metadata(name_or_id, metadata) ๐Ÿ–ฅ๏ธ

Set metadata in a server instance.

Parameters

  • name_or_id (str) โ€” the name or ID of the server instance to update.
  • metadata (dict) โ€” a dictionary with the key=value pairs to set in the server instance. It only updates the key=value pairs provided. Existing ones will remain untouched. Non-destructive, we love to see it. ๐Ÿซถ

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_volume_bootable(name_or_id, bootable=True) ๐Ÿ‘ข

Set a volume's bootable flag.

Parameters

  • name_or_id โ€” name or unique ID of the volume.
  • bootable (bool) โ€” whether the volume should be bootable. (Defaults to True.)

Returns โ€” None.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if wait time exceeded.

Raises SDKException <#openstack.exceptions.SDKException> on operation error.


set_volume_quotas(name_or_id, **kwargs) ๐Ÿ’พ

Set a volume quota in a project.

Parameters

  • name_or_id โ€” project name or id.
  • kwargs โ€” key/value pairs of quota name and quota value.

Returns โ€” None.

Raises SDKException <#openstack.exceptions.SDKException> if the resource to set the quota does not exist.


sign_coe_cluster_certificate(cluster_id, csr) ๐ŸŽ€

Sign client key and generate the CA certificate for a cluster. Very main character certificate behaviour, ngl.

Parameters

  • cluster_id โ€” UUID of the cluster.
  • csr โ€” Certificate Signing Request (CSR) for authenticating client key. The CSR will be used by Magnum to generate a signed certificate that client will use to communicate with the cluster.

Returns โ€” a dict representing the signed certs.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿฆ‹ stream_object(container, obj, query_string=None, resp_chunk_size=1024)

Download the content via a streaming iterator. Very demure, very streamy.

Parameters

  • container (string) โ€” Name of the container.
  • obj (string) โ€” Name of the object.
  • query_string (string) โ€” Query args for uri. (delimiter, prefix, etc.)
  • resp_chunk_size (int) โ€” Chunk size of data to read. Only used if the results are

Returns โ€” An iterator over the content or None if the object is not found.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿงš unbind_accelerator_request(uuid, properties)

Unbind an accelerator from VM.

A deprecated alias for patch_accelerator_request. It's giving legacy, bestie โ€” still here, still working.


๐Ÿ’œ unregister_machine(nics, uuid, wait=None, timeout=600)

Unregister Baremetal from Ironic. Removes entries for Network Interfaces and baremetal nodes from an Ironic API.

Parameters

  • nics โ€” An array of strings that consist of MAC addresses to be removed.
  • uuid (string) โ€” The UUID of the node to be deleted.
  • wait โ€” DEPRECATED, do not use.
  • timeout โ€” Integer value, representing seconds with a default value of 600, which controls the maximum amount of time to block until a lock is released on machine.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation failure.


๐ŸŒธ unset_flavor_specs(flavor_id, keys)

Delete extra specs from a flavor. Marie Kondo energy fr fr.

Parameters

  • flavor_id (string) โ€” ID of the flavor to update.
  • keys โ€” List of spec keys to delete.

Returns โ€” None

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.

Raises โ€” BadRequestException <#openstack.exceptions.BadRequestException> if flavor ID is not found.


โœจ update_aggregate(name_or_id, **kwargs)

Update a host aggregate.

Parameters

  • name_or_id โ€” Name or ID of the aggregate being updated.
  • name โ€” New aggregate name
  • availability_zone โ€” Availability zone to assign to hosts

Returns โ€” The updated compute Aggregate object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


๐ŸŽ€ update_cluster_template(name_or_id, **kwargs)

Update a cluster template.

Parameters

  • name_or_id โ€” Name or ID of the cluster template being updated.

Returns โ€” an update cluster template.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿ‘‘ update_coe_cluster(name_or_id, **kwargs)

Update a COE cluster.

Parameters

  • name_or_id โ€” Name or ID of the COE cluster being updated.
  • kwargs โ€” Cluster attributes to be updated.

Returns โ€” The updated cluster Cluster object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿ“ update_container(name, headers)

Update the metadata in a container.

Parameters

  • name (str) โ€” Name of the container to update.
  • headers (dict) โ€” Key/Value headers to set on the container.

๐ŸŒˆ update_domain(domain_id=None, name=None, description=None, enabled=None, name_or_id=None)

Update a Keystone domain.

Parameters

  • domain_id
  • name
  • description
  • enabled
  • name_or_id โ€” Name or unique ID of the domain.

Returns โ€” The updated identity Domain object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> if the domain cannot be updated


๐Ÿ’… update_firewall_group(name_or_id, filters=None, **kwargs)

Updates firewall group. To unset egress- or ingress firewall policy, set egress_firewall_policy or ingress_firewall_policy to None. You can also set egress_firewall_policy_id and ingress_firewall_policy_id directly, which will skip the policy lookups.

Parameters

  • name_or_id โ€” firewall group name or id
  • filters (dict) โ€” optional filters
  • kwargs โ€” firewall group update parameters See create_firewall_group docstring for valid parameters.

Returns โ€” The updated network FirewallGroup object.

Raises โ€” BadRequestException if parameters are malformed

Raises โ€” DuplicateResource on multiple matches

Raises โ€” NotFoundException if firewall group, a firewall policy (egress, ingress) or port is not found


๐Ÿ”ฅ update_firewall_policy(name_or_id, filters=None, **kwargs)

Updates firewall policy.

Parameters

  • name_or_id โ€” firewall policy name or id
  • filters โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • kwargs โ€” firewall policy update parameters See create_firewall_policy docstring for valid parameters.

Returns โ€” The updated network FirewallPolicy object.

Raises โ€” BadRequestException if parameters are malformed

Raises โ€” DuplicateResource on multiple matches

Raises โ€” NotFoundException if resource is not found


๐Ÿฆ‹ update_firewall_rule(name_or_id, filters=None, **kwargs)

Updates firewall rule.

Parameters

  • name_or_id โ€” firewall rule name or id
  • filters โ€”

A dictionary of meta data to use for further filtering. Elements of this dictionary may, themselves, be dictionaries. Example:

{'last_name': 'Smith', 'other': {'gender': 'Female'}}

OR A string containing a jmespath expression for further filtering. Example:

"[?last_name==`Smith`] | [?other.gender]==`Female`]"
  • kwargs โ€” firewall rule update parameters. See create_firewall_rule docstring for valid parameters.

Returns โ€” The updated network FirewallRule object.

Raises โ€” BadRequestException if parameters are malformed

Raises โ€” NotFoundException if resource is not found


๐Ÿ’– update_group(name_or_id, name=None, description=None, **kwargs)

Update an existing group.

Parameters

  • name_or_id โ€” Name or unique ID of the group.
  • name โ€” New group name.
  • description โ€” New group description.

Returns โ€” The updated identity Group object.

Raises โ€” SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API call.


โญ update_machine(name_or_id, **attrs)

Update a machine with new configuration information. A user-friendly method to perform updates of a machine, in whole or part.

Parameters

  • name_or_id (string) โ€” A machine name or UUID to be updated.
  • attrs โ€” Attributes to updated on the machine.

Returns โ€” A dictionary containing a machine sub-dictionary consisting of the updated data returned from the API update operation, and a list named changes which contains all of the API paths that received updates.

Raises โ€” SDKException <#openstack.exceptions.SDKException> on operation error.


๐ŸŒธ update_network(name_or_id, **kwargs)

Update a network.

Parameters

  • name_or_id (string) โ€” Name or ID of the network being updated.
  • name (string) โ€” New name of the network.
  • shared (bool) โ€” Set the network as shared.
  • admin_state_up (bool) โ€” Set the network administrative state to up.
  • external (bool) โ€” is this network externally accessible? yes or no, bestie.
  • provider (dict) โ€” a dict of network provider options. Example:
{'network_type': 'vlan', 'segmentation_id': 'vlan1'}
  • mtu_size (int) โ€” new maximum transmission unit value, here to address fragmentation. Minimum value is 68 for IPv4, and 1280 for IPv6. ๐Ÿซถ
  • port_security_enabled (bool) โ€” enable or disable port security.
  • dns_domain (string) โ€” specify the DNS domain associated with this network.

Returns: the updated network Network object. โœจ

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐ŸŽ€ update_object(container, name, metadata=None, **headers)

Update the metadata of an object.

Parameters:

  • container โ€” the name of the container the object is in.
  • name โ€” name for the object within the container.
  • metadata โ€” this dict will get changed into headers that set metadata of the object.
  • headers โ€” these will be passed through to the object update API as HTTP Headers.

Returns: None.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿฆ‹ update_port(name_or_id, **kwargs)

Update a port.

Note: to unset an attribute use None value. To leave an attribute untouched just omit it. no cap, that's the whole trick ๐Ÿ’…

Parameters:

  • name_or_id โ€” name or ID of the port to update. (Required)
  • name โ€” a symbolic name for the port. (Optional)
  • admin_state_up โ€” the administrative status of the port, which is up (true) or down (false). (Optional)
  • fixed_ips โ€”

list of ip_addresses and subnet_ids. (Optional) If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port. For example:

[
    {
        "ip_address": "10.29.29.13",
        "subnet_id": "a78484c4-c380-4b47-85aa-21c51a2d8cbd",
    },
    ...,
]
  • security_groups โ€” list of security group UUIDs. (Optional)
  • allowed_address_pairs โ€”

allowed address pairs list. (Optional) For example:

[
    {
        "ip_address": "23.23.23.1",
        "mac_address": "fa:16:3e:c4:cd:3f",
    },
    ...,
]
  • extra_dhcp_opts โ€”

extra DHCP options. (Optional). For example:

[{"opt_name": "opt name1", "opt_value": "value1"}, ...]
  • device_owner โ€” the ID of the entity that uses this port. For example, a DHCP agent. (Optional)
  • device_id โ€” the ID of the resource this port is attached to.
  • vnic_type (binding) โ€” the type of the created port. (Optional)
  • port_security_enabled โ€” the security port state created on the network. (Optional)
  • qos_policy_id โ€” the ID of the QoS policy to apply for port.

Returns: the updated network Port object.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐ŸŒธ update_project(name_or_id, enabled=None, domain_id=None, **kwargs)

Update a project.

Parameters:

  • name_or_id โ€” name or unique ID of the project.
  • enabled โ€” whether the project is enabled or not.
  • domain_id โ€” domain ID to scope the retrieved project.

Returns: an identity Project object.


๐Ÿ‘‘ update_qos_bandwidth_limit_rule(policy_name_or_id, rule_id, **kwargs)

Update a QoS bandwidth limit rule.

Parameters:

  • policy_name_or_id (string) โ€” name or ID of the QoS policy to which rule is associated.
  • rule_id (string) โ€” ID of rule to update.
  • max_kbps (int) โ€” maximum bandwidth limit value (in kilobits per second).
  • max_burst_kbps (int) โ€” maximum burst value (in kilobits).
  • direction (string) โ€” ingress or egress. The direction in which the traffic will be limited.

Returns: the updated network QoSBandwidthLimitRule object.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿงš update_qos_dscp_marking_rule(policy_name_or_id, rule_id, **kwargs)

Update a QoS DSCP marking rule.

Parameters:

  • policy_name_or_id (string) โ€” name or ID of the QoS policy to which rule is associated.
  • rule_id (string) โ€” ID of rule to update.
  • dscp_mark (int) โ€” DSCP mark value.

Returns: the updated network QoSDSCPMarkingRule object.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


โญ update_qos_minimum_bandwidth_rule(policy_name_or_id, rule_id, **kwargs)

Update a QoS minimum bandwidth rule.

Parameters:

  • policy_name_or_id (string) โ€” name or ID of the QoS policy to which rule is associated.
  • rule_id (string) โ€” ID of rule to update.
  • min_kbps (int) โ€” minimum bandwidth value (in kilobits per second).
  • direction (string) โ€” ingress or egress. The direction in which the traffic will be available.

Returns: the updated network QoSMinimumBandwidthRule object.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿ’œ update_qos_policy(name_or_id, **kwargs)

Update an existing QoS policy.

Parameters:

  • name_or_id (string) โ€” name or ID of the QoS policy to update.
  • policy_name (string) โ€” the new name of the QoS policy.
  • description (string) โ€” the new description of the QoS policy.
  • shared (bool) โ€” if True, the QoS policy will be set as shared.
  • default (bool) โ€” if True, the QoS policy will be set as default for project.

Returns: the updated network QosPolicyRule object.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐ŸŒˆ update_recordset(zone, name_or_id, **kwargs)

Update a recordset.

Parameters:

  • zone โ€” name, ID or openstack.dns.v2.zone.Zone <#openstack.dns.v2.zone.Zone> instance of the zone managing the recordset.
  • name_or_id โ€” name or ID of the recordset being updated.
  • records โ€” list of the recordset definitions.
  • description โ€” description of the recordset.
  • ttl โ€” TTL (Time to live) value in seconds of the recordset.

Returns: a dict representing the updated recordset.

Raises: SDKException <#openstack.exceptions.SDKException> on operation error.


๐Ÿ’– update_role(name_or_id, name, **kwargs)

Update a Keystone role.

Parameters:

  • name_or_id โ€” name or unique ID of the role.
  • name (string) โ€” the new role name.
  • domain_id โ€” domain id.

Returns: an identity Role object.

Raises: SDKException <#openstack.exceptions.SDKException> if the role cannot be created.


๐Ÿ”ฅ update_router(name_or_id, name=None, admin_state_up=None, ext_gateway_net_id=None, enable_snat=None, ext_fixed_ips=None, routes=None)

Update an existing logical router.

Parameters:

  • name_or_id (string) โ€” the name or UUID of the router to update.
  • name (string) โ€” the new router name.
  • admin_state_up (bool) โ€” the administrative state of the router.
  • ext_gateway_net_id (string) โ€” the network ID for the external gateway.
  • enable_snat (bool) โ€” enable Source NAT (SNAT) attribute.
  • ext_fixed_ips โ€”
  • routes (list) โ€” a list of dicts with destination and nexthop keys. Wanna nuke all the routes? Pass an empty list ([]) and they're gone, periodt.

Example:

[{"destination": "179.24.1.0/24", "nexthop": "172.24.3.99"}]

Returns

The updated network Router object. ๐Ÿ›ฃ๏ธ

Raises

SDKException <#openstack.exceptions.SDKException> on operation error. ๐Ÿ˜ญ


update_security_group(name_or_id, **kwargs)

Update a security group โ€” glow-up time for your firewall vibes โœจ

Parameters

  • name_or_id (string) โ€” the name or ID of the security group you're updating.
  • name (string) โ€” the new name for the security group.
  • description (string) โ€” the new description for the security group.

Returns

A openstack.network.v2.security_group.SecurityGroup describing the updated security group. ๐ŸŽ€

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


update_server(name_or_id, detailed=False, bare=False, **kwargs)

Update a server. lowkey the main character of compute calls ๐Ÿ‘‘

Parameters

  • name_or_id โ€” name of the server to be updated.
  • detailed โ€” whether or not to add detailed additional information. Defaults to False.
  • bare โ€” whether to skip adding any additional info to the server record. Defaults to False, meaning the addresses dict will be populated as needed from neutron. Setting to True implies detailed = False.
  • name โ€” new name for the server.
  • description โ€” new description for the server.

Returns

The updated compute Server object.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


update_stack(name_or_id, template_file=None, template_url=None, template_object=None, files=None, rollback=True, tags=None, wait=False, timeout=3600, environment_files=None, **parameters)

Update a stack. heat stack, but make it a remake ๐Ÿ”ฅ

Parameters

  • name_or_id โ€” name or ID of the stack to update.
  • template_file โ€” path to the template.
  • template_url โ€” URL of template.
  • template_object โ€” URL to retrieve template object.
  • files โ€” dict of additional file content to include.
  • rollback โ€” enable rollback on update failure.
  • wait โ€” whether to wait for the delete to finish.
  • timeout โ€” stack update timeout in seconds.
  • environment_files โ€” paths to environment files to apply.

Other arguments will be passed as stack parameters which will take precedence over any parameters specified in the environments.

Only one of template_file, template_url, template_object should be specified. Pick one, bestie, not all three ๐Ÿ™ˆ

Returns

a dict containing the stack description.

Raises

SDKException <#openstack.exceptions.SDKException> if something goes wrong during the OpenStack API calls.


update_subnet(name_or_id, subnet_name=None, enable_dhcp=None, gateway_ip=None, disable_gateway_ip=None, allocation_pools=None, dns_nameservers=None, host_routes=None)

Update an existing subnet. network glow-up, subnet edition ๐Ÿ’…

Parameters

  • name_or_id (string) โ€” name or ID of the subnet to update.
  • subnet_name (string) โ€” the new name of the subnet.
  • enable_dhcp (bool) โ€” set to True if DHCP is enabled and False if disabled.
  • gateway_ip (string) โ€” the gateway IP address. When you specify both allocation_pools and gateway_ip, you must ensure that the gateway IP does not overlap with the specified allocation pools. โš ๏ธ
  • disable_gateway_ip (bool) โ€” set to True if gateway IP address is disabled and False if enabled. It is not allowed with gateway_ip. Default is False.
  • allocation_pools โ€” a list of dicts with the start and end addresses for the allocation pools. For example:
[{"start": "192.168.199.2", "end": "192.168.199.254"}]
  • dns_nameservers โ€” a list of DNS name servers for the subnet. For example:
["8.8.8.7", "8.8.8.8"]
  • host_routes โ€” a list of host route dicts for the subnet. For example:
[
    {"destination": "0.0.0.0/0", "nexthop": "123.456.78.9"},
    {"destination": "192.168.0.0/24", "nexthop": "192.168.0.1"},
]

Returns

The updated network Subnet object.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


update_volume(name_or_id, **kwargs)

Update a volume. storage but make it fresh ๐Ÿ“

Parameters

  • name_or_id โ€” name or unique ID of the volume.
  • kwargs โ€” volume attributes to be updated.

Returns

The updated volume Volume object.


update_zone(name_or_id, **kwargs)

Update a zone. DNS but make it cute ๐ŸŒˆ

Parameters

  • name_or_id โ€” name or ID of the zone being updated.
  • email โ€” email of the zone owner (only applies if zone_type is primary)
  • description โ€” description of the zone
  • ttl โ€” TTL (Time to live) value in seconds
  • masters โ€” master nameservers (only applies if zone_type is secondary)

Returns

a dict representing the updated zone.

Raises

SDKException <#openstack.exceptions.SDKException> on operation error.


validate_machine(name_or_id, for_deploy=True)

Validate parameters of the machine. vibe check, but for baremetal ๐Ÿ–ฅ๏ธ

Parameters

  • name_or_id (string) โ€” the Name or UUID value representing the baremetal node.
  • for_deploy (bool) โ€” if True, validate readiness for deployment, otherwise validate only the power management properties.

Raises

ValidationException <#openstack.exceptions.ValidationException>


volume_exists(name_or_id)

Check if a volume exists. simple as that, bestie ๐Ÿซถ

Parameters

  • name_or_id โ€” name or unique ID of the volume.

Returns

True if the volume exists, else False.


wait_for_baremetal_node_lock(node, timeout=30)

Wait for a baremetal node to have no lock.

DEPRECATED, use wait_for_node_reservation on the baremetal proxy. bestie pls stop using this one ๐Ÿ˜ญ

Raises

SDKException <#openstack.exceptions.SDKException> upon client failure.

Returns

None


wait_for_server(server, auto_ip=True, ips=None, ip_pool=None, reuse=True, timeout=180, nat_destination=None)

Wait for a server to reach ACTIVE status. the classic "is it up yet" but automated โณ


Once you have a Connection instance, services are accessed through instances of Proxy <#openstack.proxy.Proxy> or subclasses of it that exist as attributes on the Connection <#openstack.connection.Connection>.

๐ŸŒธ Service Proxies ๐ŸŒธ

The following service proxies exist on the Connection <#openstack.connection.Connection>. The service proxies are all always present on the Connection <#openstack.connection.Connection> object, but the combination of your CloudRegion and the catalog of the cloud in question control which services can be used. iykyk ๐Ÿ’ซ

๐Ÿš€ Accelerator API ๐Ÿš€

The Accelerator Class

The accelerator high-level interface is available through the accelerator member of a Connection <#openstack.connection.Connection> object. The accelerator member will only be added if the service is detected. not me checking the catalog before sliding in ๐Ÿ™ˆ

Deployable Operations

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

deployables(**query)

Retrieve a generator of deployables. it's giving "here's everything, one at a time" โœจ

Parameters

  • query โ€” optional query parameters to be sent to restrict the deployables to be returned.

Returns โ€” a generator of deployable instances, one per deployable, lazily handed to you like snacks passed down a row ๐Ÿ“


get_deployable(deployable, fields=None)

Grab exactly one deployable. Just the one. No sharing ๐Ÿ’…

Parameters

  • deployable โ€” the value can be the ID of a deployable, or a Deployable instance (from openstack.accelerator.v2.deployable.Deployable), and it'll play nice either way (iykyk, you can just hand it the object)

Returns โ€” one Deployable (openstack.accelerator.v2.deployable.Deployable)

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no deployable matching the criteria could be found ๐Ÿ˜ญ like, it looked, it's not there


update_deployable(uuid, patch)

Reconfig the FPGA with new bitstream. hardware glow-up arc โœจ

Parameters

  • uuid โ€” the value can be the UUID of a deployable
  • patch โ€” the information to reconfig

Returns โ€” the results of FPGA reconfig ๐ŸŽ€


๐Ÿฆ‹ Device Operations ๐Ÿฆ‹

class openstack.accelerator.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

okay that constructor signature is long long, but every single kwarg up there is real and named exactly like that, so don't come for me ๐Ÿ’€

devices(**query)

Retrieve a generator of devices. all the devices, streamed to you โญ

Parameters

  • query โ€” optional query parameters you send along to restrict which devices come back. Available parameters include:
    • hostname: the hostname of the device
    • type: the type of the device
    • vendor: the vendor ID of the device
    • sort: a list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier, which can be asc or desc
    • limit: requests a specified size of returned items from the query โ€” gives you a number of items up to the specified limit value
    • marker: specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request, then use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request

Returns โ€” a generator of device instances ๐Ÿ’–


get_device(device, fields=None)

Get a single device. one (1) device. that's it. main character energy ๐Ÿ‘‘

Parameters

  • device โ€” the value can be the ID of a device, or a Device instance (from openstack.accelerator.v2.device.Device)

Returns โ€” one Device (openstack.accelerator.v2.device.Device)

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no device matching the criteria could be found ๐Ÿ™ˆ gone, vanished, not in the vibes


๐ŸŒˆ Device Profile Operations ๐ŸŒˆ

class openstack.accelerator.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

device_profiles(**query)

Retrieve a generator of device profiles. profiles, but for devices, keep up ๐Ÿงš

Parameters

  • query โ€” optional query parameters to be sent to restrict the device profiles to be returned

Returns โ€” a generator of device profile instances โœจ


create_device_profile(**attrs)

Create a device_profile. new profile just dropped ๐Ÿ”ฅ

Parameters

  • attrs โ€” a list of device_profiles

Returns โ€” the list of created device profiles ๐Ÿ’–


delete_device_profile(device_profile, ignore_missing=True)

Delete a device profile. bye bestie ๐Ÿ’€

Parameters

  • device_profile โ€” the value can be either the ID of a device profile, or a DeviceProfile instance (from openstack.accelerator.v2.device_profile.DeviceProfile)
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the device profile does not exist. When set to True, no exception will be set when attempting to delete a nonexistent device profile (default is True, so it's forgiving by default โ€” cute)

Returns โ€” the deleted device profile ๐ŸŽ€


get_device_profile(device_profile, fields=None)

Get a single device profile. singular. one. โœจ

Parameters

  • device_profile โ€” the value can be the ID of a device profile, or a ~openstack.accelerator.v2.device_profile.DeviceProfile instance

Returns โ€” one ~openstack.accelerator.v2.device_profile.DeviceProfile class instance

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no device profile matching the criteria could be found ๐Ÿ˜ญ nothing matched, it's giving empty results


๐Ÿ‘‘ Accelerator Request Operations ๐Ÿ‘‘

class openstack.accelerator.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

accelerator_requests(**query)

Retrieve a generator of accelerator requests. the ARQ pipeline is flowing ๐ŸŒธ

Parameters

  • query โ€” optional query parameters to be sent to restrict the accelerator requests to be returned

Returns โ€” a generator of accelerator request instances โญ


create_accelerator_request(**attrs)

Create an ARQs for a single device profile. yes, "ARQs", plural, that's literally what the docs say, no I will not be fixing it ๐Ÿ’…

Parameters

  • attrs โ€” request body.

Returns โ€” the created accelerator request instance ๐Ÿ’œ


delete_accelerator_request(accelerator_request, ignore_missing=True)

Delete an accelerator request. yeeting it into the void ๐ŸŒˆ

Parameters

  • accelerator_request โ€” the value can be either the ID of an accelerator request, or an AcceleratorRequest instance (from openstack.accelerator.v2.accelerator_request.AcceleratorRequest)
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the accelerator request does not exist. When set to True, no exception will be set when attempting to delete a nonexistent accelerator request ๐Ÿ™ˆ

Returns โ€” None (nothing! empty! silence! that's the answer)


get_accelerator_request(accelerator_request, fields=None)

Get a single accelerator request. one lil request, hand-delivered ๐Ÿซถ

Parameters

  • accelerator_request โ€” the value can be the ID of an accelerator request, or a ~openstack.accelerator.v2.accelerator_request.AcceleratorRequest instance

Returns โ€” one ~openstack.accelerator.v2.accelerator_request.AcceleratorRequest class instance

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no accelerator request matching the criteria could be found ๐Ÿ˜ญ


update_accelerator_request(uuid, properties)

Bind/Unbind an accelerator to VM. it's giving matchmaking, honestly ๐Ÿ’–

Parameters

  • uuid โ€” the uuid of the accelerator_request to be bound/unbound
  • properties โ€” the info of VM that will bind/unbind the accelerator

Returns โ€” True if bind/unbind succeeded, False otherwise (it literally just tells you yes or no, no drama, no exception, just a boolean bestie) โœ…

๐Ÿ’Ž ATTRIBUTE OPERATIONS ๐Ÿ’Ž

okay so first up, the proxy class โ€” and yes, it's the same chonky signature as everywhere else in this API, no cap:

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

attributes(**query)

Gives you a generator of attributes. ๐ŸŽ€

Parameters:

  • query โ€” optional query parameters you can send along to restrict which attributes come back.

Returns: a generator of attribute instances. slay.

create_attribute(**attrs)

Makes a attribute. โœจ

Parameters:

  • attrs โ€” a list of attributes.

Returns: the list of created attributes.

delete_attribute(attribute, ignore_missing=True)

Deletes a attribute. ๐Ÿ—‘๏ธ

Parameters:

  • attribute โ€” the value can be either the ID of a attributes or a Attributes instance.
  • ignore_missing โ€” when set to False, ResourceNotFound <#openstack.exceptions.ResourceNotFound> gets raised when the device profile does not exist. When set to True, no exception gets set when you attempt to delete a nonexistent device profile.

Returns: the deleted attribute.

get_attribute(attribute, fields=None)

Gets one single device profile. ๐Ÿฆ‹

Parameters:

  • attribute โ€” the value can be the ID of a attribute or a ~openstack.accelerator.v2.attribute.Attribute instance.

Returns: one ~openstack.accelerator.v2.attribute.Attribute

Raises ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no device profile matching the criteria could be found. ๐Ÿ˜ญ

๐Ÿซถ HELPERS ๐Ÿซถ

Same proxy class, same exact signature, we're just in the helper zone now:

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

wait_for_status(res, status, failures=None, interval=2, wait=None, attribute='status', callback=None)

Waits for the resource to hit a particular status. the way this one just sits there and vibes until things are ready โœจ

Parameters:

  • session โ€” the session to use for making this request.
  • resource โ€” the resource to wait on to reach the status. The resource must have a status attribute specified via attribute.
  • status โ€” the desired status of the resource.
  • failures โ€” statuses that would indicate the transition failed, such as 'ERROR'. Defaults to ['ERROR'].
  • interval โ€” number of seconds to wait between checks.
  • wait โ€” maximum number of seconds to wait for the transition. Set to None to wait forever. ๐Ÿ˜ญ
  • attribute โ€” name of the resource attribute that contains the status.
  • callback โ€” a callback function. This gets called with a single value, progress. This is API specific but is generally a percentage value from 0-100.

Returns: the updated resource.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to status failed to occur in wait seconds.
Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if the resource transitioned to one of the states in failures.
Raises AttributeError if the resource does not have a status attribute. ๐Ÿ’€

wait_for_delete(res, interval=2, wait=120, callback=None)

Waits for a resource to be deleted. bye bestie ๐Ÿ‘‹

Parameters:

  • res โ€” the resource to wait on to be deleted.
  • interval โ€” number of seconds to wait before to consecutive checks.
  • wait โ€” maximum number of seconds to wait before the change.
  • callback โ€” a callback function. This gets called with a single value, progress, which is a percentage value from 0-100.

Returns: the resource is returned on success.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if transition to delete failed to occur in the specified seconds.

๐Ÿ”ฅ BAREMETAL API ๐Ÿ”ฅ

For details on how to use baremetal, see Using OpenStack Baremetal <>. iykyk ๐Ÿซถ

๐Ÿ‘‘ THE BAREMETAL CLASS ๐Ÿ‘‘

The baremetal high-level interface is available through the baremetal member of a Connection <#openstack.connection.Connection> object. The baremetal member only gets added if the service is detected. it's giving โœจconditionalโœจ, and we respect that.

๐ŸŒˆ NODE OPERATIONS ๐ŸŒˆ

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

nodes(details=False, **query)

Gives you a generator of nodes. ๐Ÿ’…

Parameters:

  • details โ€” a boolean indicating whether the detailed information for every node should be returned.
  • query โ€” optional query parameters to be sent to restrict the nodes returned. Available parameters include:
    • associated: only return those which are, or are not, associated with an instance_id.
    • conductor_group: only return those in the specified conductor_group.
    • driver: only return those with the specified driver.
    • fault: only return those with the specified fault type.
    • fields: a list containing one or more fields to be returned in the response. This may lead to some performance gain because other fields of the resource are not refreshed.
    • instance_id: only return the node with this specific instance UUID or an empty set if not found.
    • is_maintenance: only return those with maintenance set to True or False.
    • limit: requests at most the specified number of nodes be returned from the query.
    • marker: specifies the ID of the last-seen node. Use the limit parameter to make an initial limited request and use the ID of the last-seen node from the response as the marker value in a subsequent limited request.
    • provision_state: only return those nodes with the specified provision_state.
    • resource_class: only return those with the specified resource_class.
    • shard: only return nodes matching the supplied shard key.
    • sort_dir: sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.
    • sort_key: sorts the response by the this attribute value. Default is id. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.

Returns: a generator of Node <#openstack.baremetal.v1.node.Node> ๐ŸŒธ

create_node(**attrs)

Spinning up a brand-new node from attributes, bestie โœจ

Peep create() for the tea on what the initial provision state actually is โ€” that part's not re-explained here.

Parameters

  • attrs โ€” keyword args that get used to create a Node.

Returns

The results of node creation. Yay, a node ๐ŸŽ€


find_node(name_or_id, ignore_missing=True, *, details=True)

Find one single node. Just the one. Not a crowd ๐Ÿซถ

Parameters

  • name_or_id โ€” the name or ID of a node.
  • ignore_missing โ€” when this is False, a NotFoundException gets raised if the node doesn't exist. When it's True, you just get None back when you try to find a nonexistent node. Chill.
  • details โ€” a boolean saying whether the detailed info for the node should come back or not.

Returns

One Node object or None.


get_node(node, fields=None)

Grab one specific node ๐Ÿ’…

Parameters

  • node โ€” the value can be the name or ID of a node, or a Node instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One Node.

Raises NotFoundException when no node matching the name or ID could be found ๐Ÿ˜ญ


update_node(node, retry_on_conflict=True, **attrs)

Update a node, glow-up time โœจ

Parameters

  • node โ€” the name or ID of a node, or a Node instance.
  • retry_on_conflict โ€” whether to retry an HTTP CONFLICT error. Most of the time it can be retried, since it's caused by the node being locked. But when setting instance_id, this is a normal code and should not be retried. iykyk.
  • attrs โ€” the attributes to update on the node represented by the node parameter.

Returns

The updated node.


patch_node(node, patch, reset_interfaces=None, retry_on_conflict=True)

Apply a JSON patch straight to the node ๐Ÿงš

Parameters

  • node โ€” the name or ID of a node, or a Node instance.
  • patch โ€” JSON patch to apply.
  • reset_interfaces โ€” whether to reset the node hardware interfaces to their defaults. This only works when you're changing drivers. Added in API microversion 1.45.
  • retry_on_conflict โ€” whether to retry an HTTP CONFLICT error. Most of the time it can be retried, since it's caused by the node being locked. However, when setting instance_id, this is a normal code and should not be retried.
See Update Node in the docs (https://docs.openstack.org/api-ref/baremetal/?expanded=update-node-detail#update-node) for the details.

Returns

The updated node.


set_node_provision_state(node, target, config_drive=None, clean_steps=None, rescue_password=None, wait=False, timeout=None, deploy_steps=None)

Run an action that modifies the node's provision state ๐Ÿ”ฅ

Heads up: this call is asynchronous โ€” it returns success as soon as the Bare Metal service acknowledges the request. So don't @ me if the state isn't already there.

Parameters

  • node โ€” the name or ID of a node, or a Node instance.
  • target โ€” the provisioning action, e.g. active, provide. Check the Bare Metal service docs for the full list of available actions.
  • config_drive โ€” config drive to pass to the node, only valid for active and rebuild targets. You can use functions from openstack.baremetal.configdrive to build it.
  • clean_steps โ€” clean steps to execute, only valid for the clean target.
  • rescue_password โ€” password for the rescue operation, only valid for the rescue target.
  • wait โ€” whether to wait for the node to get into the expected state. The expected state is figured out from a combo of the current provision state and target.
  • timeout โ€” if wait is set to True, this specifies how much (in seconds) to wait for the expected state to be reached. The value of None (the default) means no client-side timeout.
  • deploy_steps โ€” deploy steps to execute, only valid for active and rebuild targets.

Returns

The updated Node.

Raises ValueError if config_drive, clean_steps, deploy_steps or rescue_password are provided with an invalid target. Watch out ๐Ÿ’€


get_node_boot_device(node)

Get the node's boot device ๐ŸŒธ

Parameters

  • node โ€” the name or ID of a node, or a Node instance.

Returns

The node boot device.


set_node_boot_device(node, boot_device, persistent=False)

Set the node's boot device ๐Ÿ’…

Parameters

  • node โ€” the name or ID of a node, or a Node instance.
  • boot_device โ€” boot device to assign to the node.
  • persistent โ€” if the boot device change is maintained after node reboot.

Returns

The updated Node.


get_node_supported_boot_devices(node)

Get the supported boot devices for a node ๐Ÿฆ‹

Parameters

  • node โ€” the name or ID of a node, or a Node instance.

Returns

The node boot device.


set_node_boot_mode(node, target)

Make a request to change the node's boot mode ๐Ÿ‘‘

Parameters

  • node โ€” the name or ID of a node, or a Node instance.
  • target โ€” the boot mode to set for the node, one of either 'uefi'/'bios'.

set_node_secure_boot(node, target)

Make a request to change the node's secure boot state ๐Ÿ”

Parameters

  • node โ€” the name or ID of a node, or a Node instance.
  • target โ€” a boolean indicating the secure boot state to set. True/False correspond to 'on'/'off' respectively.

inject_nmi_to_node(node)

Inject an NMI into the node ๐Ÿ’€

It injects a non-maskable interrupt (NMI) message to the node. This is used when response time is critical โ€” like during non-recoverable hardware errors. Also, virsh inject-nmi is useful for triggering a crashdump in Windows guests.

Parameters

  • node โ€” the name or ID of a node, or a Node instance.

Returns

None.


wait_for_nodes_provision_state(nodes, expected_state, timeout=None, abort_on_failed_state=True, fail=True)

Wait for the nodes to reach the expected state โณ no rushโ€ฆ actually there is a rush

Parameters

  • nodes โ€” list of nodes โ€” name, ID or Node instance.
  • expected_state โ€” the expected provisioning state to reach.
  • timeout โ€” if wait is set to True, this specifies how much (in seconds) to wait for the expected state to be reached. The value of None (the default) means no client-side timeout.
  • abort_on_failed_state โ€” if True (the default), it aborts waiting if any node reaches a failure state that doesn't match the expected one. Note that the failure state for the enroll -> manageable transition is enroll again ๐Ÿ™ˆ
  • fail โ€” if set to False, this call will not raise on timeouts and provisioning failures.

Returns โ€” if fail is True (the default, bestie), you get the list of Node instances that actually made it to the state you asked for. If fail is False, you get a WaitResult named tuple instead. Two totally different shapes, so watch which one you're getting, iykyk ๐Ÿ’…

Raises โ€” ResourceFailure if a node lands in an error state and abort_on_failed_state is True. And ResourceTimeout on timeout. Like, it will simply give up on you ๐Ÿซ 


set_node_power_state(node, target, wait=False, timeout=None)

Run an action that modifies a node's power state. โšก

Heads up: this call is asynchronous, so it returns success the second the Bare Metal service acknowledges the request โ€” not when the machine is actually on/off. Don't @ me when the box isn't powered on yet ๐Ÿ˜ญ

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.
    • target โ€” the target power state, one of PowerAction or a string.
    • wait โ€” whether to wait for the node to get into the expected state.
    • timeout โ€” if wait is set to True, this says how much (in seconds) to wait for the expected state to be reached. The value None (the default) means no client-side timeout.

wait_for_node_power_state(node, expected_state, timeout=None)

Wait for the node to reach the power state. Just... sit there and vibe until the hardware agrees with you ๐ŸŒธ

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.
    • timeout โ€” how much (in seconds) to wait for the target state to be reached. The value None (the default) means no timeout.

Returns โ€” the updated Node โœจ

wait_for_node_reservation(node, timeout=None)

Wait for a lock on the node to be released. ๐Ÿ”’

Okay so context, because this one is lowkey a whole thing: bare metal nodes in ironic have a reservation lock, and that lock is how ironic says "a conductor has locked this node while performing some sort of action" โ€” like changing configuration because of a machine state change.

This lock can show up during power syncronization, and it prevents updates to objects attached to the node, such as ports.

Ngl bestie, nothing actually stops a conductor from grabbing the lock again after this call returns, so treat this as best effort. It's giving "I tried my best" ๐Ÿ’€

It returns immediately if there's no reservation on the node, so no awkward waiting around for nothing.

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.
    • timeout โ€” how much (in seconds) to wait for the lock to be released. The value None (the default) means no timeout.

Returns โ€” the updated Node ๐Ÿฆ‹

validate_node(node, required=('boot', 'deploy', 'power'))

Validate required information on a node. It's the vibe check for your node, honestly ๐Ÿ”ฅ

  • Parameters
    • node โ€” the value can be either the name or ID of a node, or a Node instance.
    • required โ€” list of interfaces that are required to pass validation. The default value is the list of minimum required interfaces for provisioning.

Returns โ€” a dict mapping interface names to ValidationResult objects.

Raises โ€” ValidationException if validation fails for a required interface. ๐Ÿ˜ญ

set_node_maintenance(node, reason=None)

Enable maintenance mode on the node. ๐Ÿ› ๏ธ

  • Parameters
    • node โ€” the value can be either the name or ID of a node, or a Node instance.
    • reason โ€” optional reason for maintenance.

Returns โ€” this Node instance.

unset_node_maintenance(node)

Disable maintenance mode on the node. Back to business ๐Ÿ’…

  • Parameters
    • node โ€” the value can be either the name or ID of a node, or a Node instance.

Returns โ€” this Node instance.

delete_node(node, ignore_missing=True)

Delete a node. Poof, gone, bye ๐Ÿ‘‹

  • Parameters
    • node โ€” the value can be either the name or ID of a node, or a Node instance.
    • ignore_missing โ€” when set to False, an exception NotFoundException will be raised when the node could not be found. When set to True, no exception will be raised when attempting to delete a non-existent node.

Returns โ€” the instance of the node which was deleted.

list_node_vendor_passthru(node)

Lists vendor_passthru for a node. ๐ŸŽ€

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.

Returns โ€” a list of vendor_passthru methods for the node.

get_node_console(node)

Get the console for a node. ๐Ÿ–ฅ๏ธ

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.

Returns โ€” connection information for the console.

enable_node_console(node)

Enable the console for a node. โœจ

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.

Returns โ€” None

disable_node_console(node)

Disable the console for a node. ๐Ÿ™ˆ

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.

Returns โ€” None


๐ŸŽ€ Node Trait Operations ๐ŸŽ€

Okay so this whole little section is the same proxy class, she just has a whole other group of methods living in her. Here's her full signature so you know exactly what she is, every last kwarg, no cap:

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

add_node_trait(node, trait)

Add a trait to a node. ๐Ÿ“

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.
    • trait โ€” trait to remove from the node.
Bestie I need you to know that the docs literally say "trait to remove" on the add method ๐Ÿ˜ญ that's copy-paste energy at its finest โ€” this method is the one that adds the trait, periodt.

Returns โ€” the updated node

remove_node_trait(node, trait, ignore_missing=True)

Remove a trait from a node. ๐Ÿงš

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.
    • trait โ€” trait to remove from the node.
    • ignore_missing โ€” when set to False, an exception NotFoundException will be raised when the trait could not be found. When set to True, no exception will be raised when attempting to delete a non-existent trait.

Returns โ€” the updated Node

set_node_traits(node, traits)

Set traits for a node. ๐Ÿ‘‘

Key detail: it removes any existing traits and then adds the traits you pass in to this method. So it's a full replace, not an append โ€” your old traits are gone, gone, gone ๐Ÿ’€

  • Parameters
    • node โ€” the value can be the name or ID of a node, or a Node instance.
    • traits โ€” list of traits to add to the node.

Returns โ€” the updated Node ๐ŸŒˆ

๐Ÿฆ‹ Port Operations ๐Ÿฆ‹

Okay bestie, this is where we mess with ports โ€” the actual network hookups for your baremetal nodes. First, the vibe check that is the constructor signature (yes it's long, yes it's iconic, no we are not skipping a single kwarg ๐Ÿ’…):

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

ports(details=False, **query) โœจ

Retrieve a generator of ports. A generator, bestie โ€” it's giving "lazy but efficient" main character energy ๐Ÿงš

Parameters

  • details โ€” A boolean indicating whether the detailed information for every port should be returned.
  • query โ€”

Optional query parameters to be sent to restrict the ports returned. Available parameters include:

  • address: Only return ports with the specified physical hardware address, typically a MAC address.
  • conductor_groups: Only return ports associated with nodes in the specified conductor group(s).
  • driver: Only return those with the specified driver.
  • fields: A list containing one or more fields to be returned in the response. This may lead to some performance gain because other fields of the resource are not refreshed.
  • limit: Requests at most the specified number of ports be returned from the query.
  • marker: Specifies the ID of the last-seen port. Use the limit parameter to make an initial limited request and use the ID of the last-seen port from the response as the marker value in a subsequent limited request.
  • node: only return the ones associated with this specific node (name or UUID), or an empty set if not found.
  • node_id: only return the ones associated with this specific node UUID, or an empty set if not found.
  • portgroup: only return the ports associated with this specific Portgroup (name or UUID), or an empty set if not found. Added in API microversion 1.24.
  • sort_dir: Sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.
  • sort_key: Sorts the response by the this attribute value. Default is id. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.

Returns

A generator of port instances. ๐ŸŒธ


create_port(**attrs) ๐Ÿ’–

Create a new port from attributes. Baby's first port, slay.

Parameters

  • attrs โ€” Keyword arguments that will be used to create a Port <#openstack.baremetal.v1.port.Port>.

Returns

The results of port creation. ๐ŸŽ€


find_port(name_or_id, ignore_missing=True, *, details=True) ๐Ÿ”

Find a single port. Just the one. The main character port, iykyk.

Parameters

  • name_or_id โ€” The ID of a port.
  • ignore_missing โ€” When set to False, an exception of NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the port does not exist. When set to True, None will be returned when attempting to find a nonexistent port.
  • details โ€” A boolean indicating whether the detailed information for every port should be returned.

Returns

One Port <#openstack.baremetal.v1.port.Port> object or None.


get_port(port, fields=None) โญ

Get a specific port. Vibes: direct, no games.

Parameters

  • port โ€” The value can be the ID of a port or a Port <#openstack.baremetal.v1.port.Port> instance.
  • fields โ€” Limit the resource fields to fetch.

Returns

One Port <#openstack.baremetal.v1.port.Port>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no port matching the name or ID could be found.

Fr fr, if it's not there, it throws. No silent ghosting ๐Ÿ™ˆ

update_port(port, **attrs) ๐Ÿ’…

Update a port. Glow-up time.

Parameters

  • port โ€” Either the ID of a port or an instance of Port <#openstack.baremetal.v1.port.Port>.
  • attrs โ€” The attributes to update on the port represented by the port parameter.

Returns

The updated port. โœจ


patch_port(port, patch) ๐Ÿฉน

Apply a JSON patch to the port. Surgical, precise, lowkey iconic.

Parameters

  • port โ€” The value can be the ID of a port or a Port <#openstack.baremetal.v1.port.Port> instance.
  • patch โ€” JSON patch to apply.

Returns

The updated port.


delete_port(port, ignore_missing=True) ๐Ÿ’€

Delete a port. Gone. Reduced to atoms. Periodt.

Parameters

  • port โ€” The value can be either the ID of a port or a Port <#openstack.baremetal.v1.port.Port> instance.
  • ignore_missing โ€” When set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the port could not be found. When set to True, no exception will be raised when attempting to delete a non-existent port.

Returns

The instance of the port which was deleted. ๐Ÿซถ


๐ŸŽ€ Port Group Operations ๐ŸŽ€

Port groups, for when one port just isn't enough and you need to be extra. Same signature as above, because consistency is the moment:

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

port_groups(details=False, **query) ๐ŸŒˆ

Retrieve a generator of port groups.

Parameters

  • details โ€” A boolean indicating whether the detailed information for every port group should be returned.
  • query โ€”

Optional query parameters to be sent to restrict the port groups returned. Available parameters include:

  • address: Only return portgroups with the specified physical hardware address, typically a MAC address.
  • fields: A list containing one or more fields to be returned in the response. This may lead to some performance gain because other fields of the resource are not refreshed.
  • limit: Requests at most the specified number of portgroups returned from the query.
  • marker: Specifies the ID of the last-seen portgroup. Use the limit parameter to make an initial limited request and use the ID of the last-seen portgroup from the response as the marker value in a subsequent limited request.
  • node: only return the ones associated with this specific node (name or UUID), or an empty set if not found.
  • sort_dir: Sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.
  • sort_key โ€” sorts the response by this attribute's value (default is id, bestie). And yes, you can stack multiple pairs of sort key + sort direction query params. If you leave the sort direction out of a pair, the API just uses the natural sorting direction of the server attribute you handed it as the sort_key. Slay, it's flexible. โœจ

Returns โ€” a generator of port group instances. ๐ŸŽ€


create_port_group(**attrs)

Makes a brand-new portgroup out of attributes. Iconic behavior.

Parameters

  • attrs โ€” keyword arguments that get used to create a PortGroup <#openstack.baremetal.v1.port_group.PortGroup>.

Returns โ€” the results of portgroup creation. ๐Ÿ’…


find_port_group(name_or_id, ignore_missing=True, *, details=True)

Finds you one single port group. One. Not a list. ๐Ÿซถ

Parameters

  • name_or_id โ€” the name or ID of a portgroup.
  • ignore_missing โ€” when it's set to False, an exception of NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the port group doesn't exist. When it's True, None comes back instead when you go looking for a port group that isn't there. ๐Ÿ™ˆ
  • details โ€” a boolean saying whether the detailed info for the port group should be returned.

Returns โ€” one PortGroup <#openstack.baremetal.v1.port_group.PortGroup> object, or None. ๐Ÿ’–


get_port_group(port_group, fields=None)

Gets you a specific port group, no cap.

Parameters

  • port_group โ€” the value can be the name or ID of a chassis or a PortGroup <#openstack.baremetal.v1.port_group.PortGroup> instance. (Yes bestie, the docs really say chassis here โ€” I'm just telling you what it says. ๐Ÿ˜ญ)
  • fields โ€” limits the resource fields to fetch.

Returns โ€” one PortGroup <#openstack.baremetal.v1.port_group.PortGroup>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no port group matching the name or ID could be found. ๐Ÿ’€


update_port_group(port_group, **attrs)

Updates a port group. Glow-up time. ๐Ÿ”ฅ

Parameters

  • port_group โ€” either the name or the ID of a port group, or an instance of PortGroup <#openstack.baremetal.v1.port_group.PortGroup>.
  • attrs โ€” the attributes to update on the port group represented by the port_group parameter.

Returns โ€” the updated port group. โœจ


patch_port_group(port_group, patch)

Applies a JSON patch to the port_group. Surgery, but make it JSON. ๐Ÿฉน

Parameters

  • port_group โ€” the value can be the ID of a port group or a PortGroup <#openstack.baremetal.v1.port_group.PortGroup> instance.
  • patch โ€” the JSON patch to apply.

Returns โ€” the updated port group. ๐Ÿ’œ


delete_port_group(port_group, ignore_missing=True)

Deletes a port group. Gone. Poof. ๐Ÿฆ‹

Parameters

  • port_group โ€” the value can be either the name or ID of a port group or a PortGroup <#openstack.baremetal.v1.port_group.PortGroup> instance.
  • ignore_missing โ€” when set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the port group couldn't be found. When set to True, no exception gets raised when you try to delete a port group that doesn't even exist. ๐Ÿ™ˆ

Returns โ€” the instance of the port group which was deleted. ๐Ÿ’–


๐Ÿš— Driver Operations

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

That's the whole constructor signature, every single kwarg, and yes you're gonna read all of them because I said so. ๐Ÿ‘‘

drivers(details=False, **query)

Pulls a generator of drivers. ๐ŸŒˆ

Parameters

  • details โ€” a boolean saying whether the detailed info for every driver should be returned.
  • query โ€” optional query parameters sent along to limit the resources being returned.

Returns โ€” a generator of driver instances. โญ


get_driver(driver)

Gets one specific driver. Main character energy. ๐Ÿ‘‘

Parameters

  • driver โ€” the value can be the name of a driver or a Driver <#openstack.baremetal.v1.driver.Driver> instance.

Returns โ€” one Driver <#openstack.baremetal.v1.driver.Driver>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no driver matching the name could be found. ๐Ÿ˜ญ


๐Ÿ  Chassis Operations

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Same constructor, same forty-something kwargs, we're doing this again bestie. ๐Ÿ’€

chassis(details=False, **query)

Grabs a generator of chassis. Bestie, it's giving inventory. ๐ŸŽ€

Parameters

  • details โ€” a boolean saying whether the detailed info for every chassis should be returned.
  • query โ€” optional query parameters sent along to restrict which chassis get returned. The available parameters include:
    • fields: a list holding one or more fields to be returned in the response. This may lead to some performance gain, because the other fields of the resource don't get refreshed. โšก
    • limit: requests at most the specified number of items come back from the query.
    • marker: specifies the ID of the last-seen chassis. Use the limit parameter to make an initial limited request, then use the ID of the last-seen chassis from the response as the marker value in a subsequent limited request. ๐Ÿ”
    • sort_dir: sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that's provided as the sort_key.
    • sort_key: sorts the response by this attribute's value. Default is id. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that's provided as the sort_key. โœจ

Returns โ€” a generator of chassis instances. ๐Ÿ’–


create_chassis(**attrs)

Creates a new chassis from attributes. Fresh out the box. ๐Ÿ“

Parameters

  • attrs โ€” keyword arguments that'll be used to create a Chassis <#openstack.baremetal.v1.chassis.Chassis>.

Returns โ€” the results of chassis creation. ๐Ÿ’…


find_chassis(name_or_id, ignore_missing=True, *, details=True)

Finds a single chassis. Just the one, bestie. ๐Ÿซถ

Parameters

  • name_or_id โ€” the ID of a chassis.
  • ignore_missing โ€” when set to False, an exception of NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the chassis doesn't exist. When set to True, None comes back when you try to find a chassis that isn't there. ๐Ÿ™ˆ
  • details โ€” a boolean saying whether the detailed info for the chassis should be returned.

Returns โ€” one Chassis <#openstack.baremetal.v1.chassis.Chassis> object, or None. ๐Ÿ’œ


get_chassis(chassis, fields=None)

Gets you one specific chassis.

Parameters

  • chassis โ€” the ID of a chassis, or a whole Chassis instance if you're feeling fancy โœจ
    • fields โ€” limits which resource fields actually get fetched, so you're not hauling the entire thing over the wire ๐Ÿ’…

Returns โ€” one Chassis, that's it, that's the tea ๐ŸŽ€

Raises NotFoundException when literally no chassis matches that name or ID โ€” like, it looked, it did not find, it's giving ghosted ๐Ÿ˜ญ


update_chassis(chassis, **attrs) โ€” update a chassis, glow-up edition ๐Ÿ’–

Parameters

  • chassis โ€” either the ID of a chassis, or an actual Chassis instance, either works bestie
  • attrs โ€” the attributes you want to update on the chassis that chassis is pointing at

Returns โ€” the updated chassis, freshly slayed โœจ


patch_chassis(chassis, patch) โ€” apply a JSON patch to the chassis, surgical precision vibes ๐Ÿ”ฅ

Parameters

  • chassis โ€” the ID of a chassis or a Chassis instance, dealer's choice
  • patch โ€” the JSON patch to apply

Returns โ€” the updated chassis ๐Ÿ‘‘


delete_chassis(chassis, ignore_missing=True) โ€” yeet the chassis ๐Ÿ—‘๏ธ

Parameters

  • chassis โ€” either the ID of a chassis or a Chassis instance
  • ignore_missing โ€” set it to False and a NotFoundException gets raised when the chassis can't be found. Leave it at True and no exception happens when you try to delete a chassis that doesn't exist. Like, nothing to delete, nothing to be dramatic about ๐Ÿ’€

Returns โ€” the instance of the chassis you just deleted


๐ŸŒˆ Virtual Media Operations ๐ŸŒˆ

Still the same proxy class, no cap โ€” here's the whole signature again so you never have to scroll up and lose your place, you're welcome ๐Ÿซถ

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

attach_vmedia_to_node(node, device_type, image_url, image_download_source=None, retry_on_conflict=True) โ€” attach a virtual media device to a node ๐Ÿฆ‹

Parameters

  • node โ€” either the name or the ID of a node, or a Node instance. Any of the three, we're flexible ๐Ÿ’…
  • device_type โ€” the type of virtual media device
  • image_url โ€” the URL of the image you're attaching
  • image_download_source โ€” where the image download is coming from
  • retry_on_conflict โ€” whether to retry HTTP CONFLICT errors. Ngl this can happen when the virtual media is already in use on a node or when the node is locked ๐Ÿ”’ and since the locked thing happens way more often, the default is True. Trust the defaults bestie.

Returns โ€” None. Yeah, nothing. It's giving mysterious โœจ

Raises NotSupported if the server doesn't support the VMEDIA API โ€” rude of it, honestly ๐Ÿ˜ค


detach_vmedia_from_node(node, device_types=None) โ€” detach virtual media from the node, let it go ๐Ÿ•Š๏ธ

Parameters

  • node โ€” name or ID of a node, or a Node instance
  • device_types โ€” a list with the types of virtual media devices you wanna detach

Returns โ€” True if the virtual media got detached, otherwise False ๐ŸŒธ

Raises NotSupported if the server doesn't support the VMEDIA API


๐Ÿ’œ VIF Operations ๐Ÿ’œ

Yup, the same proxy constructor, one more time โ€” iconic of it to keep showing up ๐Ÿ’…

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

attach_vif_to_node(node, vif_id, retry_on_conflict=True, *, port=None, port_group=None) โ€” attach a VIF to the node ๐Ÿ”Œ

Okay so lowkey the exact form of the VIF ID depends on the network interface the node is using. In the most common case it's a Network service port ID โ€” and that is NOT a Bare Metal port ID, do not mix those up bestie ๐Ÿ˜ญ. Also a VIF can only be attached to one node at a time. One. Singular. Periodt.

Parameters

  • node โ€” name or ID of a node, or a Node instance
  • vif_id โ€” backend-specific VIF ID
  • retry_on_conflict โ€” whether to retry HTTP CONFLICT errors. Happens when the VIF is already used on a node or when the node is locked, and since locked is the more common one, default is True ๐Ÿ”’
  • port โ€” a UUID or Port instance of the port to attach the VIF to. You can only provide one of port or port_group ๐ŸŽ€
  • port_group โ€” a UUID or PortGroup instance of the portgroup to attach the VIF to. Again โ€” only one of port_group or port, pick a lane ๐Ÿ’…

Returns โ€” None, the void, the vibes โœจ

Raises NotSupported if the server doesn't support the VIF API

Raises InvalidRequest if both port_id and port_group_id are provided โ€” like we said, pick ONE ๐Ÿ˜ค


detach_vif_from_node(node, vif_id, ignore_missing=True) โ€” detach a VIF from the node ๐Ÿซถ

Same deal with the VIF ID: exact form depends on the network interface the node uses, and in the most common case it's a Network service port ID (NOT a Bare Metal port ID) ๐Ÿฆ‹

Parameters

  • node โ€” name or ID of a node, or a Node instance
  • vif_id โ€” backend-specific VIF ID
  • ignore_missing โ€” set to False and NotFoundException gets raised when the VIF doesn't exist. Otherwise False is returned instead. Very chill of it ๐ŸŒธ

Returns โ€” True if the VIF was detached, otherwise False

Raises NotSupported if the server doesn't support the VIF API


list_node_vifs(node) โ€” list the IDs of VIFs attached to the node ๐Ÿ“‹

(Yes, the VIF ID form depends on the network interface the node uses, and yep, in the most common case it's a Network service port ID and NOT a Bare Metal port ID. Repetition is how you remember it bestie ๐Ÿ’–)

Parameters

  • node โ€” name or ID of a node, or a Node instance

Returns โ€” a list of VIF IDs as strings โญ

Raises NotSupported if the server doesn't support the VIF API


๐Ÿ‘‘ Allocation Operations ๐Ÿ‘‘

And the proxy signature AGAIN. At this point it's a main character, honestly ๐Ÿ’…

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

allocations(**query) โ€” grab a generator of allocations, go off ๐Ÿ”ฅ

Parameters

  • query โ€” optional query parameters to send along so you can restrict which allocations come back. The available ones include:
    • fields: a list containing one or more fields to be returned in the response. This can give you a lil performance boost because the other fields of the resource don't get refreshed ๐Ÿš€
  • limit โ€” asks the API for at most this many items back from the query. Cute little cap, use it. ๐Ÿ’…
    • marker โ€” the ID of the last-seen allocation. The move here is: do one limited request with limit, then take the ID of the last-seen allocation from that response and shove it in as the marker value of your next limited request. Paging, but make it fashion. โœจ
    • sort_dir โ€” sorts the response in whatever direction you asked for. Valid values are asc (ascending) or desc (descending), and the default is asc. You can pass multiple pairs of sort key + sort direction query parameters. If you skip the sort direction in a pair, the API just uses the natural sorting direction of the server attribute you gave as the sort_key. Slay.
    • sort_key โ€” sorts the response by this attribute's value. Default is id. Same deal: multiple pairs of sort key + sort direction are allowed, and if you leave out the sort direction in a pair, the API falls back to the natural sorting direction of that sort_key attribute. Periodt.

Returns

A generator of allocation instances. ๐ŸŽ


create_allocation(**attrs)

Makes a brand-new allocation out of attributes. Iconic behaviour.

Parameters

  • attrs โ€” keyword arguments that get used to create a Allocation <#openstack.baremetal.v1.allocation.Allocation>.

Returns The results of allocation creation. ๐ŸŒฑ


get_allocation(allocation, fields=None)

Grabs one specific allocation, bestie. Just the one.

Parameters

  • allocation โ€” the value can be the name or ID of an allocation, or a Allocation <#openstack.baremetal.v1.allocation.Allocation> instance.
  • fields โ€” limits which resource fields get fetched.

Returns One Allocation <#openstack.baremetal.v1.allocation.Allocation>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no allocation matching the name or ID could be found. ๐Ÿ˜ญ


update_allocation(allocation, **attrs)

Updates an allocation. Glow-up time. ๐Ÿ’–

Parameters

  • allocation โ€” the value can be the name or ID of an allocation, or a Allocation <#openstack.baremetal.v1.allocation.Allocation> instance.
  • attrs โ€” the attributes to update on the allocation represented by the allocation parameter.

Returns The updated allocation. โœจ


patch_allocation(allocation, patch)

Applies a JSON patch to the allocation. Surgical. Unbothered. ๐Ÿ’…

Parameters

  • allocation โ€” the value can be the name or ID of an allocation, or a Allocation <#openstack.baremetal.v1.allocation.Allocation> instance.
  • patch โ€” JSON patch to apply.

Returns The updated allocation.


delete_allocation(allocation, ignore_missing=True)

Deletes an allocation. Bye bye ๐Ÿ‘‹

Parameters

  • allocation โ€” the value can be the name or ID of an allocation, or a Allocation <#openstack.baremetal.v1.allocation.Allocation> instance.
  • ignore_missing โ€” when set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the allocation could not be found. When set to True, no exception will be raised when attempting to delete a non-existent allocation.

Returns The instance of the allocation which was deleted. ๐Ÿซถ


wait_for_allocation(allocation, timeout=None, ignore_error=False)

Waits for the allocation to become active. The "are we there yet" of methods. ๐Ÿ˜ญ

Parameters

  • allocation โ€” the value can be the name or ID of an allocation, or a Allocation <#openstack.baremetal.v1.allocation.Allocation> instance.
  • timeout โ€” how much (in seconds) to wait for the allocation. The value of None (the default) means no client-side timeout.
  • ignore_error โ€” if True, this call will raise an exception if the allocation reaches the error state. Otherwise the error state is considered successful and the call returns.

Returns The instance of the allocation.

Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if allocation fails and ignore_error is False.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> on timeout. โฐ


๐ŸŽ€ Volume Connector Operations ๐ŸŽ€

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Yes that's the whole signature. No we're not shortening it. She contains multitudes. ๐Ÿฆ‹


volume_connectors(details=False, **query)

Retrieves a generator of volume_connector. Generator girlies rise โœจ

Parameters

  • details โ€” a boolean indicating whether the detailed information for every volume_connector should be returned.
  • query โ€”

Optional query parameters to be sent to restrict the volume_connectors returned. Available parameters include:

  • fields: a list containing one or more fields to be returned in the response. This may lead to some performance gain because other fields of the resource are not refreshed. Speed. ๐ŸŽ๏ธ
  • limit: requests at most the specified number of volume_connector be returned from the query.
  • marker: specifies the ID of the last-seen volume_connector. Use the limit parameter to make an initial limited request and use the ID of the last-seen volume_connector from the response as the marker value in subsequent limited request.
  • node: only return the ones associated with this specific node (name or UUID), or an empty set if not found.
  • sort_dir: sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.
  • sort_key: sorts the response by the this attribute value. Default is id. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.

Returns A generator of volume_connector instances. ๐ŸŽ


create_volume_connector(**attrs)

Creates a new volume_connector from attributes. Fresh out the box, no cap.

Parameters attrs โ€” keyword arguments that will be used to create a VolumeConnector <#openstack.baremetal.v1.volume_connector.VolumeConnector>.

Returns The results of volume_connector creation. ๐ŸŒฑ


find_volume_connector(vc_id, ignore_missing=True, *, details=True)

Finds one single volume connector. Detective mode ๐Ÿ”

Parameters

  • vc_id โ€” the ID of a volume connector.
  • ignore_missing โ€” when set to False, an exception of NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the volume connector does not exist. When set to True, None will be returned when attempting to find a nonexistent volume connector.
  • details โ€” a boolean indicating whether the detailed information for the volume connector should be returned.

Returns One VolumeConnector object or None. ๐Ÿ™ˆ


get_volume_connector(volume_connector, fields=None)

Gets a specific volume_connector.

Parameters

  • volume_connector โ€” bestie you can hand it either the ID of a volume_connector or an actual VolumeConnector instance, whichever is closer ๐Ÿ’…
    • fields โ€” limit the resource fields to fetch, so it's giving less is more โœจ

Returns โ€” one single VolumeConnector object, cute and complete ๐ŸŽ€

Raises โ€” NotFoundException when no volume_connector matching the name or ID could be found ๐Ÿ˜ญ like, it looked everywhere and found nothing.

update_volume_connector(volume_connector, **attrs)

Update a volume_connector, glow-up edition ๐Ÿฆ‹

Parameters

  • volume_connector โ€” either the ID of a volume_connector or an instance of VolumeConnector ๐Ÿ’–
  • attrs โ€” the attributes to update on the volume_connector represented by the volume_connector parameter. yes, it says volume_connector twice, iykyk ๐ŸŒธ

Returns โ€” the updated volume_connector, freshly slayed โœจ

patch_volume_connector(volume_connector, patch)

Apply a JSON patch to the volume_connector โ€” like a targeted edit, not a whole rewrite ๐Ÿ”ฅ

Parameters

  • volume_connector โ€” the value can be the ID of a volume_connector or a VolumeConnector instance ๐Ÿ’œ
  • patch โ€” JSON patch to apply ๐Ÿฉน

Returns โ€” the updated volume_connector.

delete_volume_connector(volume_connector, ignore_missing=True)

Delete an volume_connector โ€” yeet it, respectfully ๐Ÿ’€

Parameters

  • volume_connector โ€” the value can be either the ID of a volume connector or a VolumeConnector instance ๐Ÿ‘‘
  • ignore_missing โ€” when set to False, an exception NotFoundException will be raised when the volume_connector could not be found. When set to True, no exception will be raised when attempting to delete a non-existent volume_connector โ€” it just shrugs and moves on ๐Ÿ™ˆ

Returns โ€” the instance of the volume_connector which was deleted.


โšก Volume Target Operations โšก

Okay so this is the same proxy class energy, just scoped to volume targets. Here's the whole signature, no cap:

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

volume_targets(details=False, **query)

Retrieve a generator of volume_target โ€” a generator, bestie, so it's lazy and iconic ๐Ÿ’…

Parameters

  • details โ€” a boolean indicating whether the detailed information for every volume_target should be returned ๐Ÿ”
  • query โ€” optional query parameters to be sent to restrict the volume_targets returned. Available parameters include:
    • fields: a list containing one or more fields to be returned in the response. This may lead to some performance gain because other fields of the resource are not refreshed. faster = slay โšก
    • limit: requests at most the specified number of volume_connector be returned from the query. (yes it literally says volume_connector here, I'm just the messenger ๐Ÿซถ)
    • marker: specifies the ID of the last-seen volume_target. Use the limit parameter to make an initial limited request and use the ID of the last-seen volume_target from the response as the marker value in subsequent limited request. pagination core ๐ŸŽ€
    • node: only return the ones associated with this specific node (name or UUID), or an empty set if not found.
    • sort_dir: sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.
    • sort_key: sorts the response by the this attribute value. Default is id. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.

Returns โ€” a generator of volume_target instances ๐ŸŒˆ

create_volume_target(**attrs)

Create a new volume_target from attributes โ€” build it from scratch, main character energy ๐Ÿ‘‘

Parameters

  • attrs โ€” keyword arguments that will be used to create a VolumeTarget โœจ

Returns โ€” the results of volume_target creation ๐Ÿ’–

find_volume_target(vt_id, ignore_missing=True, *, details=True)

Find a single volume target ๐Ÿ”Ž

Parameters

  • vt_id โ€” the ID of a volume target.
  • ignore_missing โ€” when set to False, an exception of NotFoundException will be raised when the volume connector does not exist. When set to True, None will be returned when attempting to find a nonexistent volume target. soft launch of a failure, honestly ๐Ÿ™ˆ
  • details โ€” a boolean indicating whether the detailed information for the volume target should be returned.

Returns โ€” one VolumeTarget object or None.

get_volume_target(volume_target, fields=None)

Get a specific volume_target โ€” just the one, focused, unbothered ๐Ÿฆ‹

Parameters

  • volume_target โ€” the value can be the ID of a volume_target or a VolumeTarget instance ๐Ÿ’œ
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one VolumeTarget โœจ

Raises โ€” NotFoundException when no volume_target matching the name or ID could be found ๐Ÿ˜ญ

update_volume_target(volume_target, **attrs)

Update a volume_target ๐Ÿ’…

Parameters

  • volume_target โ€” either the ID of a volume_target or an instance of VolumeTarget ๐ŸŽ€
  • attrs โ€” the attributes to update on the volume_target represented by the volume_target parameter.

Returns โ€” the updated volume_target.

patch_volume_target(volume_target, patch)

Apply a JSON patch to the volume_target โ€” surgical, precise, iconic ๐Ÿ”ฅ

Parameters

  • volume_target โ€” the value can be the ID of a volume_target or a VolumeTarget instance ๐Ÿ‘‘
  • patch โ€” JSON patch to apply.

Returns โ€” the updated volume_target.

delete_volume_target(volume_target, ignore_missing=True)

Delete an volume_target โ€” gone, bye, no notes ๐Ÿ’€

Parameters

  • volume_target โ€” the value can be either the ID of a volume target or a VolumeTarget instance ๐ŸŒธ
  • ignore_missing โ€” when set to False, an exception NotFoundException will be raised when the volume_target could not be found. When set to True, no exception will be raised when attempting to delete a non-existent volume_target. so forgiving fr fr ๐Ÿซถ

Returns โ€” the instance of the volume_target which was deleted.

๐ŸŒธ Deploy Template Operations ๐ŸŒธ

okay so first up, the deploy template squad ๐Ÿ’… here's the constructor you get for all of these:

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • deploy_templates(details=False, **query) โ€” Retrieve a generator of deploy_templates. bestie it's a generator, not a list, so don't be weird about it โœจ
    • details โ€” A boolean indicating whether the detailed information for every deploy_templates should be returned.
    • query โ€” Optional query parameters to be sent to restrict the deploy_templates to be returned.
    • Returns โ€” A generator of Deploy templates instances.
  • create_deploy_template(**attrs) โ€” Create a new deploy_template from attributes.
    • attrs โ€” Keyword arguments that will be used to create a DeployTemplate <#openstack.baremetal.v1.deploy_templates.DeployTemplate>.
    • Returns โ€” The results of deploy_template creation.
  • update_deploy_template(deploy_template, **attrs) โ€” Update a deploy_template. glow-up time ๐Ÿฆ‹
    • deploy_template โ€” Either the ID of a deploy_template, or an instance of DeployTemplate <#openstack.baremetal.v1.deploy_templates.DeployTemplate>.
    • attrs โ€” The attributes to update on the deploy_template represented by the deploy_template parameter.
    • Returns โ€” The updated deploy_template.
  • delete_deploy_template(deploy_template, ignore_missing=True) โ€” Delete a deploy_template. bye bestie ๐Ÿ‘‹
    • deploy_template โ€” The value can be either the ID of a deploy_template or a DeployTemplate <#openstack.baremetal.v1.deploy_templates.DeployTemplate> instance.
    • ignore_missing โ€” When set to False, an exception:class:~openstack.exceptions.NotFoundException will be raised when the deploy_template could not be found. When set to True, no exception will be raised when attempting to delete a non-existent deploy_template.
    • Returns โ€” The instance of the deploy_template which was deleted.
  • get_deploy_template(deploy_template, fields=None) โ€” Get a specific deployment template.
    • deploy_template โ€” The value can be the name or ID of a deployment template DeployTemplate <#openstack.baremetal.v1.deploy_templates.DeployTemplate> instance.
    • fields โ€” Limit the resource fields to fetch.
    • Returns โ€” One DeployTemplate <#openstack.baremetal.v1.deploy_templates.DeployTemplate>
    • Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no deployment template matching the name or ID could be found. ๐Ÿ˜ญ
  • patch_deploy_template(deploy_template, patch) โ€” Apply a JSON patch to the deploy_templates.
    • deploy_templates โ€” The value can be the ID of a deploy_template or a DeployTemplate <#openstack.baremetal.v1.deploy_templates.DeployTemplate> instance. (yep, the docs say deploy_templates in the bullet and deploy_template in the signature โ€” that's literally what's written, iykyk ๐Ÿ™ˆ)
    • patch โ€” JSON patch to apply.
    • Returns โ€” The updated deploy_template.

๐ŸŽ€ Runbook Operations ๐ŸŽ€

same constructor energy, new resource. runbooks, let's go ๐Ÿ”ฅ

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • runbooks(details=False, **query) โ€” Retrieve a generator of runbooks. again: generator โœจ
    • details โ€” A boolean indicating whether the detailed information for every runbook should be returned.
    • query โ€” Optional query parameters to be sent to restrict the runbooks to be returned.
    • Returns โ€” A generator of Runbooks instances.
  • create_runbook(**attrs) โ€” Create a new runbook from attributes.
    • attrs โ€” Keyword arguments that will be used to create a Runbook <#openstack.baremetal.v1.runbooks.Runbook>.
    • Returns โ€” The results of runbook creation.
  • update_runbook(runbook, **attrs) โ€” Update a runbook.
    • runbook โ€” Either the ID of a runbook, or an instance of Runbook <#openstack.baremetal.v1.runbooks.Runbook>.
    • attrs โ€” The attributes to update on the runbook represented by the runbook parameter.
    • Returns โ€” The updated runbook.
  • delete_runbook(runbook, ignore_missing=True) โ€” Delete a runbook. ๐Ÿ’€
    • runbook โ€” The value can be either the ID of a runbook or a Runbook <#openstack.baremetal.v1.runbooks.Runbook> instance.
    • ignore_missing โ€” When set to False, an exception:class:~openstack.exceptions.NotFoundException will be raised when the runbook could not be found. When set to True, no exception will be raised when attempting to delete a non-existent runbook.
    • Returns โ€” The instance of the runbook which was deleted.
  • get_runbook(runbook, fields=None) โ€” Get a specific runbook.
    • runbook โ€” The value can be the name or ID of a runbook Runbook <#openstack.baremetal.v1.runbooks.Runbook> instance.
    • fields โ€” Limit the resource fields to fetch.
    • Returns โ€” One Runbook <#openstack.baremetal.v1.runbooks.Runbook>
    • Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no runbook matching the name or ID could be found.
  • patch_runbook(runbook, patch) โ€” Apply a JSON patch to the runbook.
    • runbooks โ€” The value can be the ID of a runbook or a Runbook <#openstack.baremetal.v1.runbooks.Runbook> instance. (plural in the docs again, no cap โ€” copying faithfully ๐Ÿซถ)
    • patch โ€” JSON patch to apply.
    • Returns โ€” The updated runbook.

๐Ÿงš Runbook Trait Operations ๐Ÿงš

traits!! the accessory layer of your runbook, lowkey obsessed ๐ŸŒˆ

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • add_runbook_trait(runbook, trait) โ€” Add a trait to a runbook. accessorize bestie ๐Ÿ’…
    • runbook โ€” The value can be the ID of a runbook or a Runbook <#openstack.baremetal.v1.runbooks.Runbook> instance.
    • trait โ€” trait to add to the runbook.
    • Returns โ€” None
  • remove_runbook_trait(runbook, trait) โ€” Remove a trait from a runbook.
heads up: removing a trait the runbook does not have is a no-op on the server side. so like, it won't yell at you โœจ
  • runbook โ€” The value can be the ID of a runbook or a Runbook <#openstack.baremetal.v1.runbooks.Runbook> instance.
  • trait โ€” trait to remove from the runbook.
  • Returns โ€” None
  • set_runbook_traits(runbook, traits) โ€” Set traits for a runbook.
careful, bestie โ€” this removes any existing traits and adds the traits passed in to this method. Pass an empty list to remove all traits. it's giving clean slate ๐Ÿงน
  • runbook โ€” The value can be the ID of a runbook or a Runbook <#openstack.baremetal.v1.runbooks.Runbook> instance.
  • traits โ€” list of traits to set on the runbook. ๐Ÿ’…

Returns None


Inspection Rule Operations

okay bestie, inspection rules are up next and the proxy class is literally a whole mood โœจ look at all these kwargs, she's got options:

class openstack.baremetal.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

inspection_rules(details=False, **query)

Retrieve a generator of inspection rules. โœจ

Parameters

  • query โ€” Optional query parameters to be sent to restrict the inspection rules to be returned.

Returns A generator of InspectionRule instances.

create_inspection_rule(**attrs)

Create a new inspection rule from attributes. ๐ŸŽ€

Parameters

  • attrs โ€” Keyword arguments that will be used to create a InspectionRule <#openstack.baremetal.v1.inspection_rules.InspectionRule>.

Returns The results of inspection rule creation.

get_inspection_rule(inspection_rule, fields=None)

Get a specific inspection rule.

Parameters

  • inspection_rule โ€” The ID of an inspection rule InspectionRule <#openstack.baremetal.v1.inspection_rules.InspectionRule> instance.
  • fields โ€” Limit the resource fields to fetch.

Returns One InspectionRule <#openstack.baremetal.v1.inspection_rules.InspectionRule>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no inspection rule matching the ID could be found.

update_inspection_rule(inspection_rule, **attrs)

Update an inspection rule. ๐Ÿ’…

Parameters

  • inspection_rule โ€” Either the ID of an inspection rule or an instance of InspectionRule <#openstack.baremetal.v1.inspection_rules.InspectionRule>.
  • attrs โ€” The attributes to update on the inspection rule represented by the inspection_rule parameter.

Returns The updated inspection rule.

delete_inspection_rule(inspection_rule, ignore_missing=True)

Delete an inspection rule.

Parameters

  • inspection_rule โ€” The value can be either the ID of an inspection rule or a InspectionRule <#openstack.baremetal.v1.inspection_rules.InspectionRule> instance.
  • ignore_missing โ€” When set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the inspection rule could not be found. When set to True, no exception will be raised when attempting to delete a non-existent inspection rule.

Returns The instance of the inspection rule which was deleted.

patch_inspection_rule(inspection_rule, patch)

Apply a JSON patch to the inspection rule.

Parameters

  • inspection_rule โ€” The value can be the ID of a inspection_rule or a InspectionRule <#openstack.baremetal.v1.inspection_rules.InspectionRule> instance.
  • patch โ€” JSON patch to apply.

Returns The updated inspection rule.


Utilities

Building config drives

Helpers for building configdrive compatible with the Bare Metal service. ๐ŸŒธ


Baremetal Introspection API

The Baremetal Introspection Proxy

The baremetal introspection high-level interface is available through the baremetal_introspection member of a Connection <#openstack.connection.Connection> object. The baremetal_introspection member will only be added if the service is detected. ๐Ÿฆ‹

Introspection Process Operations

bestie this proxy class is back and she brought the same iconic signature:

class openstack.baremetal_introspection.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

introspections(**query)

Retrieve a generator of introspection records. ๐Ÿ‘‘

Parameters

  • query โ€” Optional query parameters to be sent to restrict the records to be returned. Available parameters include:
    • fields: A list containing one or more fields to be returned in the response. This may lead to some performance gain because other fields of the resource are not refreshed.
    • limit: Requests at most the specified number of items be returned from the query.
    • marker: Specifies the ID of the last-seen introspection. Use the limit parameter to make an initial limited request and use the ID of the last-seen introspection from the response as the marker value in a subsequent limited request.
    • sort_dir: Sorts the response by the requested sort direction. A valid value is asc (ascending) or desc (descending). Default is asc. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.
    • sort_key: Sorts the response by the this attribute value. Default is id. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the sort_key.

Returns A generator of Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> objects

start_introspection(node, manage_boot=None)

Create a new introspection from attributes. ๐Ÿ’–

Parameters

  • node โ€” The value can be either the name or ID of a node or a Node <#openstack.baremetal.v1.node.Node> instance.
  • manage_boot โ€” Whether to manage boot parameters for the node. Defaults to the server default (which is True).

Returns Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance.

get_introspection(introspection)

Get a specific introspection.

Parameters

  • introspection โ€” The value can be the name or ID of an introspection (matching bare metal node name or ID) or an Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance.

Returns Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no introspection matching the name or ID could be found.

get_introspection_data(introspection, processed=True)

Get introspection data. โœจ

Parameters

  • introspection โ€” The value can be the name or ID of an introspection (matching bare metal node name or ID) or an Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance.
  • processed โ€” Whether to fetch the final processed data (the default) or the raw unprocessed data as received from the ramdisk.

Returns introspection data from the most recent successful run.

abort_introspection(introspection, ignore_missing=True)

Abort an introspection.

Note that the introspection is not aborted immediately, you may use wait_for_introspection() with ignore_error=True.

Parameters

  • introspection โ€” The value can be the name or ID of an introspection (matching bare metal node name or ID) or an Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance.
  • ignore_missing โ€” when it's set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the introspection literally cannot be found. Set it to True and no exception gets raised when you try to abort an introspection that doesn't exist. Bestie behaviour honestly ๐Ÿ’…
  • Returns โ€” nothing. That's it. Nothing. ๐Ÿซ™

  • wait_for_introspection(introspection, timeout=None, ignore_error=False) โ€” wait for the introspection to finish, like waiting for your iced coffee to be ready but make it bare metal โ˜•โœจ
    • Parameters
      • introspection โ€” the value can be the name or ID of an introspection (matching bare metal node name or ID) or an Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance.
      • timeout โ€” how much (in seconds) to wait for the introspection. The value of None (the default) means no client-side timeout. So like, forever. No cap. โณ
      • ignore_error โ€” if True, this call will raise an exception if the introspection reaches the error state. Otherwise the error state is considered successful and the call returns. Yeah, read that twice, it's giving counterintuitive but we move ๐Ÿ™ˆ
    • Returns โ€” an Introspection <#openstack.baremetal_introspection.v1.introspection.Introspection> instance. ๐ŸŽ€
    • Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if introspection fails and ignore_error is False.
    • Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> on timeout. ๐Ÿ˜ญ

๐Ÿงฑ Block Storage API

For details on how to use block_storage, see Using OpenStack Block Storage <>. ๐Ÿ‘€

The BlockStorage Class

The block_storage high-level interface is available through the block_storage member of a Connection <#openstack.connection.Connection> object. The block_storage member will only be added if the service is detected โ€” so if it's not there, the service ghosted you, not our fault ๐Ÿซถ

๐Ÿ’พ Backup Operations

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • backups(details=True, **query) โ€” retrieve a generator of backups ๐ŸŒ€ like a little backup vending machine, one at a time
    • Parameters
      • details โ€” when set to False no additional details will be returned. The default, True, will cause objects with additional attributes to be returned. So True = the deluxe version, False = bare bones โœจ
      • query โ€” optional query parameters to be sent to limit the resources being returned:
        • offset: pagination marker
        • limit: pagination limit
        • sort_key: sorts by an attribute. A valid value is name, status, container_format, disk_format, size, id, created_at, or updated_at. Default is created_at. The API uses the natural sorting direction of the sort_key attribute value.
        • sort_dir: sorts by one or more sets of attribute and sort direction combinations. If you omit the sort direction in a set, default is desc.
    • Returns โ€” a generator of backup objects. ๐Ÿงบ
  • get_backup(backup) โ€” get a backup, singular, just the one, main character energy ๐Ÿ‘‘
    • Parameters
      • backup โ€” the value can be the ID of a backup or a Backup <#openstack.block_storage.v2.backup.Backup> instance.
    • Returns โ€” Backup instance.
  • find_backup(name_or_id, ignore_missing=True, *, details=True) โ€” find a single backup ๐Ÿ”
    • Parameters
      • snapshot โ€” the name or ID a backup. (Yes, the docs call it snapshot here while the signature says name_or_id. We don't make the rules, we just report them, iykyk ๐Ÿ’€)
      • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the backup does not exist.
      • details โ€” when set to False no additional details will be returned. The default, True, will cause objects with additional attributes to be returned.
    • Returns โ€” one Backup <#openstack.block_storage.v2.backup.Backup>.
    • Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.
    • Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. Two backups?? Two backups. Pick one, babe ๐Ÿ˜ญ
  • create_backup(**attrs) โ€” create a new Backup from attributes with native API ๐ŸŒฑ
    • Parameters
      • attrs โ€” keyword arguments which will be used to create a Backup <#openstack.block_storage.v2.backup.Backup> comprised of the properties on the Backup class.
    • Returns โ€” the results of Backup creation. It's giving new-phone-smell โœจ
  • delete_backup(backup, ignore_missing=True, force=False) โ€” delete a CloudBackup ๐Ÿ—‘๏ธ
    • Parameters
      • backup โ€” the value can be the ID of a backup or a Backup <#openstack.block_storage.v2.backup.Backup> instance
      • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone. (Yes, "zone" โ€” that's what it says. Copy-paste trauma is real ๐Ÿ’€)
      • force โ€” whether to try forcing backup deletion. Use with intent, bestie โš ๏ธ
    • Returns โ€” None
  • import_backup(service, url) โ€” create a new backup from an external service ๐Ÿ“ฅ
    • Parameters
      • service โ€” the service used to perform the backup.
      • url โ€” an identifier string to locate the backup.
    • Returns โ€” the imported backup ๐ŸŽ
  • export_backup(backup) โ€” export information about a backup ๐Ÿ“ค
    • Parameters
      • backup โ€” the value can be the ID of a backup or a Backup <#openstack.block_storage.v2.backup.Backup> instance.
    • Returns โ€” the backup export record fields.
  • restore_backup(backup, volume=None, name=None) โ€” restore a Backup to volume, the comeback arc we love to see ๐Ÿฆ‹
    • Parameters
      • backup โ€” the value can be the ID of a backup or a Backup <#openstack.block_storage.v2.backup.Backup> instance
      • volume โ€” an ID or Volume instance of the volume to restore the backup to.
      • name โ€” the name for new volume creation to restore.
    • Returns โ€” updated backup instance.
  • reset_backup_status(backup, status) โ€” reset status of the backup ๐Ÿ”„
    • Parameters
      • backup โ€” the value can be either the ID of a backup or a Backup <#openstack.block_storage.v2.backup.Backup> instance.
      • status โ€” new backup status.
    • Returns โ€” None

๐Ÿง  Capabilities Operations

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_capabilities(host) โ€” get a backend's capabilites ๐ŸŽ€ (that's how it's spelled here, one i short of greatness, but she still serves)
    • Parameters
      • host โ€” specified backend to obtain volume stats and properties.
    • Returns โ€” one :class: ~openstack.block_storage.v2.capabilites.Capabilities instance.
    • Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ‘ป

๐Ÿซ‚ Consistency Group Operations

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_consistency_group(consistency_group) โ€” grabs you exactly one consistency group, no more no less ๐Ÿ’…
    • consistency_group โ€” the value can be either the ID of a consistency group or a ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup> instance. Either one works, she's flexible like that โœจ
    • Returns: one ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup>.
  • find_consistency_group(name_or_id, ignore_missing=True, *, details=True) โ€” hunts down a single consistency group for you ๐Ÿ”
    • name_or_id โ€” the name or ID of a consistency group.
    • ignore_missing โ€” when set to False, ResourceNotFound <#openstack.exceptions.ResourceNotFound> will be raised when the consistency group does not exist. Default is True, so she just shrugs ๐Ÿ˜Œ
    • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
    • Returns: one ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup> or None.
    • Raises ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no resource can be found.
    • Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. (Yeah, more than one match is a whole situation ๐Ÿ˜ญ)
  • consistency_groups(*, details=True, **query) โ€” hands you back a generator of consistency groups, like a little queue of them ๐Ÿงš
    • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
    • query โ€” optional query parameters to be sent to limit the resources being returned:
      • limit: Returns a number of items up to the limit value.
      • offset: Used in conjunction with limit to return a slice of items. Specifies where to start in the list.
      • marker: The ID of the last-seen item.
      • sort_dir: Sorts the response in the requested order.
      • sort_key: Sorts the list of consistency groups by the specified attribute.
    • Returns: a generator of consistency group objects.
  • create_consistency_group(**attrs) โ€” builds you a brand new consistency group, periodt ๐ŸŽ€
    • attrs โ€” keyword arguments which will be used to create a ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup>, comprised of the properties on the ConsistencyGroup class.
    • Returns: the result of consistency group creation.
  • create_consistency_group_from_source(*, consistency_group_snapshot=None, consistency_group=None, name=None, description=None) โ€” makes a new consistency group from a source, iykyk ๐Ÿ”ฅ
    • consistency_group_snapshot โ€” the value can be either the ID of a consistency group snapshot or a ConsistencyGroupSnapshot <#openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot> instance. Either this or consistency_group must be provided. Pick one bestie, not neither ๐Ÿ™ˆ
    • consistency_group โ€” the value can be either the ID of a consistency group or a ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup> instance. Either this or consistency_group_snapshot must be provided.
    • name โ€” the name to assign to the new consistency group.
    • description โ€” the description to set on the new consistency group.
    • Returns: the result of consistency group creation.
  • delete_consistency_group(consistency_group, force=False) โ€” bye bye consistency group ๐Ÿ‘‹
    • consistency_group โ€” the value can be either the ID of a consistency group or a ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup> instance.
    • force โ€” when set to True, volumes in the consistency group will also be deleted when the consistency group is deleted. Like, the volumes go too. Be so sure before you flip this one ๐Ÿซถ
    • Returns: None
  • update_consistency_group(consistency_group, **attrs) โ€” updates a consistency group, glow-up edition โœจ
    • consistency_group โ€” the value can be either the ID of a consistency group or a ConsistencyGroup <#openstack.block_storage.v2.consistency_group.ConsistencyGroup> instance.
    • attrs โ€” the attributes to update on the consistency group represented by consistency_group. To add or remove volumes, pass add_volumes or remove_volumes as comma-separated lists of volume IDs. ๐Ÿ“
    • Returns: the updated consistency group.

๐Ÿฆ‹ Consistency Group Snapshot Operations ๐Ÿฆ‹

Hot girl class signature incoming, here's the whole Proxy joint, untouched, every parameter present and accounted for ๐Ÿ‘‘

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_consistency_group_snapshot(consistency_group_snapshot) โ€” gets you one consistency group snapshot ๐ŸŒธ
    • consistency_group_snapshot โ€” the value can be either the ID of a consistency group snapshot or a ConsistencyGroupSnapshot <#openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot> instance.
    • Returns: one ConsistencyGroupSnapshot <#openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot>
  • find_consistency_group_snapshot(name_or_id, ignore_missing=True, *, details=True) โ€” finds a single consistency group snapshot, lowkey detective mode ๐Ÿ•ต๏ธโ€โ™€๏ธ
    • name_or_id โ€” the name or ID of a consistency group snapshot.
    • ignore_missing โ€” when set to False, ResourceNotFound <#openstack.exceptions.ResourceNotFound> will be raised when the consistency group snapshot does not exist.
    • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
    • Returns: one ConsistencyGroupSnapshot <#openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot> or None.
    • Raises ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no resource can be found.
    • Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.
  • consistency_group_snapshots(*, details=True, **query) โ€” generator of consistency group snapshots, come get your snacks ๐Ÿ“
    • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
    • query โ€” optional query parameters to be sent to limit the resources being returned:
      • limit: Returns a number of items up to the limit value.
      • offset: Used in conjunction with limit to return a slice of items. Specifies where to start in the list.
      • marker: The ID of the last-seen item.
    • Returns: a generator of consistency group snapshot objects.
  • create_consistency_group_snapshot(**attrs) โ€” makes a fresh consistency group snapshot ๐Ÿ’–
    • attrs โ€” keyword arguments which will be used to create a ConsistencyGroupSnapshot <#openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot>, comprised of the properties on the ConsistencyGroupSnapshot class. The consistencygroup_id attribute is required โ€” don't forget it, bestie, fr fr โš ๏ธ
    • Returns: the result of consistency group snapshot creation.
  • delete_consistency_group_snapshot(consistency_group_snapshot, ignore_missing=True) โ€” deletes a consistency group snapshot ๐Ÿ’€
    • Parameters
  • consistency_group_snapshot โ€” fr you can pass either the ID of a consistency group snapshot or an actual ConsistencyGroupSnapshot instance (that's openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot if you're being formal ๐Ÿ’…).
  • ignore_missing โ€” okay so when you set this to False, it's gonna raise ResourceNotFound (openstack.exceptions.ResourceNotFound) the moment the consistency group snapshot doesn't exist. Set it True and it justโ€ฆ doesn't. Chill.

Returns

None. That's it. Nothing to see here bestie โœจ


๐Ÿฆ‹ Extension Operations ๐Ÿฆ‹

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

extensions()

Returns a generator of extensions ๐ŸŽ€ (yes, it literally returns "A generator of extension" โ€” that's the documented return, no cap).

Returns

A generator of extension.


๐Ÿ’œ Limits Operations ๐Ÿ’œ

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_limits(project=None)

Retrieves limits. Slay, get your ceilings ๐Ÿ‘‘

Parameters

  • project โ€” a project to get limits for. You can pass either the ID of a project or a Project instance.

Returns

A Limits object, and it's giving both AbsoluteLimit (openstack.block_storage.v2.limits.AbsoluteLimit) and RateLimit (openstack.block_storage.v2.limits.RateLimit) ๐Ÿ’–


๐ŸŒŸ QoSSpec Operations ๐ŸŒŸ

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_qos_spec(**attrs)

Create a new QoS Spec out of attributes. Main character creation moment โœจ

Parameters

  • attrs โ€” keyword arguments used to create a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec), and they're comprised of the properties on the QoSSpec class.

Returns

The results of a QoS spec creation.

Return type

QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec)

delete_qos_spec(qos_spec, ignore_missing=True, *, force=False)

Delete a QoS Spec. Bye bestie ๐Ÿ‘‹

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.
  • ignore_missing โ€” when set to False, ResourceNotFound (openstack.exceptions.ResourceNotFound) gets raised when the type does not exist. When set to True, no exception is set when attempting to delete a nonexistent type.
  • force โ€” whether to delete the QoS spec even if it's in use. โš ๏ธ Yes, even if it's in use. Be so serious rn.

Returns

None

update_qos_spec(qos_spec, **attrs)

Update a QoS spec. Glow-up time ๐Ÿ’…

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.
  • attrs (dict) โ€” the attributes to update on the QoS spec.

Returns

The updated QoS spec.

Return type

QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec)

get_qos_spec(qos_spec)

Get a single QoS spec. Just one. The chosen one ๐Ÿซถ

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.

Returns

One QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec)

Raises ResourceNotFound (openstack.exceptions.ResourceNotFound) when no resource can be found. ๐Ÿ˜ญ

find_qos_spec(name_or_id, ignore_missing=True, **query)

Find a single QoS spec. Detective era ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a QoS spec.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) gets raised when the resource does not exist. When set to True, None is returned when attempting to find a nonexistent resource.
  • query โ€” additional attributes like 'host'.

Returns

One: class:~openstack.block_storage.v2.qos_spec.QoSSpec or None

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

Raises DuplicateResource (openstack.exceptions.DuplicateResource) when multiple resources are found. ๐Ÿ’€ yeah, more than one match and it's over.

qos_specs(**query)

Return a generator of QoS specs. The whole squad ๐ŸŒˆ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of QoSSpec objects.

associate_qos_spec(qos_spec, vol_type_id)

Associate a QoS spec with a volume type. Matching them up, iykyk ๐ŸŽ€

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.
  • vol_type_id โ€” the ID of the volume type to associate with.

Returns

None

disassociate_qos_spec(qos_spec, vol_type_id)

Disassociate a QoS spec from a volume type. Irreconcilable differences ๐Ÿ’”

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.
  • vol_type_id โ€” the ID of the volume type to disassociate from.

Returns

None

disassociate_all_qos_spec(qos_spec)

Disassociate a QoS spec from all volume types. Blocking everyone, periodt ๐Ÿšซ

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.

Returns

None

delete_qos_spec_metadata(qos_spec, keys)

Delete metadata from a QoS spec. Decluttering ๐Ÿงนโœจ

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.
  • keys โ€” the keys to delete from the QoS spec.

Returns

None

qos_spec_associations(qos_spec)

Return a generator of associations for a QoS spec. Who's linked with who ๐Ÿ‘€

Parameters

  • qos_spec โ€” either the ID of a QoS spec or a QoSSpec (openstack.block_storage.v2.qos_spec.QoSSpec) instance.

Returns

A generator of QoSSpecAssociation (openstack.block_storage.v2.qos_spec.QoSSpecAssociation) objects.


โญ QuotaClassSet Operations โญ

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_quota_class_set(quota_class_set='default') โ€” grab a single quota class set โœจ

Literally only one quota class is allowed here, bestie: default. That's it. That's the whole list.

Parameters

  • quota_class_set โ€” can be the ID of a quota class set (and again: only default is supported) or a QuotaClassSet <#openstack.block_storage.v2.quota_class_set.QuotaClassSet> instance.

Returns โ€” one QuotaClassSet <#openstack.block_storage.v2.quota_class_set.QuotaClassSet> ๐Ÿ’–

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • update_quota_class_set(quota_class_set, **attrs) โ€” update a QuotaClassSet ๐ŸŽ€

Again โ€” only one quota class permitted, default. No cap.

Parameters

  • quota_class_set โ€” either the ID of a quota class set (only default is supported) or a QuotaClassSet <#openstack.block_storage.v2.quota_class_set.QuotaClassSet> instance.
  • attrs โ€” the attributes to update on the QuotaClassSet represented by quota_class_set.

Returns โ€” the updated QuotaSet


๐ŸŒธ QuotaSet Operations ๐ŸŒธ

class openstack.block_storage.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • get_quota_set(project, usage=False, **query) โ€” show QuotaSet info for the project ๐Ÿ‘‘

Parameters

  • project โ€” ID or instance of Project of the project for which the quota should be retrieved
  • usage โ€” when set to True, quota usage and reservations would be filled. (yes please, give us the receipts ๐Ÿงพ)
  • query โ€” additional query parameters to use.

Returns โ€” one QuotaSet <#openstack.block_storage.v2.quota_set.QuotaSet>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • get_quota_set_defaults(project) โ€” show QuotaSet defaults for the project โœจ

Parameters

  • project โ€” ID or instance of Project of the project for which the quota should be retrieved

Returns โ€” one QuotaSet <#openstack.block_storage.v2.quota_set.QuotaSet>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • revert_quota_set(project, **query) โ€” reset quota for the project/user ๐Ÿ”„

Parameters

  • project โ€” ID or instance of Project of the project for which the quota should be resetted. (their spelling, not mine, ily ๐Ÿ’…)
  • query โ€” additional parameters to be used.

Returns โ€” None

  • update_quota_set(project, **attrs) โ€” update a QuotaSet ๐Ÿฆ‹

Parameters

  • project โ€” ID or instance of Project of the project for which the quota should be reset.
  • attrs โ€” the attributes to update on the QuotaSet represented by quota_set.

Returns โ€” the updated QuotaSet


๐Ÿ”ฅ Service Operations ๐Ÿ”ฅ

class openstack.block_storage.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • find_service(name_or_id, ignore_missing=True, **query) โ€” find a single service ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a service
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” additional attributes like 'host'

Returns โ€” one: class:~openstack.block_storage.v2.service.Service or None

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises โ€” DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

  • services(**query) โ€” return a generator of service ๐ŸŒ€

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of Service objects

  • enable_service(service) โ€” enable a service ๐Ÿ’š

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v2.service.Service> instance.

Returns โ€” updated service instance

  • disable_service(service, *, reason=None) โ€” disable a service ๐Ÿ’€

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v2.service.Service> instance
  • reason โ€” the reason to disable a service

Returns โ€” updated service instance

  • thaw_service(service) โ€” thaw a service ๐ŸŒค๏ธ

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v2.service.Service> instance

Returns โ€” updated service instance

  • freeze_service(service) โ€” freeze a service ๐ŸงŠ

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v2.service.Service> instance

Returns โ€” updated service instance

  • failover_service(service, *, backend_id=None) โ€” failover a service ๐Ÿšจ

Only applies to replicating cinder-volume services. (iykyk โ€” this one's niche and we respect it)

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v2.service.Service> instance

Returns โ€” updated service instance


๐Ÿฆ‹ Snapshot Operations ๐Ÿฆ‹

class openstack.block_storage.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • get_snapshot(snapshot) โ€” get a single snapshot ๐Ÿ“ธ

Parameters

  • snapshot โ€” the value can be the ID of a snapshot or a Snapshot <#openstack.block_storage.v2.snapshot.Snapshot> instance.

Returns โ€” one Snapshot <#openstack.block_storage.v2.snapshot.Snapshot>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • find_snapshot(name_or_id, ignore_missing=True, *, details=True, all_projects=False) โ€” find a single snapshot ๐Ÿ”Ž

Parameters

  • snapshot โ€” the name or ID a snapshot
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the snapshot does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • details โ€” when set to False, an Snapshot <#openstack.block_storage.v2.snapshot.Snapshot> object will be returned. The default, True, will cause an SnapshotDetail <#openstack.block_storage.v2.snapshot.SnapshotDetail> object to be returned.
  • all_projects โ€” when you set this to True, it searches for the snapshot by name across all projects. Heads up though: this lowkey makes duplicates way more likely. Admin-only by default, no cap. ๐Ÿ”

Returns ๐Ÿ’ซ

One Snapshot (openstack.block_storage.v2.snapshot.Snapshot), one SnapshotDetail (openstack.block_storage.v2.snapshot.SnapshotDetail) object, or None. That's it, that's the whole menu.

Raises ๐Ÿ˜ญ

Raises NotFoundException (openstack.exceptions.NotFoundException) when literally no resource can be found โ€” like, nothing there bestie.

Raises DuplicateResource (openstack.exceptions.DuplicateResource) when it finds multiple resources. Too many options, honestly relatable. ๐Ÿ’€


snapshots(*, details=True, all_projects=False, **query) โ€” retrieve a generator of snapshots โœจ

Parameters ๐ŸŽ€

  • details โ€” set it to False and you get plain Snapshot (openstack.block_storage.v2.snapshot.Snapshot) objects back. The default, True, gives you SnapshotDetail (openstack.block_storage.v2.snapshot.SnapshotDetail) objects instead. Fancy version unlocked by default, periodt. ๐Ÿ‘‘
  • all_projects โ€” set to True and it lists snapshots from all projects. Admin-only by default. ๐Ÿ’…
  • query โ€” optional query params you can send to narrow down which snapshots come back. The available ones are:
    • name: name of the snapshot, as a string.
    • volume_id: volume id of a snapshot.
    • status: the snapshot's status value, so you can filter on "available" for example. iykyk.

Returns ๐Ÿ’ซ

A generator of snapshot objects. A whole little stream of them. ๐ŸŒŠ


create_snapshot(**attrs) โ€” make a brand new snapshot out of attributes ๐ŸŒธ

Parameters ๐ŸŽ€

  • attrs โ€” keyword arguments that get used to create a Snapshot (openstack.block_storage.v2.snapshot.Snapshot), made up of the properties on the Snapshot class. Basically you're handing it the whole vibe. ๐Ÿ’–

Returns ๐Ÿ’ซ

The results of snapshot creation. Fresh out the oven. ๐Ÿ”ฅ


update_snapshot(snapshot, **attrs) โ€” update a snapshot ๐Ÿฆ‹

Parameters ๐ŸŽ€

  • snapshot โ€” either the ID of a snapshot or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot) instance. ID or object, dealer's choice. โœจ
  • attrs โ€” the attributes you want to update on the snapshot.

Returns ๐Ÿ’ซ

The updated snapshot. Glow-up complete. ๐Ÿ’…


delete_snapshot(snapshot, ignore_missing=True, force=False) โ€” delete a snapshot ๐Ÿ—‘๏ธ

Parameters ๐ŸŽ€

  • snapshot โ€” the value can be either the ID of a snapshot or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) gets raised when the snapshot doesn't exist. When set to True, no exception is set when you attempt to delete a nonexistent snapshot. It just kinda shrugs. ๐Ÿ™ˆ
  • force โ€” whether to try forcing snapshot deletion. Forceful. ๐Ÿ’€

Returns ๐Ÿ’ซ

None. That's it. Bye bestie. ๐Ÿซถ


reset_snapshot_status(snapshot, status) โ€” reset the status of the snapshot ๐Ÿ”„

Parameters ๐ŸŽ€

  • snapshot โ€” the value can be either the ID of a backup or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot) instance. (Yep, it says "backup" up there in the original โ€” quoting it exactly, don't come for me. ๐Ÿ’€)
  • status โ€” the new snapshot status.

Returns ๐Ÿ’ซ

None.


manage_snapshot(**attrs) โ€” creates a snapshot by using existing storage rather than allocating new storage. Sustainable queen behaviour, we love to see it. ๐ŸŒฑ๐Ÿ‘‘

Parameters ๐ŸŽ€

  • attrs โ€” keyword arguments used to create a Snapshot (openstack.block_storage.v2.snapshot.Snapshot), comprised of the properties on the Snapshot class.

Returns ๐Ÿ’ซ

The results of snapshot creation.


unmanage_snapshot(snapshot) โ€” unmanage a snapshot from block storage provisioning ๐Ÿช„

Parameters ๐ŸŽ€

  • snapshot โ€” either the ID of a snapshot or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot).

Returns ๐Ÿ’ซ

None.


fetch_snapshot_metadata(snapshot) โ€” return a dictionary of metadata for a snapshot ๐Ÿ“–

Parameters ๐ŸŽ€

  • snapshot โ€” either the ID of a snapshot or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot).

Returns ๐Ÿ’ซ

A Snapshot (openstack.block_storage.v2.snapshot.Snapshot) carrying the snapshot's metadata. All keys and values are Unicode text. ๐ŸŽ€


get_snapshot_metadata(snapshot) โ€” return a dictionary of metadata for a snapshot ๐Ÿ“–

โš ๏ธ Deprecated since version 4.14.0: use fetch_snapshot_metadata() instead. She's retired, don't @ her. ๐Ÿ’€

set_snapshot_metadata(snapshot, **metadata) โ€” update metadata for a snapshot โœ๏ธ

Parameters ๐ŸŽ€

  • snapshot โ€” either the ID of a snapshot or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot).
  • metadata โ€” key/value pairs to be updated in the snapshot's metadata. No other metadata is modified by this call โ€” everything else stays untouched, we respect boundaries here. ๐Ÿ’… All keys and values are stored as Unicode.

Returns ๐Ÿ’ซ

A Snapshot (openstack.block_storage.v2.snapshot.Snapshot) with the snapshot's metadata. All keys and values are Unicode text.


delete_snapshot_metadata(snapshot, keys=None) โ€” delete metadata for a snapshot ๐Ÿงน

Parameters ๐ŸŽ€

  • snapshot โ€” either the ID of a snapshot or a Snapshot (openstack.block_storage.v2.snapshot.Snapshot).
  • keys โ€” the keys to delete. If you omit it, all metadata is removed. Scorched earth, no survivors. ๐Ÿ”ฅ

Returns ๐Ÿ’ซ

None.


๐Ÿ“Š Stats Operations ๐Ÿ“Š

Our girlypop proxy class, in all her glory:

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

backend_pools(**query) โ€” returns a generator of cinder Back-end storage pools ๐ŸŠโ€โ™€๏ธ

Parameters ๐ŸŽ€

  • query โ€” optional query parameters to send along to limit the resources being returned.

:returns A generator of cinder Back-end storage pools objects. So many pools. ๐ŸŒŠ


๐Ÿ” Transfer Operations ๐Ÿ”

Same iconic proxy signature, copy-pasted by the universe:

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_transfer(**attrs) โ€” create a new Transfer record ๐Ÿšš

Parameters ๐ŸŽ€

  • volume_id โ€” the value is the ID of the volume.
  • name โ€” the value is the name of the transfer.
  • attrs โ€” keyword arguments used to create a Transfer (openstack.block_storage.v2.transfer.Transfer) comprised of the properties on the Transfer class.

Returns ๐Ÿ’ซ

The results of Transfer creation.


delete_transfer(transfer, ignore_missing=True) โ€” delete a volume transfer ๐Ÿ—‘๏ธ

Parameters ๐ŸŽ€

  • transfer โ€” the value can be either the ID of a transfer or a Transfer instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) gets raised when the transfer doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent transfer. Chill mode: activated. ๐Ÿ˜Œ

Returns ๐Ÿ’ซ

None.


find_transfer(name_or_id, ignore_missing=True) โ€” find a single transfer ๐Ÿ”

Parameters ๐ŸŽ€

  • name_or_id โ€” the name or ID of a transfer.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the volume transfer does not exist.

Returns โ€” One Transfer <#openstack.block_storage.v2.transfer.Transfer> ๐Ÿ’–

Raises

  • NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.
  • DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. ๐Ÿ˜ญ

get_transfer(transfer) โœจ

Get a single transfer.

Parameters

  • transfer โ€” The value can be the ID of a transfer or a Transfer <#openstack.block_storage.v2.transfer.Transfer> instance.

Returns โ€” One Transfer <#openstack.block_storage.v2.transfer.Transfer>.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

transfers(*, details=True, all_projects=False, **query) ๐Ÿฆ‹

Retrieve a generator of transfers.

Parameters

  • details โ€” When set to False no extended attributes will be returned. The default, True, will cause objects with additional attributes to be returned.
  • all_projects โ€” When set to True, list transfers from all projects. Admin-only by default.
  • query โ€” Optional query parameters to be sent to limit the transfers being returned.

Returns โ€” A generator of transfer objects.

accept_transfer(transfer, auth_key) ๐ŸŽ€

Accept a Transfer.

Parameters

  • transfer โ€” The value can be the ID of a transfer or a Transfer <#openstack.block_storage.v2.transfer.Transfer> instance.
  • auth_key โ€” The key to authenticate volume transfer.

Returns โ€” The results of Transfer creation.

Type Operations ๐Ÿ‘‘

Meet the proxy class โ€” signature copied exactly, no cap:

class openstack.block_storage.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_type(type) ๐ŸŒธ

Get a single type.

Parameters

  • type โ€” The value can be the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.

Returns โ€” One Type <#openstack.block_storage.v2.type.Type>.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

find_type(name_or_id, ignore_missing=True) ๐Ÿ’…

Find a single volume type.

Parameters

  • snapshot โ€” The name or ID a volume type. (Yes, the signature says name_or_id and this bullet says snapshot โ€” keep both in your brain, bestie. ๐Ÿ˜ญ)
  • ignore_missing โ€” When set to False ResourceNotFound <#openstack.exceptions.ResourceNotFound> will be raised when the volume type does not exist.

Returns โ€” One Type <#openstack.block_storage.v2.type.Type>.

Raises

  • ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no resource can be found.
  • DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

types(**query) ๐Ÿฆ‹

Retrieve a generator of volume types.

Returns โ€” A generator of volume type objects.

create_type(**attrs) โœจ

Create a new type from attributes.

Parameters

  • attrs โ€” Keyword arguments which will be used to create a Type <#openstack.block_storage.v2.type.Type>, comprised of the properties on the Type class.

Returns โ€” The results of type creation.

delete_type(type, ignore_missing=True) ๐ŸŽ€

Delete a type.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the type does not exist. When set to True, no exception will be set when attempting to delete a nonexistent type.

Returns โ€” None.

update_type(type, **attrs) ๐Ÿ”ฅ

Update a type.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • attrs โ€” The attributes to update on the type.

Returns โ€” The updated type.

update_type_extra_specs(type, **attrs) ๐ŸŒˆ

Update the extra_specs for a type.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • attrs โ€” The extra spec attributes to update on the type.

Returns โ€” A dict containing updated extra_specs.

delete_type_extra_specs(type, keys) ๐Ÿ’€

Delete the extra_specs for a type.

Note: This method will do a HTTP DELETE request for every key in keys.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • keys โ€” The keys to delete.

Returns โ€” None.

get_type_access(type) ๐Ÿ”‘

Lists project IDs that have access to private volume type.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.

Returns โ€” List of dictionaries describing projects that have access to the specified type.

add_type_access(type, project) ๐Ÿซถ

Adds private volume type access to a project.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • project โ€” An ID or Project instance of the project to add access for.

Returns โ€” None.

remove_type_access(type, project) ๐Ÿ™ˆ

Remove private volume type access from a project.

Parameters

  • type โ€” The value can be either the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • project โ€” An ID or Project instance of the project to remove access for.

Returns โ€” None.

get_type_encryption(volume_type) ๐Ÿงš

Get the encryption details of a volume type.

Parameters

  • volume_type โ€” The value can be the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.

Returns โ€” One TypeEncryption.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

create_type_encryption(volume_type, **attrs) ๐Ÿ’œ

Create new type encryption from attributes.

Parameters

  • volume_type โ€” The value can be the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • attrs โ€” Keyword arguments which will be used to create a TypeEncryption, comprised of the properties on the TypeEncryption class.

Returns โ€” The results of type encryption creation.

delete_type_encryption(encryption=None, volume_type=None, ignore_missing=True) ๐Ÿ“

Delete type encryption attributes.

Parameters

  • encryption โ€” The value can be None or a TypeEncryption instance. If encryption is None then volume_type must be specified.
  • volume_type โ€” The value can be the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance. Required if encryption is None.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the type does not exist. When set to True, no exception will be set when attempting to delete a nonexistent type.

Returns โ€” None.

update_type_encryption(encryption=None, volume_type=None, **attrs) ๐ŸŒŸ

Update a type.

Parameters

  • encryption โ€” The value can be None or a TypeEncryption instance. If this is None then volume_type must be specified.
  • volume_type โ€” The value can be the ID of a type or a Type <#openstack.block_storage.v2.type.Type> instance. Required if encryption is None.
  • attrs โ€” The attributes to update on the type encryption.

Returns โ€” the updated type encryption โœจ


๐Ÿ’พ Volume Operations ๐Ÿ’พ

Okay bestie, this is the volume proxy class. Hereโ€™s the constructor signature, copied exactly, no edits, no cap:

class openstack.block_storage.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_volume(volume)

Get a single volume ๐Ÿ‘‘.

Parameters

  • volume โ€” The value can be the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.

Returns โ€” One Volume <#openstack.block_storage.v2.volume.Volume> ๐Ÿ’–

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

find_volume(name_or_id, ignore_missing=True, *, details=True, all_projects=False)

Find a single volume ๐Ÿฆ‹.

Parameters

  • volume โ€” The name or ID a volume.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the volume does not exist.
  • details โ€” When set to False, no extended attributes will be returned. The default, True, will cause an object with additional attributes to be returned.
  • all_projects โ€” When set to True, search for volume by name across all projects. Note that this will likely result in a higher chance of duplicates. Admin-only by default.

Returns โ€” One Volume <#openstack.block_storage.v2.volume.Volume> or None.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises โ€” DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

volumes(*, details=True, all_projects=False, **query)

Retrieve a generator of volumes ๐ŸŒธ.

Parameters

  • details โ€” When set to False, no extended attributes will be returned. The default, True, will cause objects with additional attributes to be returned.
  • all_projects โ€” When set to True, list volumes from all projects. Admin-only by default.
  • query โ€” Optional query parameters to be sent to limit the volumes being returned. Available parameters include:
    • name: Name of the volume as a string.
    • status: Value of the status of the volume so that you can filter on "available" for example.

Returns โ€” A generator of volume objects.

create_volume(**attrs)

Create a new volume from attributes ๐ŸŽ€.

Parameters

  • attrs โ€” Keyword arguments which will be used to create a Volume <#openstack.block_storage.v2.volume.Volume>, comprised of the properties on the Volume class.

Returns โ€” The results of volume creation.

update_volume(volume, **attrs)

Update a volume ๐Ÿ’….

Parameters

  • volume โ€” Either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • attrs โ€” The attributes to update on the volume.

Returns โ€” The updated volume.

delete_volume(volume, ignore_missing=True, *, force=False, cascade=False)

Delete a volume ๐Ÿ˜ญ.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the volume does not exist. When set to True, no exception will be set when attempting to delete a nonexistent volume.
  • force โ€” Whether to try forcing volume deletion.
  • cascade โ€” Whether to remove any snapshots along with the volume.

Returns โ€” None.

extend_volume(volume, size)

Extend a volume ๐Ÿ”ฅ.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • size โ€” New volume size.

Returns โ€” None.

set_volume_readonly(volume, readonly=True)

Set a volumeโ€™s read-only flag ๐Ÿซถ.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • readonly โ€” Whether the volume should be a read-only volume or not.

Returns โ€” None.

retype_volume(volume, new_type, migration_policy='never')

Retype the volume ๐ŸŒˆ.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • new_type โ€” The new volume type that volume is changed with. The value can be either the ID of the volume type or a Type <#openstack.block_storage.v2.type.Type> instance.
  • migration_policy โ€” Specify if the volume should be migrated when it is re-typed. Possible values are on-demand or never. Default: never.

Returns โ€” None.

set_volume_bootable_status(volume, bootable)

Set bootable status of the volume โญ.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • bootable โ€” Specifies whether the volume should be bootable or not.

Returns โ€” None.

set_volume_image_metadata(volume, **metadata)

Update image metadata for a volume ๐Ÿฆ‹.

Parameters

  • volume โ€” Either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume>.
  • metadata โ€” Key/value pairs to be updated in the volumeโ€™s image metadata. No other metadata is modified by this call.

Returns โ€” None.

delete_volume_image_metadata(volume, keys=None)

Delete metadata for a volume ๐Ÿงš.

Parameters

  • volume โ€” Either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume>.
  • keys โ€” The keys to delete. If omitted, all metadata is removed.

Returns โ€” None.

reset_volume_status(volume, status=None, attach_status=None, migration_status=None)

Reset volume statuses ๐Ÿ’€.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • status โ€” The new volume status.
  • attach_status โ€” The new volume attach status.
  • migration_status โ€” The new volume migration status (admin only).

Returns โ€” None.

attach_volume(volume, mountpoint, instance=None, host_name=None)

Attaches a volume to a server ๐Ÿ”—.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • mountpoint โ€” The attaching mount point.
  • instance โ€” The UUID of the attaching instance.
  • host_name โ€” The name of the attaching host.

Returns โ€” None.

detach_volume(volume, attachment, force=False, connector=None)

Detaches a volume from a server ๐Ÿซถ.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • attachment โ€” The ID of the attachment.
  • force โ€” Whether to force volume detach (Rolls back an unsuccessful detach operation after you disconnect the volume.)
  • connector โ€” The connector object.

Returns โ€” None


unmanage_volume(volume)

This one removes a volume from Block Storage management without removing the back-end storage object thatโ€™s associated with it. Bestie, itโ€™s giving โ€œbreak up but keep the shared Netflix passwordโ€ ๐Ÿ’…

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.

Returns โ€” None


migrate_volume(volume, host=None, force_host_copy=False, lock_volume=False)

Migrates a volume to the specified host. Moving day for your volume โœจ

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • host โ€” The target host for the volume migration. Host format is <host@backend>.
  • force_host_copy โ€” If false (the default), rely on the volume backend driver to perform the migration, which might be optimized. If true, or the volume driver fails to migrate the volume itself, a generic host-based migration is performed.
  • lock_volume โ€” If true, migrating an available volume will change its status to maintenance preventing other operations from being performed on the volume such as attach, detach, retype, etc.

Returns โ€” None


complete_volume_migration(volume, new_volume, error=False)

Complete the migration of a volume. The final โ€œweโ€™re hereโ€ moment ๐ŸŽ€

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume> instance.
  • new_volume โ€” The UUID of the new volume.
  • error โ€” Used to indicate if an error has occurred elsewhere that requires clean up.

Returns โ€” None


upload_volume_to_image(volume, image_name, force=False, disk_format=None, container_format=None)

Uploads the specified volume to image service. Glow-up arc: volume edition ๐Ÿ”ฅ

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v3.volume.Volume> instance.
  • image_name โ€” The name for the new image.
  • force โ€” Enables or disables upload of a volume that is attached to an instance.
  • disk_format โ€” Disk format for the new image.
  • container_format โ€” Container format for the new image.

Returns โ€” dictionary describing the image.


fetch_volume_metadata(volume)

Return a dictionary of metadata for a volume. All the little deets ๐Ÿ’–

Parameters

  • volume โ€” Either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume>.

Returns โ€” A Volume <#openstack.block_storage.v2.volume.Volume> with the volume's metadata. All keys and values are Unicode text.


get_volume_metadata(volume)

Return a dictionary of metadata for a volume

Deprecated since version 4.14.0: Use fetch_volume_metadata() instead. Sheโ€™s retired, bestie โ€” still iconic, but retired ๐Ÿ’…

set_volume_metadata(volume, **metadata)

Update metadata for a volume. Giving your volume a little labels refresh โœจ

Parameters

  • volume โ€” Either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume>.
  • metadata โ€” Key/value pairs to be updated in the volume's metadata. No other metadata is modified by this call. All keys and values are stored as Unicode.

Returns โ€” A Volume <#openstack.block_storage.v2.volume.Volume> with the volume's metadata. All keys and values are Unicode text.


delete_volume_metadata(volume, keys=None)

Delete metadata for a volume. Clean sweep, no crumbs ๐Ÿงน

Parameters

  • volume โ€” Either the ID of a volume or a Volume <#openstack.block_storage.v2.volume.Volume>.
  • keys โ€” The keys to delete. If omitted, all metadata is removed.

Returns โ€” None


โœจ Helpers โœจ

class openstack.block_storage.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

wait_for_status(res, status='available', failures=None, interval=2, wait=None, attribute='status', callback=None)

Wait for the resource to be in a particular status. Itโ€™s the โ€œare we there yetโ€ of API calls ๐Ÿ˜ญ

Parameters

  • session โ€” The session to use for making this request.
  • resource โ€” The resource to wait on to reach the status. The resource must have a status attribute specified via attribute.
  • status โ€” Desired status of the resource.
  • failures โ€” Statuses that would indicate the transition failed such as 'ERROR'. Defaults to ['ERROR'].
  • interval โ€” Number of seconds to wait between checks.
  • wait โ€” Maximum number of seconds to wait for transition. Set to None to wait forever.
  • attribute โ€” Name of the resource attribute that contains the status.
  • callback โ€” A callback function. This will be called with a single value, progress. This is API specific but is generally a percentage value from 0-100.

Returns โ€” The updated resource.

Raises โ€” ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to status failed to occur in wait seconds.

Raises โ€” ResourceFailure <#openstack.exceptions.ResourceFailure> if the resource transitioned to one of the states in failures.

Raises โ€” AttributeError if the resource does not have a status attribute


wait_for_delete(res, interval=2, wait=120, callback=None)

Wait for a resource to be deleted. Ghosting, but make it infrastructure ๐Ÿ’€

Parameters

  • res โ€” The resource to wait on to be deleted.
  • interval โ€” Number of seconds to wait before to consecutive checks.
  • wait โ€” Maximum number of seconds to wait before the change.
  • callback โ€” A callback function. This will be called with a single value, progress, which is a percentage value from 0-100.

Returns โ€” The resource is returned on success.

Raises โ€” ResourceTimeout <#openstack.exceptions.ResourceTimeout> if transition to delete failed to occur in the specified seconds.


๐Ÿฆ‹ Block Storage API ๐Ÿฆ‹

For details on how to use block_storage, see Using OpenStack Block Storage <>


๐Ÿ‘‘ The BlockStorage Class ๐Ÿ‘‘

The block_storage high-level interface is available through the block_storage member of a Connection <#openstack.connection.Connection> object. The block_storage member will only be added if the service is detected.


๐ŸŒธ Attachments ๐ŸŒธ

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_attachment(volume, **attrs)

Create a new attachment. New attachment just dropped ๐ŸŽ€

This is an internal API and should only be called by services consuming volume attachments like nova, glance, ironic etc.

Parameters

  • volume โ€” The value can be either the ID of a volume or a Volume <#openstack.block_storage.v3.volume.Volume> instance.
  • attrs โ€” the keyword args you pass in to build a Attachment <#openstack.block_storage.v3.attachment.Attachment>, pulled straight from the properties living on the Attachment class โ€” think connector, instance_id, mode, etc. โœจ

Returns โ€” the results of attachment creation, bestie ๐ŸŽ€

get_attachment(attachment) โ€” grab a single volume ๐Ÿ‘‘

This one is an internal API and should only be called by services that consume volume attachments โ€” like nova, glance, ironic etc. So like, not your vibe to poke at unless you're one of those, iykyk.

Parameters

  • attachment โ€” the value can be the ID of an attachment or a Attachment instance. ๐Ÿ’…

Returns โ€” one Attachment

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ

attachments(*, details=True, **query) โ€” returns a generator of attachments ๐Ÿฆ‹

Also an internal API, only for services consuming volume attachments like nova, glance, ironic etc. no cap.

Parameters

  • details โ€” when it's set to False, no extended attributes get returned. The default, True, will cause objects with additional attributes to be returned. โญ
  • query โ€” optional query parameters sent over to limit the resources being returned.

Returns โ€” a generator of attachment objects ๐Ÿ’–

delete_attachment(attachment, ignore_missing=True) โ€” delete an attachment ๐Ÿ’€

Internal API again โ€” only called by services consuming volume attachments like nova, glance, ironic etc.

Parameters

  • attachment โ€” the value can be either the ID of an attachment or a Attachment <#openstack.block_storage.v3.attachment.Attachment> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the attachment does not exist. When set to True, no exception will be set when attempting to delete a nonexistent attachment. ๐Ÿ™ˆ

Returns โ€” None

update_attachment(attachment, **attrs) โ€” update an attachment โœจ

Internal API, only for services consuming volume attachments like nova, glance, ironic etc.

Parameters

  • attachment โ€” the value can be the ID of an attachment or a Attachment <#openstack.block_storage.v3.attachment.Attachment> instance.
  • attrs โ€” keyword arguments which will be used to update a Attachment <#openstack.block_storage.v3.attachment.Attachment> comprised of the properties on the Attachment class.

Returns โ€” the updated attachment ๐ŸŒธ

complete_attachment(attachment) โ€” complete an attachment ๐ŸŽ€

Internal API, and only services consuming volume attachments like nova, glance, ironic etc. should be calling it.

Parameters

  • attachment โ€” the value can be the ID of an attachment or a Attachment <#openstack.block_storage.v3.attachment.Attachment> instance.

Returns โ€” None


๐Ÿฆ‹ Availability Zone Operations ๐Ÿฆ‹

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

availability_zones() โ€” return a generator of availability zones ๐ŸŒˆ

Returns โ€” a generator of availability zone AvailabilityZone <#openstack.block_storage.v3.availability_zone.AvailabilityZone> ๐Ÿ‘‘


๐ŸŒธ Backend Pools Operations ๐ŸŒธ

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

backend_pools(**query) โ€” returns a generator of cinder Back-end storage pools ๐Ÿ’œ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

:returns a generator of cinder Back-end storage pools objects ๐Ÿ”ฅ


๐ŸŽ€ Backup Operations ๐ŸŽ€

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

backups(*, details=True, **query) โ€” retrieve a generator of backups ๐Ÿ“

Parameters

  • details โ€” when set to False, no additional details will be returned. The default, True, will cause objects with additional attributes to be returned. โญ
  • query โ€” optional query parameters to be sent to limit the resources being returned:
    • offset: pagination marker
    • limit: pagination limit
    • sort_key: sorts by an attribute. A valid value is name, status, container_format, disk_format, size, id, created_at, or updated_at. Default is created_at. The API uses the natural sorting direction of the sort_key attribute value. ๐Ÿ’…
    • sort_dir: sorts by one or more sets of attribute and sort direction combinations. If you omit the sort direction in a set, default is desc.
    • project_id: project ID to query backups for.

Returns โ€” a generator of backup objects ๐ŸŒธ

get_backup(backup) โ€” get a backup โœจ

Parameters

  • backup โ€” the value can be the ID of a backup or a Backup <#openstack.block_storage.v3.backup.Backup> instance.

Returns โ€” Backup instance ๐Ÿ‘‘

find_backup(name_or_id, ignore_missing=True, *, details=True) โ€” find a single backup ๐Ÿฆ‹

Parameters

  • snapshot โ€” the name or ID a backup ๐Ÿซถ
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the backup does not exist.
  • details โ€” when set to False, no additional details will be returned. The default, True, will cause objects with additional attributes to be returned.

Returns โ€” one Backup <#openstack.block_storage.v3.backup.Backup> ๐Ÿ’–

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found ๐Ÿ˜ต

create_backup(**attrs) โ€” create a new Backup from attributes with the native API ๐ŸŒˆ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Backup <#openstack.block_storage.v3.backup.Backup> comprised of the properties on the Backup class.

Returns โ€” the results of Backup creation ๐ŸŽ€

delete_backup(backup, ignore_missing=True, force=False) โ€” delete a CloudBackup ๐Ÿ’€

Parameters

  • backup โ€” the value can be the ID of a backup or a Backup <#openstack.block_storage.v3.backup.Backup> instance
  • ignore_missing โ€” bestie, this is the "don't be dramatic" switch. Set it to False and a NotFoundException gets raised the second the zone doesn't exist. Set it to True and no exception happens at all when you try to delete a zone that was never there. Zero drama, zero noise ๐Ÿ’…
  • force โ€” whether to try forcing the backup deletion. That's it, that's the whole vibe.

Returns โ€” None. Nothing back, just vibes โœจ


update_backup(backup, **attrs) โ€” update a backup, glow-up edition ๐ŸŒธ

Parameters:

  • backup โ€” either the ID of a backup or a Backup instance.
  • attrs โ€” the attributes you wanna update on the volume.

Returns โ€” the updated backup ๐Ÿซถ


fetch_backup_metadata(backup) โ€” hand over a dictionary of metadata for a backup.

Parameters:

  • backup โ€” either the ID of a backup or a Backup instance.

Returns โ€” a Backup with the backup's metadata. iykyk ๐Ÿ’–


get_backup_metadata(backup) โ€” same deal, returns a dictionary of metadata for a backup.

Deprecated since version 4.14.0: use fetch_backup_metadata() instead. She's iconic but she's retired, bestie โ€” fetch_backup_metadata() is the main character now ๐Ÿ‘‘

import_backup(service, url) โ€” create a brand new backup from an external service. literally bringing the backup in from outside ๐Ÿฆ‹

Parameters:

  • service โ€” the service used to perform the backup.
  • url โ€” an identifier string to locate the backup.

Returns โ€” the imported backup โญ


export_backup(backup) โ€” export information about a backup.

Parameters:

  • backup โ€” the value can be the ID of a backup or a Backup instance.

Returns โ€” the backup export record fields ๐ŸŒˆ


set_backup_metadata(backup, **metadata) โ€” update metadata for a backup.

Parameters:

  • backup โ€” either the ID of a backup or a Backup instance.
  • metadata โ€” key/value pairs to be updated in the backup's metadata. No other metadata is modified by this call โ€” she only touches what you tell her to touch, no cap ๐Ÿ™ˆ

Returns โ€” a Backup with the backup's metadata.


delete_backup_metadata(backup, keys=None) โ€” delete metadata for a backup. bye-bye metadata ๐ŸŽ€

Parameters:

  • backup โ€” either the ID of a backup or a Backup instance.
  • keys โ€” the keys to delete. If you omit this, all metadata is removed. all of it. gone. ๐Ÿ’€

Returns โ€” None


restore_backup(backup, volume=None, name=None) โ€” restore a Backup to a volume. the comeback arc we've been waiting for ๐Ÿ”ฅ

Parameters:

  • backup โ€” the value can be the ID of a backup or a Backup instance.
  • volume โ€” an ID or Volume instance of the volume to restore the backup to.
  • name โ€” the name for new volume creation to restore.

Returns โ€” updated backup instance ๐Ÿ’œ


restore_backup(backup, volume=None, name=None) โ€” (yes she's here again, same signature, same energy)

reset_backup_status(backup, status) โ€” reset the status of the backup. hitting the reset button, emotionally ๐Ÿงš

Parameters:

  • backup โ€” the value can be either the ID of a backup or a Backup instance.
  • status โ€” new backup status.

Returns โ€” None


๐ŸŽ€ BlockStorageSummary Operations ๐ŸŽ€

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None, endpoint_override=None,
version=None, auth=None, user_agent=None, connect_retries=None, logger=None,
allow=None, additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None,
connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None,
statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
ok so that exact same constructor signature pops up for every single operation group below โ€” it's the same Proxy class every time, she just keeps showing up to the party ๐Ÿ’…

summary(all_projects, **kwargs) โ€” get Volumes Summary. This method returns the volumes summary in the deployment โœจ

Parameters:

  • all_projects โ€” whether to return the summary of all projects or not.

Returns โ€” one ~openstack.block_storage.v3.block_storage_summary.Summary instance ๐Ÿฆ‹


๐Ÿฆ‹ Capabilities Operations ๐Ÿฆ‹

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None, endpoint_override=None,
version=None, auth=None, user_agent=None, connect_retries=None, logger=None,
allow=None, additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None,
connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None,
statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_capabilities(host) โ€” get a backend's capabilites ๐Ÿ‘‘ (yes that spelling, don't come for her)

Parameters:

  • host โ€” specified backend to obtain volume stats and properties.

Returns โ€” one ~openstack.block_storage.v3.capabilites.Capabilities instance.

Raises โ€” NotFoundException when no resource can be found. so if she can't find it, she WILL tell you ๐Ÿ˜ญ


๐ŸŒธ Cluster Operations ๐ŸŒธ

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None, endpoint_override=None,
version=None, auth=None, user_agent=None, connect_retries=None, logger=None,
allow=None, additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None,
connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None,
statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_cluster(cluster) โ€” get a cluster ๐Ÿ’œ

Parameters:

  • cluster โ€” the value can be the name of a cluster or a Cluster instance.

Returns โ€” a Cluster instance.

Raises โ€” NotFoundException when no resource can be found.


find_cluster(name_or_id, ignore_missing=True) โ€” find a single cluster. one (1) cluster, that's the assignment ๐Ÿ”

Parameters:

  • name_or_id โ€” the name or ID of a cluster.
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. quiet quitting, but for lookups ๐Ÿ™ˆ

Returns โ€” one Cluster or None.

Raises โ€” NotFoundException when no resource can be found.

Raises โ€” DuplicateResource when multiple resources are found. bestie there can only be one ๐Ÿ’€


clusters(*, details=True, **query) โ€” retrieve a generator of clusters. a whole stream of them, slay ๐ŸŒˆ

Parameters:

  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
  • query โ€” optional query parameters to be sent to limit the resources being returned:
    • name: filter by cluster name.
    • binary: filter by binary name.
    • is_up: filter by up/down state.
    • disabled: filter by disabled status.
    • num_hosts: filter by number of hosts in the cluster.
    • num_down_hosts: filter by number of down hosts.
    • replication_status: filter by replication status.

Returns โ€” a generator of cluster objects. ๐Ÿซถ


enable_cluster(cluster) โ€” enable a cluster. turn her ON โญ

Parameters:

  • cluster โ€” either the name of a cluster or a Cluster instance.

Returns โ€” updated cluster instance.


disable_cluster(cluster, *, reason=None) โ€” disable a cluster. turn her off, gently ๐ŸŽ€

Parameters:

  • cluster โ€” either the name of a cluster or a Cluster instance.
  • reason โ€” the reason you're disabling the cluster, bestie. Spill it.

Returns โ€” the updated cluster instance. Fresh off the glow-up. โœจ


๐ŸŽ€ Consistency Group Operations ๐ŸŽ€

Okay so before we get into the methods, here's the class signature, and yes it's long, no I did not make it up, copy it exactly or the vibe check fails:

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿ’… get_consistency_group(consistency_group)

Grab one (1) consistency group. Like, just the one. We're not greedy.

Parameters

  • group_snapshot โ€” ngl the name is a little cursed but this is literally the param: the value can be the ID of a consistency group or a ConsistencyGroup <#openstack.block_storage.v3.consistency_group.ConsistencyGroup> instance.

Returns โ€” a ConsistencyGroup instance. Iconic.

๐Ÿ” find_consistency_group(name_or_id, ignore_missing=True, *, details=True)

Find a single consistency group. The hunter-gatherer of consistency groups.

Parameters

  • name_or_id โ€” the name or ID of a group.
  • ignore_missing โ€” when set to False, ResourceNotFound <#openstack.exceptions.ResourceNotFound> will be raised when the consistency group does not exist. Like, it will snitch.
  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.

Returns โ€” one ConsistencyGroup <#openstack.block_storage.v3.consistency_group.ConsistencyGroup>

Raises ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. Two of them?? In this economy??

๐ŸŒˆ consistency_groups(*, details=True, **query)

Retrieve a generator of consistency groups โ€” all of them, just vibes, lazy-loaded ๐Ÿ’–

Parameters

  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
  • query โ€”

Optional query parameters to be sent to limit the resources being returned:

  • all_tenants: Shows details for all project.
  • sort: Comma-separated list of sort keys and optional sort directions.
  • limit: Returns a number of items up to the limit value.
  • offset: Used in conjunction with limit to return a slice of items. Specifies where to start in the list.
  • marker: The ID of the last-seen item.

Returns โ€” a generator of consistency group objects. So many objects. Slay.

โœจ create_consistency_group(**attrs)

Create a new consistency group from attributes. Build-a-bear but make it storage.

Parameters

  • attrs โ€” keyword arguments which will be used to create a ConsistencyGroup <#openstack.block_storage.v3.consistency_group.ConsistencyGroup> comprised of the properties on the Consistency Group class.

Returns โ€” the results of consistency group creation. ๐Ÿซถ

๐Ÿฆ‹ create_consistency_group_from_source(*, consistency_group_snapshot=None, consistency_group=None, name=None, description=None)

Creates a new consistency group from source. Yes bestie, copying the whole aesthetic.

Parameters

  • attrs โ€” keyword arguments which will be used to create a ConsistencyGroup <#openstack.block_storage.v3.consistency_group.ConsistencyGroup> comprised of the properties on the Consistency Group class.

Returns โ€” the results of consistency group creation. (fr fr, that's what it says)

๐Ÿ’€ delete_consistency_group(consistency_group, force=False)

Delete a consistency group. It's giving closure. ๐Ÿ“

Parameters

  • consistency_group โ€” the ConsistencyGroup <#openstack.block_storage.v3.consistency_group.ConsistencyGroup> to delete.
  • force โ€” when set to True, volumes in consistency group will also be deleted. โš ๏ธ That's the nuclear option, don't just set it for fun.

Returns โ€” None. Nothing. Empty. A peaceful void.

๐ŸŒธ update_consistency_group(consistency_group, **attrs)

Update a consistency group. A little edit, a little refresh, main character energy.

Parameters

  • consistency_group โ€” the value can be the ID of a group or a ConsistencyGroup <#openstack.block_storage.v3.consistency_group.ConsistencyGroup> instance.
  • attrs โ€” the attributes to update on the consistency group.

Returns โ€” the updated consistency group. โœจ


๐Ÿงš Consistency Group Snapshot Operations ๐Ÿงš

Same exact class signature as above, so here you go, once more with feeling:

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿ‘‘ get_consistency_group_snapshot(consistency_group_snapshot)

Get a consistency group snapshot. (Note the period at the end of that sentence, she's formal.)

Parameters

  • consistency_group_snapshot โ€” the value can be either the ID of a consistency group snapshot or a ConsistencyGroupSnapshot <#openstack.block_storage.v3.consistency_group_snapshot.ConsistencyGroupSnapshot> instance.

Returns โ€” one ConsistencyGroupSnapshot <#openstack.block_storage.v3.consistency_group_snapshot.ConsistencyGroupSnapshot>

๐Ÿ”ฅ find_consistency_group_snapshot(name_or_id, ignore_missing=True, *, details=True)

Find a single consistency group snapshot. Detective mode: activated.

Parameters

  • name_or_id โ€” the name or ID of a consistency group snapshot.
  • ignore_missing โ€” when set to False, ResourceNotFound <#openstack.exceptions.ResourceNotFound> will be raised when the consistency group snapshot does not exist.
  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.

Returns โ€” one ConsistencyGroupSnapshot <#openstack.block_storage.v3.consistency_group_snapshot.ConsistencyGroupSnapshot> or None. Either a snack or no snack ๐Ÿ˜ญ

Raises ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

๐ŸŽ€ consistency_group_snapshots(*, details=True, **query)

Retrieve a generator of consistency group snapshots. Lazy generator, so efficient, so mindful.

Parameters

  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
  • query โ€”

Optional query parameters to be sent to limit the resources being returned:

  • limit: Returns a number of items up to the limit value.
  • offset: Used in conjunction with limit to return a slice of items. Specifies where to start in the list.
  • marker: The ID of the last-seen item.

Returns โ€” a generator of consistency group snapshot objects. ๐Ÿ’œ

๐Ÿ’– create_consistency_group_snapshot(**attrs)

Create a new consistency group snapshot. A lil baby snapshot, precious.

Parameters

  • attrs โ€” keyword arguments which will be used to create a ConsistencyGroupSnapshot <#openstack.block_storage.v3.consistency_group_snapshot.ConsistencyGroupSnapshot>, comprised of the properties on the ConsistencyGroupSnapshot class. The consistencygroup_id attribute is required. Don't forget it, that's the whole assignment.

Returns โ€” the result of consistency group snapshot creation.

๐Ÿ—‘๏ธ delete_consistency_group_snapshot(consistency_group_snapshot, ignore_missing=True)

Delete a consistency group snapshot. Bye bestie, you were iconic while you lasted.

Parameters

  • consistency_group_snapshot โ€” the value can be either the ID of a consistency group snapshot or a ConsistencyGroupSnapshot <#openstack.block_storage.v3.consistency_group_snapshot.ConsistencyGroupSnapshot> instance.
  • ignore_missing โ€” bestie, when you set this to False, a ResourceNotFound <#openstack.exceptions.ResourceNotFound> gets raised the moment that consistency group snapshot doesn't exist. Set it True and the SDK just shrugs and moves on. ๐Ÿ™ˆ

Returns

None โ€” nothing, nada, zip. She returns nothing and honestly? Respect. ๐Ÿ’…


๐ŸŽ€ Default Volume Types ๐ŸŽ€

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

default_types() โ€” lists out all the default types, like a little roll call. โœจ

Returns

A list of default types that are associated to projects.

show_default_type(project) โ€” shows you the default type for one specific project.

Parameters

  • project โ€” the value can be either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.

Returns

The default type associated to that project.

set_default_type(project, type) โ€” sets the default type for a project, i.e. you're making a choice and committing to it. ๐Ÿ‘‘

Parameters

  • project โ€” the value can be either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.
  • type โ€” the value can be either the ID of a type or a Type <#openstack.block_storage.v3.type.Type> instance.

Returns

A dictionary of project ID and it's associated default type.

unset_default_type(project) โ€” un-sets the default type for a project. Undoing your little choice. It's giving "actually never mind." ๐Ÿ˜ญ

Parameters

  • project โ€” the value can be either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.

Returns

None


๐Ÿฆ‹ Extension Operations ๐Ÿฆ‹

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

extensions() โ€” returns a generator of extensions. Lazy-loading queen behavior, we love a generator. ๐Ÿงš

Returns

A generator of extension


๐ŸŒธ Limits Operations ๐ŸŒธ

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_limits(project=None) โ€” retrieves the limits. Knowing your ceilings is self-care, fr fr. ๐Ÿ’–

Parameters

  • project โ€” a project to get limits for. The value can be either the ID of a project or an Project <#openstack.identity.v3.project.Project> instance.

Returns

A Limits object, including both AbsoluteLimit <#openstack.block_storage.v3.limits.AbsoluteLimit> and RateLimit <#openstack.block_storage.v3.limits.RateLimit>


๐ŸŒˆ Group Operations ๐ŸŒˆ

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_group(group, *, list_volume=None, **attrs) โ€” gets you one group. The main character of groups, if you will. ๐Ÿ‘‘

Parameters

  • group โ€” the value can be the ID of a group or a Group <#openstack.block_storage.v3.group.Group> instance.
  • list_volume โ€” whether to include the IDs of the volumes that are members of the group in the response. Requires microversion 3.25 or later. โš ๏ธ so if you're on an older microversion, no volume IDs for you.
  • attrs โ€” DEPRECATED optional query parameters to be sent to limit the resources being returned. Yeah she's deprecated, we don't stan her anymore. ๐Ÿ’€

Returns

A Group instance.

find_group(name_or_id, ignore_missing=True, *, details=True) โ€” finds you a single group, no matter how hard they're hiding. ๐Ÿ•ต๏ธ

Parameters

  • name_or_id โ€” the name or ID of a group.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the group snapshot does not exist.
  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.

Returns

One Group <#openstack.block_storage.v3.group.Group>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. ๐Ÿ˜ญ yes, two groups with the same name is a whole situation.

groups(*, details=True, **query) โ€” retrieves a generator of groups. Group chat energy but for storage. ๐Ÿซถ

Parameters

  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.
  • query โ€”

Optional query parameters to be sent to limit the resources being returned:

  • all_tenants: Shows details for all project.
  • sort: Comma-separated list of sort keys and optional sort directions.
  • limit: Returns a number of items up to the limit value.
  • offset: Used in conjunction with limit to return a slice of items. Specifies where to start in the list.
  • marker: The ID of the last-seen item.
  • list_volume: Show volume ids in this group.
  • detailed: If True, will list groups with details.
  • search_opts: Search options.

Returns

A generator of group objects.

create_group(**attrs) โ€” creates a brand new group from attributes. New group, who dis? โœจ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Group <#openstack.block_storage.v3.group.Group> comprised of the properties on the Group class.

Returns

The results of group creation.

create_group_from_source(**attrs) โ€” creates a new group from a source. It's giving "inspired by, but make it new." ๐Ÿฆ‹

Parameters

  • attrs โ€” keyword arguments which will be used to create a Group <#openstack.block_storage.v3.group.Group> comprised of the properties on the Group class.

Returns

The results of group creation.

delete_group(group, delete_volumes=False, ignore_missing=True) โ€” deletes a group. Bye bestie, don't let the door hit you. ๐Ÿ’…

Parameters

  • group โ€” the Group <#openstack.block_storage.v3.group.Group> to delete.
  • delete_volumes โ€” when set to True, volumes in group will be deleted. ๐Ÿšจ yes, the volumes too, so like, be sure before you flip this one.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the group does not exist. When set to True, no exception will be set when attempting to delete a nonexistent group.

Returns

None.

update_group(group, **attrs) โ€” updates a group. Glow-up arc, activated. ๐Ÿ”ฅ

Parameters

  • group โ€” the value can be the ID of a group or a Group <#openstack.block_storage.v3.group.Group> instance.
  • attrs โ€” the attributes to update on the group.

Returns

The updated group

reset_group_status(group, status) โœจ

Reset group status โ€” okay so this one literally resets the status of a group. No cap.

  • group โ€” the Group <#openstack.block_storage.v3.group.Group> to set the state.
  • status โ€” the status for a group.

Returns: None โ€” itโ€™s giving minimal effort but in a cool way ๐Ÿ’…

enable_group_replication(group) ๐Ÿฆ‹

Enable replication for a group โ€” bestie, this turns replication ON for that group.

  • group โ€” the Group <#openstack.block_storage.v3.group.Group> to enable replication for.

Returns: None

disable_group_replication(group) ๐ŸŽ€

Disable replication for a group โ€” the opposite vibe, turns replication OFF.

  • group โ€” the Group <#openstack.block_storage.v3.group.Group> to disable replication for.

Returns: None

failover_group_replication(group, *, allowed_attached_volume=False, secondary_backend_id=None) ๐Ÿ”ฅ

Failover replication for a group โ€” dramatic failover moment, but make it secure.

  • group โ€” the Group <#openstack.block_storage.v3.group.Group> to failover replication for.
  • allowed_attached_volume โ€” whether to allow attached volumes in the group. Defaults to False.
  • secondary_backend_id โ€” the secondary backend ID. Defaults to None.

Returns: None


โœจ Group Snapshot Operations โœจ

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_group_snapshot(group_snapshot) ๐ŸŒธ

Get a group snapshot โ€” pull up one snack, I mean snapshot.

  • group_snapshot โ€” the value can be the ID of a group snapshot or a GroupSnapshot <#openstack.block_storage.v3.group_snapshot.GroupSnapshot> instance.

Returns: A GroupSnapshot instance.

find_group_snapshot(name_or_id, ignore_missing=True, *, details=True) ๐Ÿซถ

Find a single group snapshot โ€” like a search party but for snapshots.

  • name_or_id โ€” the name or ID of a group snapshot.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the group snapshot does not exist.
  • details โ€” when set to False, no additional details will be returned. The default, True, will cause additional details to be returned.

Returns: One group_snapshot <#module-openstack.block_storage.v3.group_snapshot>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises: DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

group_snapshots(*, details=True, **query) ๐ŸŒˆ

Retrieve a generator of group snapshots โ€” itโ€™s giving infinite scroll energy.

  • details โ€” when True, returns GroupSnapshot <#openstack.block_storage.v3.group_snapshot.GroupSnapshot> objects with additional attributes filled.
  • query โ€” optional query parameters to be sent to limit the group snapshots being returned.

Returns: A generator of group snapshtos. (yes, thatโ€™s the typo in the original, keep it ๐Ÿ’€)

create_group_snapshot(**attrs) โญ

Create a group snapshot โ€” new snapshot, who dis?

  • attrs โ€” keyword arguments which will be used to create a GroupSnapshot <#openstack.block_storage.v3.group_snapshot.GroupSnapshot> comprised of the properties on the GroupSnapshot class.

Returns: The results of group snapshot creation.

reset_group_snapshot_status(group_snapshot, status) ๐Ÿ’œ

Reset group snapshot status โ€” reset button but make it snapshots.

  • group_snapshot โ€” the GroupSnapshot <#openstack.block_storage.v3.group_snapshot.GroupSnapshot> to set the state.
  • state โ€” the status of the group snapshot to be set.

Returns: None

โš ๏ธ heads up: the parameter in the signature is status but the description says state. Weโ€™re just the messenger, bestie.

delete_group_snapshot(group_snapshot, ignore_missing=True) ๐Ÿ“

Delete a group snapshot โ€” bye-bye snapshot.

  • group_snapshot โ€” the GroupSnapshot to delete.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the group snapshot does not exist. When set to True, no exception will be set when attempting to delete a nonexistent group snapshot.

Returns: None


๐Ÿ‘‘ Group Type Operations ๐Ÿ‘‘

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_group_type(group_type) ๐ŸŽ€

Get a specific group type โ€” one group type, coming right up.

  • group_type โ€” the value can be the ID of a group type or a GroupType <#openstack.block_storage.v3.group_type.GroupType> instance.

Returns: One :class: ~openstack.block_storage.v3.group_type.GroupType instance.

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

find_group_type(name_or_id, ignore_missing=True) ๐Ÿงš

Find a single group type โ€” detective mode activated.

  • name_or_id โ€” the name or ID of a group type.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the group type does not exist.

Returns: One GroupType <#openstack.block_storage.v3.group_type.GroupType>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises: DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

group_types(**query) ๐ŸŒŸ

Retrieve a generator of group types โ€” a whole vibe of group types.

  • query โ€” optional query parameters to be sent to limit the resources being returned:
    • sort: Comma-separated list of sort keys and optional sort directions in the form of <key> [:<direction>]. A valid direction is asc (ascending) or desc (descending).
    • limit: Requests a page size of items. Returns a number of items up to a limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
    • offset: Used in conjunction with limit to return a slice of items. Is where to start in the list.
    • marker: The ID of the last-seen item.

Returns: A generator of group type objects.

create_group_type(**attrs) ๐Ÿ’–

Create a group type โ€” birth of a group type, iconic.

  • attrs โ€” keyword arguments which will be used to create a GroupType <#openstack.block_storage.v3.group_type.GroupType> comprised of the properties on the GroupType class.

Returns: The results of group type creation.

delete_group_type(group_type, ignore_missing=True) ๐Ÿ’€

Delete a group type โ€” yeet that group type.

  • group_type โ€” the value can be the ID of a group type or a GroupType <#openstack.block_storage.v3.group_type.GroupType> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone.

Returns: None

๐Ÿซ  note: the original says โ€œzoneโ€ here, not โ€œgroup typeโ€ โ€” weโ€™re keeping it exactly as written, no cap.

update_group_type(group_type, **attrs)

Update a group_type

Parameters

  • group_type โ€” The value can be the ID of a group type or a GroupType (openstack.block_storage.v3.group_type.GroupType) instance. ๐Ÿ’…
  • attrs โ€” The attributes to update on the group type.

Returns โ€” The updated group type. โœจ

fetch_group_type_group_specs(group_type) โ€” Lists group specs of a group type. ๐Ÿฆ‹

  • Parameters
    • group_type โ€” Either the ID of a group type or a GroupType (openstack.block_storage.v3.group_type.GroupType) instance.
  • Returns โ€” One GroupType (openstack.block_storage.v3.group_type.GroupType). ๐Ÿ’–

create_group_type_group_specs(group_type, group_specs) โ€” Create group specs for a group type. ๐ŸŽ€

  • Parameters
    • group_type โ€” Either the ID of a group type or a GroupType (openstack.block_storage.v3.group_type.GroupType) instance.
    • group_specs โ€” dict of extra specs.
  • Returns โ€” One GroupType (openstack.block_storage.v3.group_type.GroupType). โœจ

get_group_type_group_specs_property(group_type, prop) โ€” Retrieve a group spec property for a group type. ๐Ÿ”

  • Parameters
    • group_type โ€” Either the ID of a group type or a GroupType (openstack.block_storage.v3.group_type.GroupType) instance.
    • prop โ€” Property name.
  • Returns โ€” String value of the requested property. ๐Ÿ’œ

update_group_type_group_specs_property(group_type, prop, val) โ€” Update a group spec property for a group type. ๐Ÿ› ๏ธ

  • Parameters
    • group_type โ€” Either the ID of a group type or a GroupType (openstack.block_storage.v3.group_type.GroupType) instance.
    • prop โ€” Property name.
    • val โ€” Property value.
  • Returns โ€” String value of the requested property. โญ

delete_group_type_group_specs_property(group_type, prop, ignore_missing=True) โ€” Delete a group spec property from a group type. ๐Ÿงš

  • Parameters
    • group_type โ€” Either the ID of a group type or a GroupType (openstack.block_storage.v3.group_type.GroupType) instance.
    • prop โ€” Property name.
    • ignore_missing โ€” When set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the group type or group spec does not exist. When set to True, no exception will be set when attempting to delete a nonexistent group type group spec.
  • Returns โ€” None. ๐Ÿ˜ญ

๐Ÿ’ฌ Message Operations ๐Ÿ’ฌ

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_message(message) โ€” Get a message. ๐Ÿ“จ

  • Parameters
    • message โ€” The value can be the ID of a message or a Message (openstack.block_storage.v3.message.Message) instance.
  • Returns โ€” Message instance. ๐Ÿ’Œ

delete_message(message, ignore_missing=True) โ€” Delete a message. ๐Ÿ—‘๏ธ

  • Parameters
    • message โ€” The value can be either the ID of a message or a Message instance.
    • ignore_missing โ€” When set to False, ResourceNotFound (openstack.exceptions.ResourceNotFound) will be raised when the message does not exist. When set to True, no exception will be set when attempting to delete a nonexistent message.
  • Returns โ€” None. ๐Ÿ’€

messages(**query) โ€” Retrieve a generator of messages. ๐ŸŒˆ

  • Returns โ€” A generator of message objects. โœจ

๐Ÿ‘‘ QuotaClassSet Operations ๐Ÿ‘‘

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_quota_class_set(quota_class_set='default') โ€” Get a single quota class set. ๐ŸŽ€

Only one quota class is permitted, default. Periodt. ๐Ÿ’…

  • Parameters
    • quota_class_set โ€” The value can be the ID of a quota class set (only default is supported) or a QuotaClassSet (openstack.block_storage.v3.quota_class_set.QuotaClassSet) instance.
  • Returns โ€” One QuotaClassSet (openstack.block_storage.v3.quota_class_set.QuotaClassSet). ๐Ÿ’–
  • Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ

update_quota_class_set(quota_class_set, **attrs) โ€” Update a QuotaClassSet. ๐Ÿ› ๏ธ

Only one quota class is permitted, default. Fr fr. ๐ŸŒธ

  • Parameters
    • quota_class_set โ€” Either the ID of a quota class set (only default is supported) or a
    • attrs โ€” The attributes to update on the QuotaClassSet represented by quota_class_set.
  • Returns โ€” The updated QuotaSet. โญ

๐Ÿ“ QuotaSet Operations ๐Ÿ“

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_quota_set(project, usage=False, **query) โ€” Show QuotaSet information for the project. ๐Ÿ“Š

  • Parameters
    • project โ€” ID or instance of Project of the project for which the quota should be retrieved.
    • usage โ€” When set to True, quota usage and reservations would be filled. ๐Ÿ‘€
    • query โ€” Additional query parameters to use.
  • Returns โ€” One QuotaSet (openstack.block_storage.v3.quota_set.QuotaSet). ๐Ÿ’œ
  • Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ

get_quota_set_defaults(project) โ€” Show QuotaSet defaults for the project. ๐ŸŒŸ

  • Parameters
    • project โ€” ID or instance of Project of the project for which the quota should be retrieved.
  • Returns โ€” One QuotaSet (openstack.block_storage.v3.quota_set.QuotaSet). ๐Ÿ’–
  • Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ’€

revert_quota_set(project, **query) โ€” Reset quota for the project/user. ๐Ÿ”„

  • Parameters
    • project โ€” ID or instance of Project of the project for which the quota should be resetted. (Yes, "resetted" โ€” we don't make the rules. ๐Ÿ™ˆ)
    • query โ€” Additional parameters to be used.
  • Returns โ€” None. โœจ

update_quota_set(project, **attrs) โ€” Update a QuotaSet. ๐Ÿ› ๏ธ

  • Parameters
    • project โ€” ID or instance of Project of the project for which the quota should be reset.
    • attrs โ€” The attributes to update on the QuotaSet represented by quota_set.
  • Returns โ€” The updated QuotaSet. ๐Ÿ‘‘

๐Ÿ’… QoSSpec Operations

Okay bestie, this is the QoS spec corner of the block storage v3 proxy and it's honestly kind of a whole vibe. All of these live on the same class, and that class is a bit of a mouthful, so here's her full signature in all her glory โ€” every kwarg, no cap ๐Ÿซถ:

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐ŸŒธ create_qos_spec(**attrs)

Make a brand new QoS Spec out of attributes, like a little QoS baby โœจ

Parameters

  • attrs โ€” keyword arguments that get used to create a QoSSpec <#openstack.block_storage.v2.qos_spec.QoSSpec>, made up of the properties on the QoSSpec class.

Returns

The results of a QoS spec creation ๐ŸŽ€


๐Ÿฆ‹ delete_qos_spec(qos_spec, ignore_missing=True, *, force=False)

Delete a QoS Spec. Yes, gone. Bye ๐Ÿ’…

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v2.qos_spec.QoSSpec> instance.
  • ignore_missing โ€” when set to False, ResourceNotFound <#openstack.exceptions.ResourceNotFound> will be raised when the type does not exist. When set to True, no exception will be set when attempting to delete a nonexistent type.
  • force โ€” whether to delete the QoS spec even if it's in use.
โš ๏ธ That force flag is giving "I know what I'm doing" energy โ€” it nukes the spec even if it's in use. Respect the power, bestie.

Returns

None


๐Ÿงš update_qos_spec(qos_spec, **attrs)

Update a QoS spec โ€” glow-up time ๐Ÿ”ฅ

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v2.qos_spec.QoSSpec> instance.
  • attrs โ€” the attributes to update on the QoS spec.

Returns

The updated QoS spec ๐Ÿ‘‘


โญ get_qos_spec(qos_spec)

Grab a single QoS spec, main character only ๐Ÿ’–

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v2.qos_spec.QoSSpec> instance.

Returns

One QoSSpec <#openstack.block_storage.v2.qos_spec.QoSSpec>

Raises ResourceNotFound <#openstack.exceptions.ResourceNotFound> when no resource can be found.


๐ŸŒˆ find_qos_spec(name_or_id, ignore_missing=True, **query)

Find a single QoS spec โ€” the scavenger hunt version ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a QoS spec.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” additional attributes like 'host'.

Returns

One: class:~openstack.block_storage.v2.qos_spec.QoSSpec or None

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

๐Ÿ˜ญ Two matches and she panics โ€” that's the DuplicateResource, not a personality flaw.

๐Ÿ“ qos_specs(**query)

Return a generator of QoS specs, like a lil pipeline of them โœจ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of QoSSpec objects


๐Ÿ’œ associate_qos_spec(qos_spec, vol_type_id)

Associate a QoS spec with a volume type. Matchmaker mode ๐Ÿซถ

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v3.qos_spec.QoSSpec> instance.
  • vol_type_id โ€” the ID of the volume type to associate with.

Returns

None


๐Ÿ’€ disassociate_qos_spec(qos_spec, vol_type_id)

Disassociate a QoS spec from a volume type. The breakup episode ๐Ÿ˜ญ

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v3.qos_spec.QoSSpec> instance.
  • vol_type_id โ€” the ID of the volume type to disassociate from.

Returns

None


๐ŸŒธ disassociate_all_qos_spec(qos_spec)

Disassociate a QoS spec from all volume types. Not a breakup, a whole era-ending ๐Ÿ’…

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v3.qos_spec.QoSSpec> instance.

Returns

None


๐ŸŽ€ delete_qos_spec_metadata(qos_spec, keys)

Delete metadata from a QoS spec โ€” spring cleaning ๐Ÿ”ฅ

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v3.qos_spec.QoSSpec> instance.
  • keys โ€” the keys to delete from the QoS spec.

Returns

None


๐Ÿฆ‹ qos_spec_associations(qos_spec)

Return a generator of associations for a QoS spec. Who's linked to who, the lore ๐ŸŒˆ

Parameters

  • qos_spec โ€” the value can be either the ID of a QoS spec or a QoSSpec <#openstack.block_storage.v3.qos_spec.QoSSpec> instance.

Returns

A generator of QoSSpecAssociation <#openstack.block_storage.v3.qos_spec.QoSSpecAssociation> objects


๐ŸŒŸ Resource Filter Operations

Same class, same iconique signature, zero changes โ€” here she is again for the record ๐Ÿ’–:

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

โœจ resource_filters(**query)

Retrieve a generator of resource filters. It's giving "quietly useful" ๐ŸŽ€

Returns

A generator of resource filters.


๐Ÿ‘‘ Service Operations

And one more time โ€” the exact same Proxy signature, because she's nothing if not consistent ๐Ÿซถ:

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿ” find_service(name_or_id, ignore_missing=True, **query)

Find a single service โ€” detective era ๐ŸŒธ

Parameters

  • name_or_id โ€” the name or ID of a service.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” additional attributes like 'host'.

Returns

One: class:~openstack.block_storage.v3.service.Service or None

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.


๐ŸŽ€ services(**query)

Return a generator of service ๐Ÿงš

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of Service objects


๐ŸŒˆ enable_service(service)

Enable a service. Turning it back on, we love a comeback ๐Ÿ’–

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v3.service.Service> instance.

Returns

Updated service instance


๐Ÿ’… disable_service(service, *, reason=None)

Disable a service. Sit down for a sec, bestie โœจ

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.block_storage.v3.service.Service> instance
  • reason โ€” the reason to disable a service

Returns

Updated service instance


๐Ÿ”ฅ thaw_service(service)

Thaw a service

  • service โ€” either the ID of a service, or an actual Service instance (openstack.block_storage.v3.service.Service) ๐Ÿซถ

Returns โ€” the updated service instance, fresh and glowed-up โœจ

freeze_service(service)

Okay so this one freezes a service ๐ŸงŠ Like, it just puts it on pause, bestie.

  • service โ€” either the ID of a service, or a Service instance (openstack.block_storage.v3.service.Service)

Returns โ€” the updated service instance ๐Ÿ’…

set_service_log_levels(*, level, binary=None, server=None, prefix=None)

Set the log level for services ๐Ÿ”ฅ Very main character of you.

Parameters

  • level โ€” the log level to set, case insensitive, and the accepted values are INFO, WARNING, ERROR and DEBUG. No inventing your own levels, ngl ๐Ÿ’€
  • binary โ€” the binary name of the service.
  • server โ€” the name of the host.
  • prefix โ€” the prefix for the log path we're querying, for example cinder. or sqlalchemy.engine.. When it's not present, or when the empty string is passed, all log levels will be retrieved ๐ŸŽ€

Returns โ€” None. That's it. That's the whole return ๐Ÿ’œ

get_service_log_levels(*, binary=None, server=None, prefix=None)

Get the log level for services ๐Ÿ‘‘

Parameters

  • binary โ€” the binary name of the service.
  • server โ€” the name of the host.
  • prefix โ€” the prefix for the log path we're querying, for example cinder. or sqlalchemy.engine.. When it's not present, or when the empty string is passed, all log levels will be retrieved ๐ŸŒธ

Returns โ€” a generator of LogLevel objects. It's giving lazy-evaluation realness โœจ

failover_service(service, *, cluster=None, backend_id=None)

Failover a service ๐Ÿฆ‹

Heads up bestie โ€” this only applies to replicating cinder-volume services ๐Ÿ’… Like, don't try it on anything else, fr fr.

Parameters

  • service โ€” either the ID of a service, or a Service instance (openstack.block_storage.v3.service.Service)

Returns โ€” the updated service instance ๐ŸŒˆ

cleanup_service_workers(**attrs)

Request a cleanup of services, with optional filtering ๐Ÿงน

Parameters

  • attrs โ€” the attributes used to filter services.

Returns โ€” the results of the cleanup request ๐Ÿ’–


๐ŸŽ€ Snapshot Operations ๐ŸŽ€

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Look at that constructor. Iconic. No notes. ๐Ÿ˜ญ

get_snapshot(snapshot)

Get a single snapshot ๐Ÿ“ธ

Parameters

  • snapshot โ€” the value can be the ID of a snapshot, or a Snapshot instance (openstack.block_storage.v3.snapshot.Snapshot).

Returns โ€” one Snapshot (openstack.block_storage.v3.snapshot.Snapshot) ๐Ÿ’–

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. Sad times ๐Ÿ˜ญ

find_snapshot(name_or_id, ignore_missing=True, *, details=True, all_projects=False)

Find a single snapshot ๐Ÿ” Like a scavenger hunt but for storage.

Parameters

  • snapshot โ€” the name or ID of a snapshot.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the snapshot does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. So basically, True = no drama ๐Ÿซถ
  • details โ€” when set to False, ~openstack.block_storage.v3.snapshot.Snapshot objects will be returned. The default, True, will cause more attributes to be returned. More is more, bestie โœจ
  • all_projects โ€” when set to True, search for a snapshot by name across all projects. Note that this will likely result in a higher chance of duplicates. Admin-only by default ๐Ÿ‘‘

Returns โ€” one Snapshot (openstack.block_storage.v3.snapshot.Snapshot) ๐ŸŒธ

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

Raises โ€” DuplicateResource (openstack.exceptions.DuplicateResource) when multiple resources are found. Oops, more than one match ๐Ÿ™ˆ

snapshots(*, details=True, all_projects=False, **query)

Retrieve a generator of snapshots ๐ŸŒˆ

Parameters

  • details โ€” when set to False, ~openstack.block_storage.v3.snapshot.Snapshot objects will be returned. The default, True, will cause more attributes to be returned.
  • all_projects โ€” when set to True, list snapshots from all projects. Admin-only by default ๐Ÿ’…
  • query โ€” optional query parameters to be sent to limit the snapshots being returned. Available parameters include:
    • name: name of the snapshot as a string.
    • project_id: filter the snapshots by project.
    • volume_id: volume id of a snapshot.
    • status: value of the status of the snapshot, so that you can filter on "available" for example ๐Ÿ”ฅ

Returns โ€” a generator of snapshot objects. Lazy loading, we love to see it ๐Ÿ’œ

create_snapshot(**attrs)

Create a new snapshot from attributes ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a Snapshot (openstack.block_storage.v3.snapshot.Snapshot), comprised of the properties on the Snapshot class.

Returns โ€” the results of snapshot creation โœจ

update_snapshot(snapshot, **attrs)

Update a snapshot ๐Ÿฆ‹

Parameters

  • snapshot โ€” either the ID of a snapshot, or a Snapshot instance (openstack.block_storage.v3.snapshot.Snapshot).
  • attrs โ€” the attributes to update on the snapshot.

Returns โ€” the updated snapshot ๐Ÿ’–

delete_snapshot(snapshot, ignore_missing=True, force=False)

Delete a snapshot ๐Ÿ’€ Gone. Poof.

Parameters

  • snapshot โ€” the value can be either the ID of a snapshot, or a Snapshot instance (openstack.block_storage.v3.snapshot.Snapshot).
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the snapshot does not exist. When set to True, no exception will be set when attempting to delete a nonexistent snapshot. Chill mode activated ๐Ÿ˜Œ
  • force โ€” whether to try forcing snapshot deletion. Use with care, bestie โš ๏ธ

Returns โ€” None

fetch_snapshot_metadata(snapshot)

Return a dictionary of metadata for a snapshot ๐Ÿ“š

Parameters

  • snapshot โ€” either the ID of a snapshot, or a Snapshot (openstack.block_storage.v3.snapshot.Snapshot).

Returns โ€” a Snapshot (openstack.block_storage.v3.snapshot.Snapshot) with the snapshot's metadata. All keys and values are Unicode text ๐ŸŒธ

get_snapshot_metadata(snapshot)

Return a dictionary of metadata for a snapshot ๐Ÿ“–

Deprecated since version 4.14.0: use fetch_snapshot_metadata() instead. Like, it's still here, but it's giving old money. Move on bestie ๐Ÿ’…

set_snapshot_metadata(snapshot, **metadata)

Update metadata for a snapshot โœ๏ธ

Parameters

  • snapshot โ€” either the ID of a snapshot, or a Snapshot (openstack.block_storage.v3.snapshot.Snapshot).
  • metadata โ€” key/value pairs to be updated in the snapshot's metadata. No other metadata is modified by this call. All keys and values are stored as Unicode. Surgical precision, we stan ๐Ÿ”ฅ

Returns โ€” a Snapshot (openstack.block_storage.v3.snapshot.Snapshot) with the snapshot's metadata. All keys and values are Unicode text ๐Ÿ’œ

delete_snapshot_metadata(snapshot, keys=None)

Delete metadata for a snapshot ๐Ÿงน

Parameters

  • snapshot โ€” either the ID of a snapshot, or a Snapshot (openstack.block_storage.v3.snapshot.Snapshot).
  • keys โ€” the keys to delete. If omitted, all metadata is removed. Yeah, all of it. Be sure, bestie ๐Ÿ˜ญ

Returns โ€” None

reset_snapshot_status(snapshot, status)

Reset the status of the snapshot ๐Ÿ”„

Parameters

so we're still on the last function's params, and then it's a whole buffet of snapshot, transfer, and type methods. buckle up bestie ๐ŸŽ€

  • snapshot -- The value can be either the ID of a backup or a Snapshot <#openstack.block_storage.v3.snapshot.Snapshot> instance.
  • status -- New snapshot status

Returns: None

set_snapshot_status(snapshot, status, progress=None)

Update fields related to the status of a snapshot. ๐Ÿ’…

Parameters:

  • snapshot -- The value can be either the ID of a backup or a Snapshot <#openstack.block_storage.v3.snapshot.Snapshot> instance.
  • status -- New snapshot status
  • progress -- A percentage value for snapshot build progress.

Returns: None

manage_snapshot(**attrs)

Creates a snapshot by using existing storage rather than allocating new storage. โœจ

Parameters:

  • attrs -- Keyword arguments which will be used to create a Snapshot <#openstack.block_storage.v3.snapshot.Snapshot>, comprised of the properties on the Snapshot class.

Returns: The results of snapshot creation

unmanage_snapshot(snapshot)

Unmanage a snapshot from block storage provisioning. ๐Ÿฆ‹

Parameters:

  • snapshot -- Either the ID of a snapshot or a Snapshot <#openstack.block_storage.v3.snapshot.Snapshot>.

Returns: None

manageable_snapshots(*, details=False, **query)

List snapshots available for management on a host or cluster. ๐Ÿ”ฅ

Parameters:

  • details -- When set to True, additional fields will be returned. The default, False, returns basic information.
  • query -- Optional query parameters to limit the resources returned:
    • host: The Cinder host on which to list manageable snapshots.
    • cluster: The Cinder cluster on which to list manageable snapshots. (requires microversion 3.17 or later)
    • marker: Begin returning snapshots appearing later in the list than the snapshot represented by this reference.
    • limit: Maximum number of snapshots to return.
    • offset: Number of snapshots to skip after the marker.
    • sort: Comma-separated list of sort keys and directions.

Returns: A generator of manageable snapshot objects.

Stats Operations

Here's the class signature, same as always but we gotta include it because details matter: ๐Ÿ‘‘

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

backend_pools(**query)

Returns a generator of cinder Back-end storage pools. ๐ŸŒˆ

Parameters:

  • query -- Optional query parameters to be sent to limit the resources being returned.

:returns A generator of cinder Back-end storage pools objects

Transfer Operations

Same class signature, no cap: ๐Ÿ’ฏ

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_transfer(**attrs)

Create a new Transfer record ๐ŸŽ€

Parameters:

  • volume_id -- The value is ID of the volume.
  • name -- The value is name of the transfer
  • attrs -- Keyword arguments which will be used to create a Transfer <#openstack.block_storage.v3.transfer.Transfer> comprised of the properties on the Transfer class.

Returns: The results of Transfer creation

delete_transfer(transfer, ignore_missing=True)

Delete a volume transfer ๐Ÿ’€

Parameters:

  • transfer -- The value can be either the ID of a transfer or a Transfer instance.
  • ignore_missing -- When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the transfer does not exist. When set to True, no exception will be set when attempting to delete a nonexistent transfer.

Returns: None

find_transfer(name_or_id, ignore_missing=True)

Find a single transfer ๐Ÿ”

Parameters:

  • name_or_id -- The name or ID a transfer
  • ignore_missing -- When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the volume transfer does not exist.

Returns: One Transfer <#openstack.block_storage.v3.transfer.Transfer>

Raises:

  • NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.
  • DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

get_transfer(transfer)

Get a single transfer ๐Ÿซถ

Parameters:

  • transfer -- The value can be the ID of a transfer or a Transfer <#openstack.block_storage.v3.transfer.Transfer> instance.

Returns: One Transfer <#openstack.block_storage.v3.transfer.Transfer>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

transfers(*, details=True, all_projects=False, **query)

Retrieve a generator of transfers ๐ŸŒธ

Parameters:

  • details -- When set to False no extended attributes will be returned. The default, True, will cause objects with additional attributes to be returned.
  • all_projects -- When set to True, list transfers from all projects. Admin-only by default.
  • query -- Optional query parameters to be sent to limit the transfers being returned.

Returns: A generator of transfer objects.

accept_transfer(transfer, auth_key)

Accept a Transfer ๐Ÿค

Parameters:

  • transfer -- The value can be the ID of a transfer or a Transfer <#openstack.block_storage.v3.transfer.Transfer> instance.
  • auth_key -- The key to authenticate volume transfer.

Returns: The results of Transfer creation

Type Operations

Again, the class signature. Obsessed with consistency. ๐Ÿ’…

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_type(type)

Get a single type ๐Ÿฆ‹

Parameters:

  • type -- The value can be the ID of a type or a Type <#openstack.block_storage.v3.type.Type> instance.

Returns: One Type <#openstack.block_storage.v3.type.Type>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

find_type(name_or_id, ignore_missing=True)

Find a single volume type ๐Ÿ”Ž

Parameters:

  • snapshot -- The name or ID a volume type
  • ignore_missing -- When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the volume type does not exist.

Returns: One Type <#openstack.block_storage.v3.type.Type>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • get_type_encryption(volume_type) โ€” grab the encryption deets of a volume type ๐Ÿ’– you pass volume_type as either the ID of a type or a Type instance. Returns one TypeEncryption. Raises NotFoundException when no resource can be found, so likeโ€ฆ if it's not there, it's not there ๐Ÿ˜ญ
  • create_type_encryption(volume_type, **attrs) โ€” spin up a brand-new type encryption from attributes โœจ volume_type is the ID of a type or a Type instance, and attrs are the keyword arguments used to create a TypeEncryption, made up of the properties on the TypeEncryption class. Returns the results of type encryption creation.
  • delete_type_encryption(encryption=None, volume_type=None, ignore_missing=True) โ€” bye-bye type encryption attributes ๐ŸŽ€
    • encryption โ€” can be None or a TypeEncryption instance. If encryption is None then volume_type must be specified.
    • volume_type โ€” the ID of a type or a Type instance. Required if encryption is None.
    • ignore_missing โ€” when set to False, NotFoundException gets raised when the type does not exist. When set to True, no exception will be set when attempting to delete a nonexistent type.
    • Returns None.
  • update_type_encryption(encryption=None, volume_type=None, **attrs) โ€” update a type (yes the docs literally say "Update a type", we're not gonna fight it ๐Ÿ’€)
    • encryption โ€” can be None or a TypeEncryption instance. If this is None then volume_type must be specified.
    • volume_type โ€” the ID of a type or a Type instance. Required if encryption is None.
    • attrs โ€” the attributes to update on the type encryption.
    • Returns the updated type encryption.

๐ŸŒˆ Volume Operations ๐ŸŒˆ

class openstack.block_storage.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_volume(volume) โ€” get a single volume ๐Ÿฆ‹ volume is either the ID of a volume or a Volume instance. Returns one Volume.

Raises NotFoundException when no resource can be found. She's not ghosting you, she's just not there ๐Ÿ’€

  • find_volume(name_or_id, ignore_missing=True, *, details=True, all_projects=False) โ€” find a single volume, the hunt is ON ๐Ÿ‘‘
    • snapshot โ€” The name or ID a volume (yes bb, the manpage says snapshot here even though the argument is name_or_id โ€” copying it exactly, no cap ๐Ÿ™ˆ)
    • ignore_missing โ€” when set to False, NotFoundException will be raised when the volume does not exist.
    • details โ€” when set to False no extended attributes will be returned. The default, True, will cause objects with additional attributes to be returned.
    • all_projects โ€” when set to True, search for volume by name across all projects. Note that this will likely result in a higher chance of duplicates. Admin-only by default.

Returns one Volume.

Raises NotFoundException when no resource can be found.

Raises DuplicateResource when multiple resources are found โ€” which is lowkey awk when it happens ๐Ÿ˜ญ

  • volumes(*, details=True, all_projects=False, **query) โ€” retrieve a generator of volumes, a whole lil lineup โœจ
    • details โ€” when set to False no extended attributes will be returned. The default, True, will cause objects with additional attributes to be returned.
    • all_projects โ€” when set to True, list volumes from all projects. Admin-only by default.
    • query โ€”

Optional query parameters to be sent to limit the volumes being returned โ€” available parameters include:

  • name โ€” name of the volume as a string.
  • status โ€” value of the status of the volume so you can filter on "available", for example.

Returns โ€” a generator of volume objects. Slay. โœจ

create_volume(**attrs)

Create a new volume from attributes.

Parameters

  • attrs โ€” keyword arguments which will be used to create a Volume, comprised of the properties on the Volume class.

Returns โ€” the results of volume creation. ๐Ÿ’–

delete_volume(volume, ignore_missing=True, *, force=False, cascade=False)

Delete a volume.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the volume does not exist. When set to True, no exception will be set when attempting to delete a nonexistent volume.
  • force โ€” whether to try forcing volume deletion.
  • cascade โ€” whether to remove any snapshots along with the volume.

Returns โ€” None.

update_volume(volume, **attrs)

Update a volume.

Parameters

  • volume โ€” either the ID of a volume or a Volume instance.
  • attrs โ€” the attributes to update on the volume.

Returns โ€” the updated volume. ๐Ÿฆ‹

fetch_volume_metadata(volume)

Return a dictionary of metadata for a volume.

Parameters

  • volume โ€” either the ID of a volume or a Volume.

Returns โ€” a Volume with the volume's metadata. All keys and values are Unicode text.

get_volume_metadata(volume)

Return a dictionary of metadata for a volume.

Deprecated since version 4.14.0: use fetch_volume_metadata() instead. No cap, use the newer one bestie. ๐Ÿ’…

set_volume_metadata(volume, **metadata)

Update metadata for a volume.

Parameters

  • volume โ€” either the ID of a volume or a Volume.
  • metadata โ€” key/value pairs to be updated in the volume's metadata. No other metadata is modified by this call. All keys and values are stored as Unicode.

Returns โ€” a Volume with the volume's metadata. All keys and values are Unicode text. ๐ŸŽ€

delete_volume_metadata(volume, keys=None)

Delete metadata for a volume.

Parameters

  • volume โ€” either the ID of a volume or a Volume.
  • keys โ€” the keys to delete. If omitted, all metadata is removed.

Returns โ€” None.

extend_volume(volume, size)

Extend a volume.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • size โ€” new volume size.

Returns โ€” None.

complete_volume_extend(volume, error=False)

Complete a volume extend operation.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • error โ€” used to indicate if an error has occurred that requires Cinder to roll back the extend operation.

Returns โ€” None. ๐Ÿ˜ญ

set_volume_readonly(volume, readonly=True)

Set a volume's read-only flag.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • readonly โ€” whether the volume should be a read-only volume or not.

Returns โ€” None.

retype_volume(volume, new_type, migration_policy='never')

Retype the volume.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • new_type โ€” the new volume type that volume is changed with. The value can be either the ID of the volume type or a Type instance.
  • migration_policy โ€” specify if the volume should be migrated when it is re-typed. Possible values are on-demand or never. Default: never.

Returns โ€” None. ๐Ÿ”ฅ

set_volume_bootable_status(volume, bootable)

Set bootable status of the volume.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • bootable โ€” specifies whether the volume should be bootable or not.

Returns โ€” None.

set_volume_image_metadata(volume, **metadata)

Update image metadata for a volume.

Parameters

  • volume โ€” either the ID of a volume or a Volume.
  • metadata โ€” key/value pairs to be updated in the volume's image metadata. No other metadata is modified by this call.

Returns โ€” None.

delete_volume_image_metadata(volume, keys=None)

Delete metadata for a volume.

Parameters

  • volume โ€” either the ID of a volume or a Volume.
  • keys โ€” the keys to delete. If omitted, all metadata is removed.

Returns โ€” None. ๐Ÿ™ˆ

reset_volume_status(volume, status=None, attach_status=None, migration_status=None)

Reset volume statuses.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • status โ€” the new volume status.
  • attach_status โ€” the new volume attach status.
  • migration_status โ€” the new volume migration status (admin only).

Returns โ€” None.

revert_volume_to_snapshot(volume, snapshot)

Revert a volume to its latest snapshot.

This method only support reverting a detached volume, and the volume status must be available. โš ๏ธ

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • snapshot โ€” the value can be either the ID of a snapshot or a Snapshot instance.

Returns โ€” None.

attach_volume(volume, mountpoint, instance=None, host_name=None)

Attaches a volume to a server.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • mountpoint โ€” the attaching mount point.
  • instance โ€” the UUID of the attaching instance.
  • host_name โ€” the name of the attaching host.

Returns โ€” None. ๐Ÿซถ

detach_volume(volume, attachment, force=False, connector=None)

Detaches a volume from a server.

Parameters

  • volume โ€” the value can be either the ID of a volume or a Volume instance.
  • attachment โ€” the ID of the attachment.
  • force โ€” whether to force volume detach (rolls back an unsuccessful detach operation after you disconnect the volume).
  • connector โ€” the connector object.

Returns โ€” None.

manage_volume(**attrs)

Creates a volume by using existing storage rather than allocating new storage. ๐ŸŒˆ

Parameters

  • attrs โ€” the keyword arguments that get used to build a Volume, made up of all the properties on the Volume class.

Returns โ€” the results of the volume creation ๐Ÿ’–


unmanage_volume(volume)

Removes a volume from Block Storage management without removing the back-end storage object that's associated with it. like, it lets go of the leash but the dog is still fully there ๐Ÿ•

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.

Returns โ€” None


manageable_volumes(*, details=False, **query)

Lists the volumes that are available for management on a host or a cluster โœจ

Parameters

  • details โ€” when you set it to True, you get additional fields back. The default, False, just returns basic information.
  • query โ€” optional query parameters to limit the resources returned:
    • host: the Cinder host to list manageable volumes on.
    • cluster: the Cinder cluster to list manageable volumes on. (requires microversion 3.17 or later)
    • marker: begin returning volumes that appear later in the list than the volume represented by this reference.
    • limit: maximum number of volumes to return.
    • offset: number of volumes to skip after the marker.
    • sort: comma-separated list of sort keys and directions.

Returns โ€” a generator of manageable volume objects ๐ŸŒธ


migrate_volume(volume, host=None, force_host_copy=False, lock_volume=False, cluster=None)

Migrates a volume over to the host you specify ๐Ÿฆ‹

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.
  • host โ€” the target host for the volume migration. Host format is <host@backend>.
  • force_host_copy โ€” if it's false (the default), you rely on the volume backend driver to do the migration, which might be optimized. If it's true, or the volume driver fails to migrate the volume itself, a generic host-based migration gets performed instead.
  • lock_volume โ€” if it's true, migrating an available volume will change its status to maintenance, which prevents other operations from being performed on the volume such as attach, detach, retype, etc.
  • cluster โ€” the target cluster for the volume migration. Cluster format is <cluster@backend>. Starting with microversion 3.16, either cluster or host must be specified. If host is specified and is part of a cluster, the cluster is used as the target for the migration.

Returns โ€” None


complete_volume_migration(volume, new_volume, error=False)

Wraps up the migration of a volume ๐ŸŽ€

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.
  • new_volume โ€” the UUID of the new volume.
  • error โ€” used to indicate whether an error happened somewhere else that now needs clean up.

Returns โ€” None


upload_volume_to_image(volume, image_name, force=False, disk_format=None, container_format=None, visibility=None, protected=None)

Uploads the specified volume to the image service ๐Ÿ“ค

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.
  • image_name โ€” the name for the new image.
  • force โ€” enables or disables upload of a volume that's attached to an instance.
  • disk_format โ€” disk format for the new image.
  • container_format โ€” container format for the new image.
  • visibility โ€” the visibility property of the new image.
  • protected โ€” whether the new image is protected.

Returns โ€” a dictionary describing the image ๐Ÿ’…


reserve_volume(volume)

Marks a volume as reserved. consider it claimed, bestie ๐Ÿ”’

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.

Returns โ€” None


unreserve_volume(volume)

Unmarks a volume as reserved. releasing it back into the wild ๐Ÿ•Š๏ธ

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.

Returns โ€” None


begin_volume_detaching(volume)

Updates the volume status to 'detaching' ๐Ÿซถ

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.

Returns โ€” None


abort_volume_detaching(volume)

Updates the volume status to 'in-use' โ€” nvm, we're staying attached ๐Ÿ˜ญ

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.

Returns โ€” None


init_volume_attachment(volume, connector)

Initializes the volume attachment โœจ

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.
  • connector โ€” the connector object.

Returns โ€” a dictionary containing the modified connector object


terminate_volume_attachment(volume, connector)

Updates the volume status to 'in-use' ๐Ÿ’œ

Parameters

  • volume โ€” can be either the ID of a volume or a Volume instance.
  • connector โ€” the connector object.

Returns โ€” None


๐Ÿซถ Helpers ๐Ÿซถ

ok so this is the actual proxy class, and it takes a lot of kwargs. like, a lot a lot. here's the whole signature verbatim, don't @ me:

class openstack.block_storage.v3._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

wait_for_status(res, status='available', failures=None, interval=2, wait=None, attribute='status', callback=None)

Waits for the resource to land in a particular status. it's giving "are we there yet" but as a function โณ

Parameters

  • session โ€” the session to use for making this request.
  • resource โ€” the resource to wait on to reach the status. The resource must have a status attribute specified via attribute.
  • status โ€” desired status of the resource.
  • failures โ€” statuses that would indicate the transition failed, such as 'ERROR'. Defaults to ['ERROR'].
  • interval โ€” number of seconds to wait between checks.
  • wait โ€” maximum number of seconds to wait for the transition. Set it to None to wait forever.
  • attribute โ€” name of the resource attribute that contains the status.
  • callback โ€” a callback function. This gets called with a single value, progress. It's API specific but is generally a percentage value from 0-100.

Returns โ€” the updated resource.

Raises ResourceTimeout if the transition to status failed to occur within wait seconds. ๐Ÿ˜ค
Raises ResourceFailure if the resource transitioned to one of the states in failures. ๐Ÿ’€
Raises AttributeError if the resource does not have a status attribute. ๐Ÿ™ˆ

wait_for_delete(res, interval=2, wait=120, callback=None)

Waits for a resource to be deleted. manifesting its absence ๐Ÿฆ‹

Parameters

  • res โ€” the resource to wait on to be deleted.
  • interval โ€” how many seconds to wait before two consecutive checks. โฑ๏ธ
  • wait โ€” the maximum number of seconds to wait before the change. โณ
  • callback โ€” a callback function. It gets called with a single value, progress, which is a percentage value from 0-100. ๐Ÿ“ž

Returns The resource is returned on success. ๐Ÿ’–

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if transition to delete failed to occur in the specified seconds. ๐Ÿ˜ญ


โœจ Cluster API โœจ

๐Ÿซถ The Cluster Class ๐Ÿซถ

The cluster high-level interface is available through the cluster member of a Connection <#openstack.connection.Connection> object. The cluster member will only be added if the service is detected. ๐Ÿ”


๐Ÿ› ๏ธ Build Info Operations ๐Ÿ› ๏ธ

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐ŸŒŸ get_build_info() ๐ŸŒŸ

Get build info for service engine and API. ๐Ÿงš

Returns A dictionary containing the API and engine revision string. ๐Ÿ“š


๐Ÿฆ‹ Profile Type Operations ๐Ÿฆ‹

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿ’œ profile_types(**query) ๐Ÿ’œ

Get a generator of profile types. โœจ

Returns A generator of objects that are of type ProfileType <#openstack.clustering.v1.profile_type.ProfileType>. ๐ŸŽ€

๐Ÿ’œ get_profile_type(profile_type) ๐Ÿ’œ

Get the details about a profile type. ๐Ÿ”Ž

Parameters

  • profile_type โ€” the name of the profile_type to retrieve, or an object of ProfileType <#openstack.clustering.v1.profile_type.ProfileType>. ๐Ÿซถ

Returns A ProfileType <#openstack.clustering.v1.profile_type.ProfileType> object. ๐ŸŒธ

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no profile_type matching the name could be found. ๐Ÿ’€


๐ŸŒˆ Profile Operations ๐ŸŒˆ

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐ŸŒŸ create_profile(**attrs) ๐ŸŒŸ

Create a new profile from attributes. ๐Ÿ› ๏ธ

Parameters

  • attrs โ€” keyword arguments that will be used to create a Profile <#openstack.clustering.v1.profile.Profile>, it is comprised of the properties on the Profile class. ๐Ÿงต

Returns The results of profile creation. ๐ŸŽ‰

๐ŸŒŸ delete_profile(profile, ignore_missing=True) ๐ŸŒŸ

Delete a profile. ๐Ÿ—‘๏ธ

Parameters

  • profile โ€” the value can be either the name or ID of a profile, or a Profile <#openstack.clustering.v1.profile.Profile> instance. ๐Ÿซถ
  • ignore_missing โ€” when set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the profile could not be found. When set to True, no exception will be raised when attempting to delete a non-existent profile. ๐Ÿ™ˆ

Returns None ๐Ÿ’…

๐ŸŒŸ find_profile(name_or_id, ignore_missing=True) ๐ŸŒŸ

Find a single profile. ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a profile. ๐Ÿท๏ธ
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. ๐ŸŒ™

Returns One Profile <#openstack.clustering.v1.profile.Profile> object or None. ๐ŸŽ€

๐ŸŒŸ get_profile(profile) ๐ŸŒŸ

Get a single profile. โœจ

Parameters

  • profile โ€” the value can be the name or ID of a profile, or a Profile <#openstack.clustering.v1.profile.Profile> instance. ๐Ÿซถ

Returns One Profile <#openstack.clustering.v1.profile.Profile>. ๐Ÿ’–

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no profile matching the criteria could be found. ๐Ÿ˜ญ

๐ŸŒŸ profiles(**query) ๐ŸŒŸ

Retrieve a generator of profiles. ๐ŸŒŠ

Parameters

  • query โ€” optional query parameters to be sent to restrict the profiles to be returned. Available parameters include:
    • name: the name of a profile. ๐Ÿท๏ธ
    • type: the type name of a profile. ๐Ÿงš
    • metadata: a list of key-value pairs that are associated with a profile. ๐Ÿ—‚๏ธ
    • sort: a list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier which can be asc or desc. ๐Ÿ”€
    • limit: requests a specified size of returned items from the query. Returns a number of items up to the specified limit value. ๐Ÿ”ข
    • marker: specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request. ๐Ÿ“
    • global_project: a boolean value indicating whether profiles from all projects will be returned. ๐ŸŒ

Returns A generator of profile instances. ๐Ÿฆ‹

๐ŸŒŸ update_profile(profile, **attrs) ๐ŸŒŸ

Update a profile. ๐Ÿ”ง

Parameters

  • profile โ€” either the name or the ID of the profile, or an instance of Profile <#openstack.clustering.v1.profile.Profile>. ๐Ÿซถ
  • attrs โ€” the attributes to update on the profile represented by the value parameter. โœจ

Returns The updated profile. ๐Ÿ’…

๐ŸŒŸ validate_profile(**attrs) ๐ŸŒŸ

Validate a profile spec. โœ…

Parameters

  • attrs โ€” keyword arguments that will be used to create a ProfileValidate, it is comprised of the properties on the Profile class. ๐Ÿงต

Returns The results of profile validation. ๐ŸŽ€


๐Ÿ‘‘ Policy Type Operations ๐Ÿ‘‘

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

โญ policy_types(**query) โญ

Get a generator of policy types. ๐ŸŒˆ

Returns A generator of objects that are of type PolicyType <#openstack.clustering.v1.policy_type.PolicyType>. ๐Ÿ’–

โญ get_policy_type(policy_type) โญ

Get the details about a policy type. ๐Ÿ”Ž

Parameters

  • policy_type โ€” the name of a poicy_type or an object of PolicyType <#openstack.clustering.v1.policy_type.PolicyType>. ๐Ÿซถ

Returns A PolicyType <#openstack.clustering.v1.policy_type.PolicyType> object. ๐ŸŽ€

Raises NotFoundException when no policy_type matching the name could be found. ๐Ÿ˜ญ That's the whole mood โ€” if it's not there, it's not there, and the SDK will respectfully tell you so.


โœจ Policy Operations โœจ

Okay bestie, deep breath, because the constructor on this one is long โ€” but it's the same flavour of constructor every proxy in this file uses, so once you've read it once you've read it a hundred times. Here it is, character for character, no cap:

class openstack.clustering.v1._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Slay. Now the actual methods ๐Ÿ’…

create_policy(**attrs)

Create a new policy from attributes. Fresh policy, brand new, main character energy โœจ

Parameters

  • attrs โ€” Keyword arguments that will be used to create a Policy, it is comprised of the properties on the Policy class.

Returns

The results of policy creation.


delete_policy(policy, ignore_missing=True)

Delete a policy. Bye bestie ๐Ÿซถ

Parameters

  • policy โ€” The value can be either the name or ID of a policy or a Policy instance.
  • ignore_missing โ€” When set to False, an exception NotFoundException will be raised when the policy could not be found. When set to True, no exception will be raised when attempting to delete a non-existent policy.

Returns

None


find_policy(name_or_id, ignore_missing=True)

Find a single policy. Just the one. One (1) policy, please ๐Ÿ™ˆ

Parameters

  • name_or_id โ€” The name or ID of a policy.
  • ignore_missing โ€” When set to False NotFoundException will be raised when the specified policy does not exist. When set to True, None will be returned when attempting to find a nonexistent policy.

Returns

A policy object or None.


get_policy(policy)

Get a single policy. The way this one *fetches*โ€ฆ obsessed ๐Ÿ’–

Parameters

  • policy โ€” The value can be the name or ID of a policy or a Policy instance.

Returns

A policy object.

Raises NotFoundException when no policy matching the criteria could be found.


policies(**query)

Retrieve a generator of policies. Generator = it hands you items one at a time as you loop, so you're not waiting on the whole list to load. Iconic behaviour, honestly ๐Ÿฆ‹

Parameters

  • query โ€” Optional query parameters to be sent to restrict the policies to be returned. Available parameters include:
    • name: The name of a policy.
    • type: The type name of a policy.
    • sort: A list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier which can be asc or desc.
    • limit: Requests a specified size of returned items from the query. Returns a number of items up to the specified limit value.
    • marker: Specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
    • global_project: A boolean value indicating whether policies from all projects will be returned.

Returns

A generator of policy instances.


update_policy(policy, **attrs)

Update a policy. Glow-up time ๐Ÿ”ฅ

Parameters

  • policy โ€” Either the name or the ID of a policy, or an instance of Policy.
  • attrs โ€” The attributes to update on the policy represented by the value parameter.

Returns

The updated policy.


validate_policy

That's it. That's the whole entry. No parameters, no returns, no extra lore โ€” literally just validate_policy sitting there being mysterious ๐Ÿ’€ Don't @ me, that's what's in the source.


๐ŸŽ€ Cluster Operations ๐ŸŽ€

Same constructor, same vibes, different resource. Behold:

class openstack.clustering.v1._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_cluster(**attrs)

Create a new cluster from attributes. New cluster just dropped ๐ŸŒธ

Parameters

  • attrs โ€” Keyword arguments that will be used to create a Cluster, it is comprised of the properties on the Cluster class.

Returns

The results of cluster creation.


delete_cluster(cluster, ignore_missing=True, force_delete=False)

Delete a cluster. Note the extra flag here, bestie โ€” that force_delete is doing heavy lifting ๐Ÿ‘‘

Parameters

  • cluster โ€” The value can be either the name or ID of a cluster or a Cluster instance.
  • ignore_missing โ€” When set to False, an exception NotFoundException will be raised when the cluster could not be found. When set to True, no exception will be raised when attempting to delete a non-existent cluster.
  • force_delete โ€” When set to True, the cluster deletion will be forced immediately.

Returns

The instance of the Cluster which was deleted.

โš ๏ธ Heads up: force_delete forces the deletion immediately. That's not a gentle nudge, that's a yeet. Make sure that's actually what you want ๐Ÿ’€

find_cluster(name_or_id, ignore_missing=True)

Find a single cluster. Sherlock mode ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of a cluster.
  • ignore_missing โ€” When set to False NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns

One Cluster object or None


get_cluster(cluster)

Get a single cluster. Lowkey the simplest one here ๐Ÿ’œ

Parameters

  • cluster โ€” The value can be the name or ID of a cluster or a Cluster instance.

Returns

One Cluster

Raises NotFoundException when no cluster matching the criteria could be found.


clusters(**query)

Retrieve a generator of clusters. Same generator deal as before โ€” one at a time, no stress โœจ

Parameters

  • query โ€” Optional query parameters to be sent to restrict the clusters to be returned. Available parameters include:
    • name: The name of a cluster.
    • status: The current status of a cluster.
    • sort: A list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier which can be asc or desc.
    • limit: Requests a specified size of returned items from the query. Returns a number of items up to the specified limit value.
    • marker: Specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
    • global_project: A boolean value indicating whether clusters from all projects will be returned.

Returns

A generator of cluster instances.


update_cluster(cluster, **attrs)

Update a cluster. Give it a little refresh ๐Ÿ’…

Parameters

  • cluster โ€” Either the name or the ID of the cluster, or an instance of Cluster.
  • attrs โ€” The attributes to update on the cluster represented by the cluster parameter.

Returns

The updated cluster.


add_nodes_to_cluster(cluster, nodes)

Add nodes to a cluster. Growing the squad ๐ŸŒˆ

Parameters

  • nodes โ€” the list of nodes you're adding in ๐Ÿซถ

Returns โ€” a dict holding the action this operation kicked off. โœจ


remove_nodes_from_cluster(cluster, nodes, **params)

Bye bestie ๐Ÿ‘‹ โ€” this one takes nodes out of a cluster.

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • nodes โ€” list of nodes to be removed from the cluster.
  • params โ€” optional query parameters sent along to restrict the nodes to be returned. The available ones include:
    • destroy_after_deletion: a boolean value indicating whether the deleted nodes get destroyed right away ๐Ÿ’€

Returns โ€” a dict containing the action initiated by this operation.


replace_nodes_in_cluster(cluster, nodes)

Swaps the nodes in a cluster out for the specified ones โ€” out with the old, in with the new ๐Ÿ”

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • nodes โ€” list of nodes to be deleted/added to the cluster.

Returns โ€” a dict containing the action initiated by this operation.


scale_out_cluster(cluster, count=None)

Inflates the size of a cluster. Bigger. More. Go off ๐Ÿ‘‘๐Ÿ“ˆ

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • count โ€” optional parameter specifying the number of nodes to be added.

Returns โ€” a dict containing the action initiated by this operation.


scale_in_cluster(cluster, count=None)

Shrinks the size of a cluster. It's giving minimalism ๐ŸŽ€

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • count โ€” optional parameter specifying the number of nodes to be removed.

Returns โ€” a dict containing the action initiated by this operation.


resize_cluster(cluster, **params)

Resize of cluster. Lowkey the glow-up button ๐Ÿฆ‹

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • params โ€” a dictionary providing the parameters for the resize action.

Returns โ€” a dict containing the action initiated by this operation.


attach_policy_to_cluster(cluster, policy, **params)

Binds a policy onto a cluster. It's official now ๐Ÿ’

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • policy โ€” either the name or the ID of a policy.
  • params โ€” a dictionary containing the properties for the policy to be attached.

Returns โ€” a dict containing the action initiated by this operation.


detach_policy_from_cluster(cluster, policy)

Unbinds a policy from a cluster. We don't gatekeep ๐Ÿซถ

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • policy โ€” either the name or the ID of a policy.

Returns โ€” a dict containing the action initiated by this operation.


update_cluster_policy(cluster, policy, **attrs)

Changes the properties of a policy that's bound to the cluster โ€” a lil makeover for the policy โœจ๐Ÿ’…

Parameters

  • cluster โ€” either the name or the ID of the cluster, or an instance of Cluster (openstack.clustering.v1.cluster.Cluster).
  • policy โ€” either the name or the ID of a policy.
  • attrs โ€” a dictionary containing the new properties for the policy.

Returns โ€” a dict containing the action initiated by this operation.


collect_cluster_attrs(cluster, path, **query)

Collects attribute values across a whole cluster โ€” like a vibe check but for attributes ๐Ÿ”

Parameters

  • cluster โ€” the value can be either the ID of a cluster or a Cluster (openstack.clustering.v1.cluster.Cluster) instance.
  • path โ€” a Json path string specifying the attribute to collect.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a dictionary containing the list of attribute values.


check_cluster(cluster, **params)

Checks a cluster. Wellness check time ๐Ÿฉบ

Parameters

  • cluster โ€” the value can be either the ID of a cluster or a Cluster (openstack.clustering.v1.cluster.Cluster) instance.
  • params โ€” a dictionary providing the parameters for the check action.

Returns โ€” a dictionary containing the action ID.


recover_cluster(cluster, **params)

recover a cluster. Healing era ๐ŸŒˆ

Parameters

  • cluster โ€” the value can be either the ID of a cluster or a Cluster (openstack.clustering.v1.cluster.Cluster) instance.
  • params โ€” a dictionary providing the parameters for the recover action.

Returns โ€” a dictionary containing the action ID.


perform_operation_on_cluster(cluster, operation, **params)

Performs an operation on the specified cluster โ€” whatever operation you name, it does the thing ๐Ÿ”ฅ

Parameters

  • cluster โ€” the value can be either the ID of a cluster or a Cluster (openstack.clustering.v1.cluster.Cluster) instance.
  • operation โ€” a string specifying the operation to be performed.
  • params โ€” a dictionary providing the parameters for the operation.

Returns โ€” a dictionary containing the action ID.


cluster_policies(cluster, **query)

Grabs you a generator of cluster-policy bindings โ€” the whole roster, bestie ๐Ÿ“‹

Parameters

  • cluster โ€” the value can be the name or ID of a cluster or a Cluster (openstack.clustering.v1.cluster.Cluster) instance.
  • query โ€” optional query parameters to be sent to restrict the policies to be returned. The available ones include:
    • enabled: a boolean value indicating whether the policy is enabled on the cluster.

Returns โ€” a generator of cluster-policy binding instances.


get_cluster_policy(cluster_policy, cluster)

Gets one specific cluster-policy binding. The main character of bindings ๐Ÿ‘‘

Parameters

  • cluster_policy โ€” the value can be the name or ID of a policy or a Policy (openstack.clustering.v1.policy.Policy) instance.
  • cluster โ€” the value can be the name or ID of a cluster or a Cluster (openstack.clustering.v1.cluster.Cluster) instance.

Returns โ€” a cluster-policy binding object.

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no cluster-policy binding matching the criteria could be found. ๐Ÿ˜ญ


๐ŸŒธ Node Operations ๐ŸŒธ

Okay so real talk, this is the same Proxy class, just the node-flavoured half of it. Same constructor args, same everything, no cap:

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_node(**attrs)

Creates a brand-new node out of attributes. Birth of a node, iconic ๐ŸŽ€โญ

Parameters

  • attrs โ€” keyword arguments that will be used to create a Node (openstack.clustering.v1.node.Node); it's comprised of the properties on the Node class.

Returns โ€” the results of node creation.


delete_node(node, ignore_missing=True, force_delete=False)

Deletes a node.

  • node โ€” literally just the name or ID of a node, or a whole Node instance, whichever you vibe with ๐Ÿซถ
  • ignore_missing โ€” if you set this to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the node can't be found. Set it to True and nobody panics when you try to delete a node that straight-up doesn't exist ๐Ÿ’€
  • force_delete โ€” set to True and the node deletion gets forced immediately, no waiting around โœจ

Returns The instance of the Node which was deleted. Slay.


find_node(name_or_id, ignore_missing=True)

Find a single node. Just the one. Your main character node ๐Ÿ‘‘

Parameters

  • name_or_id โ€” the name or ID of a node.
  • ignore_missing โ€” when set to "False", NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the specified node doesn't exist. When set to "True", None will be returned when attempting to find a nonexistent policy ๐Ÿ™ˆ

Returns One Node <#openstack.clustering.v1.node.Node> object or None.


get_node(node, details=False)

Get a single node โ€” lowkey the same energy as find_node but with a lil extra.

Parameters

  • node โ€” the value can be the name or ID of a node or a Node <#openstack.clustering.v1.node.Node> instance.
  • details โ€” an optional argument that says whether the server should return more details when retrieving the node data ๐Ÿ‘€

Returns One Node <#openstack.clustering.v1.node.Node>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no node matching the name or ID could be found. That's it, that's the vibe check.


nodes(**query)

Retrieve a generator of nodes. A whole generator, not a list โ€” bestie's efficient like that ๐Ÿ’…

Parameters

query โ€” optional query parameters sent along to restrict which nodes come back. The available ones are:

  • cluster_id: a string including the name or ID of a cluster that the resulted node(s) is a member of.
  • name: the name of a node.
  • status: the current status of a node.
  • sort: a list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier, which can be asc or desc.
  • limit: requests at most the specified number of items be returned from the query.
  • marker: specifies the ID of the last-seen node. Use the limit parameter to make an initial limited request, then use the ID of the last-seen node from the response as the marker parameter value in a subsequent limited request. Paging, but make it cute โœจ
  • global_project: a boolean value indicating whether nodes from all projects will be returned.

Returns A generator of node instances. Obsessed.


update_node(node, **attrs)

Update a node. Glow-up time ๐Ÿ’–

Parameters

  • node โ€” either the name or the ID of the node, or an instance of Node <#openstack.clustering.v1.node.Node>.
  • attrs โ€” the attributes to update on the node represented by the node parameter.

Returns The updated node. Iconic.


check_node(node, **params)

Check the health of the specified node. Doctor's appointment, but for infrastructure ๐Ÿฉบ

Parameters

  • node โ€” the value can be either the ID of a node or a Node <#openstack.clustering.v1.node.Node> instance.
  • params โ€” a dictionary providing the parametes to the check action. (Yes, "parametes" โ€” that's literally how the docs spell it, I'm not fixing it, character for character bestie ๐Ÿ˜ญ)

Returns A dictionary containing the action ID.


recover_node(node, **params)

Recover the specified node into healthy status. Healing arc ๐ŸŒˆ

Parameters

  • node โ€” the value can be either the ID of a node or a Node <#openstack.clustering.v1.node.Node> instance.
  • params โ€” a dict supplying parameters to the recover action.

Returns A dictionary containing the action ID.


adopt_node(preview=False, **attrs)

Adopting an existing resource as a node. Found family trope, honestly ๐Ÿซถ

Parameters

  • preview โ€” a boolean indicating whether this is a "preview" operation, which means only the profile to be used is returned rather than creating a node object using that profile.
  • attrs โ€” keyword parameters for node adoption. Valid parameters include:
    • type: (Required) a string containing the profile type and version to be used for node adoption. For example, os.nova.sever-1.0.
    • identity: (Required) a string including the name or ID of an OpenStack resource to be adopted as a Senlin node.
    • name: (Optional) the name of node to be created. Omitting this parameter will have the node named automatically.
    • snapshot: (Optional) a boolean indicating whether a snapshot of the target resource should be created if possible. Default is False.
    • metadata: (Optional) a dictionary of arbitrary key-value pairs to be associated with the adopted node.
    • overrides: (Optional) a dictionary of key-value pairs to be used to override attributes derived from the target resource.

Returns The result of node adoption. If preview is set to False (default โ€” that's the default btw), returns a Node <#openstack.clustering.v1.node.Node> object, otherwise a Dict is returned containing the profile to be used for the new node. Two different returns, iykyk ๐Ÿ’ซ


perform_operation_on_node(node, operation, **params)

Perform an operation on the specified node. Whatever operation. Go off ๐Ÿ’…

Parameters

  • node โ€” the value can be either the ID of a node or a Node <#openstack.clustering.v1.node.Node> instance.
  • operation โ€” a string specifying the operation to be performed.
  • params โ€” a dictionary providing the parameters for the operation.

Returns A dictionary containing the action ID.


๐ŸŽ€ Receiver Operations ๐ŸŽ€

Here she is โ€” the whole Proxy class, every single keyword arg, no skips, no cap ๐Ÿ‘‘

class openstack.clustering.v1._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_receiver(**attrs)

Create a new receiver from attributes. Fresh out the box ๐Ÿ“ฆ

Parameters

attrs โ€” keyword arguments that will be used to create a Receiver <#openstack.clustering.v1.receiver.Receiver>. It's comprised of the properties on the Receiver class.

Returns The results of receiver creation. Ate.


update_receiver(receiver, **attrs)

Update a receiver.

Parameters

  • receiver โ€” the value can be either the name or ID of a receiver or a Receiver <#openstack.clustering.v1.receiver.Receiver> instance.
  • attrs โ€” the attributes to update on the receiver parameter. Valid attribute names include name, action and params.

Returns The updated receiver.


delete_receiver(receiver, ignore_missing=True)

Delete a receiver. Bye bestie ๐Ÿ‘‹

Parameters

  • receiver โ€” the value can be either the name or ID of a receiver or a Receiver <#openstack.clustering.v1.receiver.Receiver> instance.
  • ignore_missing โ€” when set to False, an exception NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the receiver could not be found. When set to True, no exception will be raised when attempting to delete a non-existent receiver.

Returns None


find_receiver(name_or_id, ignore_missing=True)

Find a single receiver.

Parameters

  • name_or_id โ€” the name or ID of a receiver.
  • ignore_missing โ€” set this to False and boom, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised the second the receiver you're looking for isn't there. Set it to True instead and you just get None back when it can't find a nonexistent receiver. โœจ

Returns โ€” a receiver object, or None. ๐Ÿซถ

get_receiver(receiver)

Get one (1) single receiver, bestie.

Parameters

  • receiver โ€” this can be the name or the ID of a receiver, or you can straight up hand it a Receiver <#openstack.clustering.v1.receiver.Receiver> instance.

Returns โ€” a receiver object. ๐Ÿ’–

Raises NotFoundException <#openstack.exceptions.NotFoundException> when there's literally no receiver matching what you asked for. ๐Ÿ˜ญ

receivers(**query)

Retrieve a generator of receivers.

Parameters

  • query โ€”

Optional query parameters for restricting which receivers come back. The available ones include:

  • name: the name of a receiver object.
  • type: the type of receiver objects.
  • cluster_id: the ID of the associated cluster.
  • action: the name of the associated action.
  • sort: a list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier, which can be asc or desc.
  • global_project: a boolean value indicating whether receivers
  • from all projects will be returned.

Returns โ€” a generator of receiver instances. ๐ŸŒˆ


๐Ÿ”ฅ Action Operations ๐Ÿ”ฅ

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_action(action)

Get a single action. Just the one. ๐Ÿ’…

Parameters

  • action โ€” the value can be the name or ID of an action, or a Action <#openstack.clustering.v1.action.Action> instance.

Returns โ€” an action object. โญ

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no action matching the criteria could be found. ๐Ÿ’€

actions(**query)

Retrieve a generator of actions.

Parameters

  • query โ€”

Optional query parameters to be sent to restrict which actions come back. The available ones include:

  • name: name of action for query.
  • target: ID of the target object for which the actions should be returned.
  • action: built-in action types for query.
  • sort: a list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier, which can be asc or desc.
  • limit: requests a specified size of returned items from the query. Returns a number of items up to the specified limit value.
  • marker: specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request, then use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request. iykyk ๐ŸŒ€

Returns โ€” a generator of action instances. ๐Ÿฆ‹


๐ŸŒธ Event Operations ๐ŸŒธ

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_event(event)

Get a single event, no cap. ๐Ÿ‘‘

Parameters

  • event โ€” the value can be the name or ID of an event, or a Event <#openstack.clustering.v1.event.Event> instance.

Returns โ€” an event object. ๐ŸŽ€

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no event matching the criteria could be found. ๐Ÿ™ˆ

events(**query)

Retrieve a generator of events.

Parameters

  • query โ€”

Optional query parameters to be sent to restrict which events come back. The available ones include:

  • obj_name: name string of the object associated with an event.
  • obj_type: type string of the object related to an event. The value can be cluster, node, policy etc.
  • obj_id: ID of the object associated with an event.
  • cluster_id: ID of the cluster associated with the event, if any.
  • action: name of the action associated with an event.
  • sort: a list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier, which can be asc or desc.
  • limit: requests a specified size of returned items from the query. Returns a number of items up to the specified limit value.
  • marker: specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request, then use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
  • global_project: a boolean specifying whether events from all projects should be returned. Heads up bestie โ€” this option is subject to access control checking. ๐Ÿ”

Returns โ€” a generator of event instances. โœจ


๐Ÿงš Helper Operations ๐Ÿงš

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

wait_for_status(res, status, failures=None, interval=2, wait=None, attribute='status', callback=None)

Wait for the resource to be in a particular status. It's giving "are we there yet" but make it infrastructure. ๐Ÿš—๐Ÿ’จ

Parameters

  • session โ€” the session to use for making this request.
  • resource โ€” the resource to wait on to reach the status. The resource must have a status attribute specified via attribute.
  • status โ€” desired status of the resource.
  • failures โ€” statuses that would indicate the transition failed, such as 'ERROR'. Defaults to ['ERROR'].
  • interval โ€” number of seconds to wait between checks.
  • wait โ€” maximum number of seconds to wait for transition. Set to None to wait forever. ๐Ÿ˜ณ
  • attribute โ€” name of the resource attribute that contains the status.
  • callback โ€” a callback function. This will be called with a single value, progress. This is API specific but is generally a percentage value from 0-100. ๐Ÿ“ˆ

Returns โ€” the updated resource. ๐Ÿ’œ

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to status failed to occur in wait seconds. โฐ

Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if the resource transitioned to one of the states in failures. ๐Ÿ’€

Raises AttributeError if the resource does not have a status attribute. ๐Ÿซ 

wait_for_delete(res, interval=2, wait=120, callback=None) โ€” okay so this one just waits for a resource to be yeeted into the void. Patience is the vibe ๐Ÿ’…

Parameters:

  • res โ€” the resource you're waiting on to be deleted. like, "please be gone bestie" ๐Ÿซถ
  • interval โ€” how many seconds to wait between two consecutive checks.
  • wait โ€” the max number of seconds to wait before the change happens.
  • callback โ€” a callback function ๐Ÿ’– it gets called with a single value, progress, which is a percentage value from 0-100.

Returns: the resource is returned on success, slay.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to delete failed to occur in the specified seconds. so like, if the deletion ghosted you entirely ๐Ÿ˜ญ set your wait higher, ngl.


๐ŸŽ€ Service Operations ๐ŸŽ€

class openstack.clustering.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

services(**query) โ€” get a generator of services. that's it, that's the whole function, main character energy ๐Ÿ‘‘

Returns: a generator of objects that are of type Service.


๐Ÿ’ป Compute API ๐Ÿ’ป

For the full tea on how to use compute, see Using OpenStack Compute <>. ๐Ÿ”ฅ

๐Ÿ–ฅ๏ธ The Compute Class ๐Ÿ–ฅ๏ธ

The compute high-level interface is available through the compute member of a Connection <#openstack.connection.Connection> object. Heads up though: the compute member only gets added if the service is actually detected. so if it's not there, it's not being shady, the service just isn't there bestie ๐Ÿ™ˆ

๐ŸŒธ Server Operations ๐ŸŒธ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_server(**attrs) โ€” spin up a brand new server from attributes. iconique โœจ

Parameters:

  • attrs โ€” keyword arguments which will be used to create a Server <#openstack.compute.v2.server.Server>, comprised of the properties on the Server class.

Returns: the results of server creation ๐ŸŽ€


delete_server(server, ignore_missing=True, force=False) โ€” delete a server. bye bestie ๐Ÿ’€

Parameters:

  • server โ€” the value can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the server does not exist. When set to True, no exception will be set when attempting to delete a nonexistent server.
  • force โ€” when set to True, the server deletion will be forced immediately. like ripping off the bandaid ๐Ÿ”ฅ

Returns: None


find_server(name_or_id, ignore_missing=True, *, details=True, all_projects=False) โ€” find a single server. detective mode ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters:

  • name_or_id โ€” the name or ID of a server.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • details โ€” when set to False, instances with only basic data will be returned. The default, True, will cause instances with full data to be returned.
  • all_projects โ€” when set to True, search for server by name across all projects. Note that this will likely result in a higher chance of duplicates. Admin-only by default, so like, don't try it if you're not admin ๐Ÿ’…

Returns: one Server <#openstack.compute.v2.server.Server> or None

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. (yup, that's the duplicate situation we literally just warned you about ๐Ÿ˜ญ)


get_server(server) โ€” get a single server.

Parameters:

  • server โ€” the value can be the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: one Server <#openstack.compute.v2.server.Server>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


servers(details=True, all_projects=False, **query) โ€” retrieve a generator of servers. all of them. every single one ๐Ÿฆ‹

Parameters:

  • details โ€” when set to False, instances with only basic data will be returned. The default, True, will cause instances with full data to be returned.
  • all_projects โ€” when set to True, lists servers from all projects. Admin-only by default.
  • query โ€” optional query parameters to be sent to limit the servers being returned. available parameters can be seen under <https://docs.openstack.org/api-ref/compute/#list-servers> ๐Ÿ‘‘

Returns: a generator of server instances.


update_server(server, **attrs) โ€” update a server. glow-up time โœจ

Parameters:

  • server โ€” either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • attrs โ€” the attributes to update on the server represented by server.

Returns: the updated server.


create_server_image(server, name, metadata=None, wait=False, timeout=120) โ€” create an image from a server. turning your server into a whole photoshoot ๐Ÿ“ธ

Parameters:

  • server โ€” either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • name โ€” the name of the image to be created.
  • metadata โ€” a dictionary of metadata to be set on the image.

Returns: Image <#openstack.image.v2.image.Image> object.


backup_server(server, name, backup_type, rotation, *, wait=False, timeout=120) โ€” backup a server. safety first, always ๐Ÿซถ

Parameters:

  • server โ€” either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • name โ€” the name of the backup image.
  • backup_type โ€” the type of the backup, for example, daily.
  • rotation โ€” the rotation of the back up image, the oldest image will be removed when image count exceed the rotation count.
  • wait (bool) โ€” if True, waits for image to reach active status before returning.
  • timeout (int) โ€” the maximum number of seconds to wait for the image to become active when wait is True.

Returns: Image <#openstack.image.v2.image.Image> object.


get_server_metadata(server) โ€” return a dictionary of metadata for a server.

Deprecated since version 4.14.0: use fetch_server_metadata() instead. like, it still works but it's giving legacy, ok? move on bestie ๐Ÿ’€

set_server_metadata(server, **metadata) โ€” update metadata for a server.

Parameters:

  • server โ€” either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • metadata โ€” key/value pairs to be updated in the server's metadata. no other metadata is modified by this call. so it's surgical, not chaotic ๐Ÿ’…

Returns: a Server <#openstack.compute.v2.server.Server> with only the server's metadata.


delete_server_metadata(server, keys=None) โ€” delete metadata for a server.

Note: this method will do a HTTP DELETE request for every key in keys. like one request per key, fr fr, so don't hand it a hundred keys and then act surprised ๐Ÿ˜ญ

Parameters:

  • server โ€” either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • keys โ€” the keys to delete. If omitted, all metadata is removed. all of it. gone. ๐Ÿงน

Returns: None


wait_for_server(server, status='ACTIVE', failures=None, interval=2, wait=120, callback=None) โ€” wait for a server to be in a particular status. the classic "is it up yet" moment ๐ŸŒˆ

Parameters:

  • server (Server) โ€” the actual Server you're waiting on to hit that status. Like, the whole point of the call ๐Ÿ’…
  • status (str) โ€” the status you want it to reach.
  • failures (list) โ€” a list of statuses that count as an L, i.e. if the server lands on any of these, it's a fail.
  • interval (int) โ€” how many seconds to wait between two consecutive checks. Defaults to 2.
  • wait โ€” max number of seconds to wait before the change happens. Defaults to 120.
  • callback (callable) โ€” a callback function. It gets called with a single value, progress, which is a percentage from 0-100. So cute for progress bars ๐ŸŽ€

Returns

The resource comes back to you on success. ๐Ÿซถ

Raises ResourceTimeout if the transition to the desired status didn't happen within the seconds you specified. Yeah, it gave up on you.

Raises ResourceFailure if the resource has transited into one of the failure statuses. Oop.

Raises AttributeError if the resource doesn't even have a status attribute. Not the resource being mysterious, just the resource being broken ๐Ÿ˜ญ


๐ŸŒ Network Actions ๐ŸŒ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

fetch_server_security_groups(server)

Fetches the security groups for a server, with details. Bestie, the details are the whole point.

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

an updated Server instance. Slay.


add_security_group_to_server(server, security_group)

Adds a security group to a server. Giving it a lil outfit โœจ

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • security_group โ€” either the ID or name of a security group, or a SecurityGroup instance.

Returns

None


remove_security_group_from_server(server, security_group)

Removes a security group from a server. Taking the outfit back, no hard feelings ๐Ÿ’…

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • security_group โ€” either the ID or name of a security group, or a SecurityGroup instance.

Returns

None


add_fixed_ip_to_server(server, network)

Adds a fixed IP address to a server instance. A permanent little address, iconic.

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • network โ€” the ID, or a Network instance, of the network from which a fixed IP address is about to be allocated.

Returns

None


remove_fixed_ip_from_server(server, address)

Removes a fixed IP address from a server instance. Bye girl ๐Ÿ‘‹

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • address โ€” the fixed IP address to be disassociated from the server.

Returns

None


add_floating_ip_to_server(server, address, fixed_address=None)

Adds a floating IP address to a server instance. Floating! Very main character energy ๐ŸŒˆ

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • address โ€” the floating IP address to be added to the server.
  • fixed_address โ€” the fixed IP address to be associated with the floating IP address. Used when the server is connected to multiple networks. Like, specify which one, bestie.

Returns

None


remove_floating_ip_from_server(server, address)

Removes a floating IP address from a server instance. Floating no more ๐Ÿฆ‹

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • address โ€” the floating IP address to be disassociated from the server.

Returns

None


๐Ÿ”ฅ Starting, Stopping, etc. ๐Ÿ”ฅ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

reboot_server(server, reboot_type)

Reboots a server. The classic turn-it-off-and-on-again, but make it cloud โ˜๏ธ

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • reboot_type โ€” the type of reboot to perform. "HARD" and "SOFT" are the current options. That's it, those are the two.

Returns

None


pause_server(server)

Pauses a server and changes its status to PAUSED. Time out, bestie, take a breather ๐Ÿงš

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

None


unpause_server(server)

Unpauses a paused server and changes its status to ACTIVE. Welcome back, we missed you ๐Ÿ’–

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

None


suspend_server(server)

Suspends a server and changes its status to SUSPENDED. Not a pause โ€” an actual suspend, okay, they're different ๐Ÿ˜ญ

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

None


resume_server(server)

Resumes a suspended server and changes its status to ACTIVE. And we're back, periodt ๐Ÿ”ฅ

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

None


lock_server(server, locked_reason=None)

Locks a server. Nobody touches her, she's booked and busy ๐Ÿ”’

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • locked_reason โ€” the reason behind locking the server. Limited to 255 characters in length. Keep it short, it's not a notes app.

Returns

None


unlock_server(server)

Unlocks a locked server. Free her ๐Ÿ’…

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

None


rescue_server(server, admin_pass=None, image=None)

Puts a server in rescue mode and changes its status to RESCUE. Not a glow-up โ€” a rescue ๐Ÿš‘

Parameters

  • server โ€” either the ID of a server or a Server instance.
  • admin_pass โ€” the password for the rescued server. If you omit this parameter, the operation generates a new password. So like, don't panic if you skip it.
  • image โ€” the image reference to use to rescue your server. This can be the image ID or its full URL. If you omit this parameter, the base image reference will be used.

Returns

None


unrescue_server(server)

Unrescues a server and changes its status to ACTIVE. She's healed ๐Ÿ’–

Parameters

  • server โ€” either the ID of a server or a Server instance.

Returns

None


evacuate_server(server, host=None, admin_pass=None, force=None, *, on_shared_storage=None)

Evacuates a server from a failed host to a new host. Moving day, but make it emergency ๐Ÿƒโ€โ™€๏ธ

Lowkey dramatic: this one is for when a host has failed.

Parameters

  • server โ€” either the ID of a server or a Server instance.

Still in the same server-move moment โ€” hereโ€™s the rest of the param tea:

  • host โ€” An optional parameter specifying the name or ID of the host to which the server is evacuated.
  • admin_pass โ€” An optional parameter specifying the administrative password to access the evacuated or rebuilt server.
  • force โ€” Force an evacuation by not verifying the provided destination host by the scheduler. (New in API version 2.29).
  • on_shared_storage โ€” Whether the host is using shared storage. (Optional) (Only supported before API version 2.14)

Returns: None

๐Ÿฆ‹ start_server(server)

Starts a stopped server and changes its state to ACTIVE. Literally waking the poor thing up.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: None

๐ŸŒธ stop_server(server)

Stops a running server and changes its state to SHUTOFF. Nap time, served.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: None

๐ŸŽ€ restore_server(server)

Restore a soft-deleted server. Bringing it back from the soft-delete void, no cap.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: None

๐Ÿ’œ shelve_server(server)

Shelves a server.

All associated data and resources are kept but anything still in memory is not retained. Policy defaults enable only users with administrative role or the owner of the server to perform this operation. Cloud provides could change this permission though.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: None

โœจ unshelve_server(server, *, host=None, availability_zone=Unset.UNSET)

Unshelves or restores a shelved server.

Policy defaults enable only users with administrative role or the owner of the server to perform this operation. Cloud provides could change this permission though.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • host โ€” An optional parameter specifying the name the compute host to unshelve to. (New in API version 2.91).

Returns: None

๐ŸŒˆ migrate_server(server, *, host=None)

Migrate a server from one host to another. Moving day, but make it cloud.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • host โ€” The host to which to migrate the server.

Returns: None

๐Ÿ”ฅ live_migrate_server(server, host=None, force=False, block_migration=None, disk_over_commit=None)

Live migrate a server from one host to target host. Yes, live โ€” the server stays up while it moves, iconic behavior.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • host โ€” The host to which to migrate the server. If the Nova service is too old, the host parameter implies force=True which causes the Nova scheduler to be bypassed. On such clouds, a ValueError will be thrown if host is given without force.
  • force โ€” Force a live-migration by not verifying the provided destination host by the scheduler. This is unsafe and not recommended.
  • block_migration โ€” Perform a block live migration to the destination host by the scheduler. Can be 'auto', True or False. Some clouds are too old to support 'auto', in which case a ValueError will be thrown. If omitted, the value will be 'auto' on clouds that support it, and False on clouds that do not.
  • disk_over_commit โ€” Whether to allow disk over-commit on the destination host. (Optional)

Returns: None


๐Ÿ’… Modifying a Server ๐Ÿ’…

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿงš change_server_password(server, new_password)

Change the administrator password. New password, who dis?

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • new_password โ€” The new password to be set.

Returns: None

๐Ÿ“ get_server_password(server)

Get the administrator password. No, Iโ€™m not telling you what it is โ€” the API will.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: encrypted password.

๐Ÿซถ reset_server_state(server, state)

Reset the state of server. State machine? More like state situation.

Parameters:

  • server โ€” The server can be either the ID of a server or a Server <#openstack.compute.v2.server.Server>.
  • state โ€” The state of the server to be set, active or error are valid.

Returns: None

๐Ÿ‘‘ rebuild_server(server, image, **attrs)

Rebuild a server. Fresh start energy, but for compute.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • name โ€” The name of the server
  • admin_password โ€” The administrator password
  • preserve_ephemeral โ€” Indicates whether the server is rebuilt with the preservation of the ephemeral partition. Default: False
  • image โ€” The id of an image to rebuild with. Default: None
  • access_ipv4 โ€” The IPv4 address to rebuild with. Default: None
  • access_ipv6 โ€” The IPv6 address to rebuild with. Default: None
  • metadata โ€” A dictionary of metadata to rebuild with. Default: None
  • personality โ€” A list of dictionaries, each including a path and contents key, to be injected into the rebuilt server at launch. Default: None

Returns: The rebuilt Server <#openstack.compute.v2.server.Server> instance.

๐Ÿ’– resize_server(server, flavor)

Resize a server. Glow-up, but make it flavor-based.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.
  • flavor โ€” Either the ID of a flavor or a Flavor <#openstack.compute.v2.flavor.Flavor> instance.

Returns: None

โญ confirm_server_resize(server)

Confirm a server resize. Lock it in, bestie.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: None

๐Ÿ’€ revert_server_resize(server)

Revert a server resize. Actually, never mind โ€” take it back.

Parameters:

  • server โ€” Either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns: None


๐ŸŽ€ Image Operations ๐ŸŽ€

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐ŸŒธ delete_image(image, ignore_missing=True)

Delete an image. Bye-bye, snapshot queen.

Parameters:

  • image โ€” The value can be either the ID of an image or a Image <#openstack.compute.v2.image.Image> instance.
  • ignore_missing โ€” okay so when this is False, a NotFoundException gets raised if the image literally doesn't exist. Set it to True and no exception at all when you try to delete a nonexistent image โ€” it just vibes. ๐Ÿ’…

Returns Nothing, bestie. None. ๐Ÿซถ


find_image(name_or_id, ignore_missing=True) Find a single image ๐ŸŽฏ

Parameters

  • name_or_id โ€” the name or ID of a image.
  • ignore_missing โ€” when set to False, a NotFoundException gets raised when the resource doesn't exist. When set to True, None is returned when you go looking for a nonexistent resource instead of the whole thing blowing up.

Returns One Image or None.

Raises NotFoundException when no resource can be found.

Raises DuplicateResource when multiple resources are found. ๐Ÿ˜ญ (yes, that's a whole situation)


get_image(image) Get a single image โœจ

Parameters

  • image โ€” the value can be the ID of an image or an Image instance.

Returns One Image.

Raises NotFoundException when no resource can be found.


images(details=True, **query) Return a generator of images ๐ŸŒˆ

Parameters

  • details โ€” when True, returns Image objects with all available properties, otherwise only basic properties come back. Default: True.
  • query โ€” optional query parameters, sent along to limit the resources being returned.

Returns A generator of image objects.


get_image_metadata(image) Return a dictionary of metadata for an image ๐ŸŽ€

Deprecated since version 4.14.0: use fetch_image_metadata() instead. Like, she's still here but she's not the moment anymore.

set_image_metadata(image, **metadata) Update metadata for an image ๐ŸŒธ

Parameters

  • image โ€” either the ID of an image or an Image instance.
  • metadata โ€” key/value pairs to be updated in the image's metadata. No other metadata is modified by this call. Periodt.

Returns An Image with only the image's metadata.


delete_image_metadata(image, keys=None) Delete metadata for an image ๐Ÿฆ‹

Note: this method will do a HTTP DELETE request for every key in keys. Not me making one request per keyโ€ฆ but that's literally what it does, iykyk.

Parameters

  • image โ€” either the ID of an image or an Image instance.
  • keys โ€” the keys to delete. If omitted, all metadata is removed. Gone. โœจ

Returns None.


๐Ÿ‘‘ Flavor Operations ๐Ÿ‘‘

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

find_flavor(name_or_id, ignore_missing=True, *, get_extra_specs=False, **query) Find a single flavor ๐Ÿ“

Parameters

  • name_or_id โ€” the name or ID of a flavor.
  • ignore_missing โ€” when set to False, a NotFoundException gets raised when the resource doesn't exist. When set to True, None is returned when attempting to find a nonexistent resource.
  • get_extra_specs โ€” when set to True and extra_specs isn't present in the response, it'll invoke an additional API call to fetch extra_specs.
  • query โ€” optional query parameters sent along to limit the flavors being returned.

Returns One Flavor or None.

Raises NotFoundException when no resource can be found.

Raises DuplicateResource when multiple resources are found. ๐Ÿ’€


create_flavor(**attrs) Create a new flavor from attributes ๐Ÿงš

Parameters

  • attrs โ€” keyword arguments which will be used to create a Flavor, comprised of the properties on the Flavor class.

Returns The results of flavor creation.


delete_flavor(flavor, ignore_missing=True) Delete a flavor ๐Ÿ’…

Parameters

  • flavor โ€” the value can be either the ID of a flavor or a Flavor instance.
  • ignore_missing โ€” when set to False, a NotFoundException gets raised when the flavor doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent flavor.

Returns None.


get_flavor(flavor, get_extra_specs=False) Get a single flavor โญ

Parameters

  • flavor โ€” the value can be the ID of a flavor or a Flavor instance.
  • get_extra_specs โ€” when set to True and extra_specs isn't present in the response, it'll invoke an additional API call to fetch extra_specs.

Returns One Flavor.

Raises NotFoundException when no resource can be found.


flavors(details=True, get_extra_specs=False, **query) Return a generator of flavors ๐ŸŒˆ

Parameters

  • details โ€” when True, returns Flavor objects, with additional attributes filled.
  • get_extra_specs โ€” when set to True and extra_specs isn't present in the response, it'll invoke an additional API call to fetch extra_specs.
  • query โ€” optional query parameters sent along to limit the flavors being returned.

Returns A generator of flavor objects.


flavor_add_tenant_access(flavor, tenant) Adds tenant/project access to flavor. ๐Ÿ”ฅ

Parameters

  • flavor โ€” either the ID of a flavor or a Flavor instance.
  • tenant โ€” the UUID of the tenant.

Returns None.


flavor_remove_tenant_access(flavor, tenant) Removes tenant/project access to flavor. ๐Ÿ™ˆ

Parameters

  • flavor โ€” either the ID of a flavor or a Flavor instance.
  • tenant โ€” the UUID of the tenant.

Returns None.


get_flavor_access(flavor) Lists tenants who have access to private flavor ๐ŸŽ€

Parameters

  • flavor โ€” either the ID of a flavor or a Flavor instance.

Returns List of dicts with flavor_id and tenant_id attributes.


fetch_flavor_extra_specs(flavor) Lists Extra Specs of a flavor โœจ

Parameters

  • flavor โ€” either the ID of a flavor or a Flavor instance.

Returns One Flavor.


create_flavor_extra_specs(flavor, extra_specs) Lists Extra Specs of a flavor ๐Ÿ’œ

Parameters

  • flavor โ€” either the ID of a flavor or a Flavor instance.
  • extra_specs โ€” dict of extra specs.

Returns One Flavor.


get_flavor_extra_specs_property(flavor, prop) Get specific Extra Spec property of a flavor ๐Ÿ”

Parameters

  • flavor โ€” either the ID of a flavor or a Flavor <#openstack.compute.v2.flavor.Flavor> instance, bestie. Both work, no cap.
  • prop โ€” the property name. Just the name, okay? ๐Ÿ’…

Returns

The string value of the property you asked for. That's it, that's the whole vibe. โœจ


update_flavor_extra_specs_property(flavor, prop, val) โ€” Update a specific Extra Spec property of a flavor. Target acquired, glow-up applied. ๐ŸŽ€

  • flavor โ€” either the ID of a flavor or a Flavor <#openstack.compute.v2.flavor.Flavor> instance.
  • prop โ€” the property name.
  • val โ€” the property value. The new fit. ๐Ÿ’–

Returns

String value of the requested property.


delete_flavor_extra_specs_property(flavor, prop, ignore_missing=True) โ€” Delete a specific Extra Spec property of a flavor. It's giving "blocked, unfollowed, deleted." ๐Ÿ’€

  • flavor โ€” either the ID of a flavor or a Flavor <#openstack.compute.v2.flavor.Flavor> instance.
  • prop โ€” the property name.
  • ignore_missing โ€” okay so listen ๐Ÿซถ: when this is set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the flavor or the extra spec doesn't exist. When it's set to True, no exception will be set when attempting to delete a nonexistent flavor extra spec. So True = unbothered, moisturized, in her lane. ๐Ÿ’…

Returns

None. Nothing. Empty. Iconic minimalism. ๐Ÿฆ‹


๐Ÿ› ๏ธ Service Operations ๐Ÿ› ๏ธ

Look at this constructor, she's long, she's detailed, she ate and left no crumbs ๐Ÿ‘‘:

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None, endpoint_override=None,
version=None, auth=None, user_agent=None, connect_retries=None, logger=None,
allow=None, additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None, status_code_retry_delay=None,
statsd_client=None, statsd_prefix=None, prometheus_counter=None,
prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

update_service_forced_down(service, host=None, binary=None, forced=True) โ€” Update a service's forced_down info. Sometimes you just gotta manually declare a service down, iykyk. ๐Ÿ”ฅ

  • service โ€” either the ID of a service or a Service <#openstack.compute.v2.service.Service> instance.
  • host โ€” the host where the service runs.
  • binary โ€” the name of the service.
  • forced โ€” whether or not this service was forced down manually by an administrator after the service was fenced. Yes, that's the literal meaning, don't come for me. ๐Ÿ™ˆ

Returns

The updated service instance.


disable_service(service, host=None, binary=None, disabled_reason=None) โ€” Disable a service. Sorry bestie, you're on timeout. ๐Ÿ˜ญ

  • service โ€” either the ID of a service or a Service <#openstack.compute.v2.service.Service> instance.
  • host โ€” the host where the service runs.
  • binary โ€” the name of the service.
  • disabled_reason โ€” the reason of force down a service. Spill the tea, write it down. ๐Ÿ“

Returns

The updated service instance.


enable_service(service, host=None, binary=None) โ€” Enable a service. Timeout's over, welcome back queen ๐Ÿ‘‘โœจ

  • service โ€” either the ID of a service, a Service <#openstack.compute.v2.service.Service> instance, or None.
  • host โ€” the host where the service runs.
  • binary โ€” the name of the service.

Returns

The updated service instance.


services(**query) โ€” Return a generator of service. Generators are lowkey the moment, they don't dump everything at once. ๐ŸŒธ

  • query โ€” query parameters.

Returns

A generator of service.


find_service(name_or_id, ignore_missing=True, **query) โ€” Find a service from a name or an id so you can get the corresponding info. Detective mode: activated ๐Ÿ•ต๏ธโ€โ™€๏ธ

  • name_or_id โ€” the name or id of a service.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. No drama, just None. ๐Ÿฆ‹
  • query โ€” additional attributes like 'host'.

Returns

One: class:~openstack.compute.v2.service.Service or None.

Raises

NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. Two answers?? Not the plot twist ๐Ÿ’€


delete_service(service, ignore_missing=True) โ€” Delete a service.

  • service โ€” the value can be either the ID of a service or a Service <#openstack.compute.v2.service.Service> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the service does not exist. When set to True, no exception will be set when attempting to delete a nonexistent service.

Returns

None.


update_service(service, **attrs) โ€” Update a service. Glow-up szn ๐Ÿ’–

  • service โ€” either the ID of a service or a Service <#openstack.compute.v2.service.Service> instance.
  • attrs โ€” the attributes to update on the service represented by service.

Returns

The updated service.


๐ŸŒˆ Server Share Operations ๐ŸŒˆ

And here's the constructor again, same energy, still long, still serving:

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None, endpoint_override=None,
version=None, auth=None, user_agent=None, connect_retries=None, logger=None,
allow=None, additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None, status_code_retry_delay=None,
statsd_client=None, statsd_prefix=None, prometheus_counter=None,
prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_share_attachment(server, share, **attrs) โ€” Create a new share attachment from attributes. Matchmaker, matchmaker, attach that share ๐Ÿ’…

  • server โ€” the value can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance that the share is attached to.
  • share โ€” the value can be the ID of a share or a Share instance.
  • attrs โ€” keyword arguments which will be used to create a ShareMapping, comprised of the properties on the ShareMapping class. Yes, comprised of, we're fancy now. ๐ŸŽ€

Returns

The results of create share.


delete_share_attachment(server, share, ignore_missing=True) โ€” Delete a share attachment. Unattach. Detach. Release the bond ๐Ÿ˜ญ

  • server โ€” the value can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance that the share is attached to.
  • share โ€” the value can be the ID of a share or a Share instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, no exception will be set when attempting to delete a nonexistent resource.

Returns

None.


get_share_attachment(server, share) โ€” Get a single share attachment. Just one. Quality over quantity, bestie โœจ

  • server โ€” the value can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance that the share is attached to.
  • share โ€” the value can be the ID of a share or a Share instance.

Returns

One ShareMapping.

Raises

NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


share_attachments(server, **query) โ€” Return a generator of share attachments. All of them, streaming in, one by one ๐ŸŒŠ

  • server โ€” the server can be either the ID of a server or a Server <#openstack.compute.v2.server.Server>.
  • query โ€” query parameters.

Returns

A generator of ShareMapping objects ShareMapping.

๐Ÿ“Ž Volume Attachment Operations ๐Ÿ’…

Okay so this is the volume-attachment zone, and yes โ€” it's the same big proxy class as before, with the same thirty-something kwargs. I'm putting the full signature again because the manual does, and because bestie we do not skip things in this house ๐Ÿซถ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_volume_attachment(server, volume=None, **attrs) โ€” makes a shiny new volume attachment out of the attributes you pass in โœจ

  • server โ€” the value can be either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance that the volume is attached to.
  • volume โ€” the value can be either the ID of a volume, or a Volume <#openstack.block_storage.v3.volume.Volume> instance.
  • attrs โ€” keyword arguments which will be used to create a VolumeAttachment <#openstack.compute.v2.volume_attachment.VolumeAttachment>, comprised of the properties on the VolumeAttachment class.

Returns: the results of volume attachment creation ๐ŸŽ€


update_volume_attachment(server, volume, volume_id=None, **attrs) โ€” updates a volume attachment

Heads up bestie, this one's important ๐Ÿ‘€ the underlying API expects a volume ID, not a volume attachment ID. There is currently no way to update volume attachments by their own ID. So don't come for it, that's just how it is ๐Ÿ˜ญ
  • server โ€” the value can be either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance that the volume is attached to.
  • volume โ€” the value can be either the ID of a volume, or a Volume <#openstack.block_storage.v3.volume.Volume> instance.
  • volume_id โ€” the ID of a volume to swap to. If this is not specified, we will default to not swapping the volume.
  • attrs โ€” the attributes to update on the volume attachment represented by volume_attachment.

Returns: None


delete_volume_attachment(server, volume, ignore_missing=True) โ€” yeets a volume attachment into the void ๐Ÿ’€

Same vibe check as above: the underlying API expects a volume ID, not a volume attachment ID. There is currently no way to delete volume attachments by their own ID.
  • server โ€” the value can be either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance that the volume is attached to.
  • volume โ€” the value can be the ID of a volume, or a Volume <#openstack.block_storage.v3.volume.Volume> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the volume attachment does not exist. When set to True, no exception will be set when attempting to delete a nonexistent volume attachment.

Returns: None


get_volume_attachment(server, volume) โ€” gets you one single volume attachment ๐Ÿ”

And again, because the universe is testing us: the underlying API expects a volume ID, not a volume attachment ID. There is currently no way to retrieve volume attachments by their own ID.
  • server โ€” the value can be either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance that the volume is attached to.
  • volume โ€” the value can be the ID of a volume, or a Volume <#openstack.block_storage.v3.volume.Volume> instance.

Returns: one VolumeAttachment <#openstack.compute.v2.volume_attachment.VolumeAttachment>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ฌ


volume_attachments(server, **query) โ€” returns a generator of volume attachments, lowkey the comfy way to iterate ๐ŸŒธ

  • server โ€” the server can be either the ID of a server, or a Server <#openstack.compute.v2.server.Server>.
  • query โ€” query parameters.

Returns: a generator of VolumeAttachment objects โ€” VolumeAttachment <#openstack.compute.v2.volume_attachment.VolumeAttachment>


๐Ÿ”‘ Keypair Operations ๐Ÿ”‘

Back at it with the exact same proxy class, because consistency is iconic ๐Ÿ‘‘

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_keypair(**attrs) โ€” creates a fresh new keypair from attributes ๐Ÿ”

  • attrs โ€” keyword arguments which will be used to create a Keypair <#openstack.compute.v2.keypair.Keypair>, comprised of the properties on the Keypair class.

Returns: the results of keypair creation โœจ


delete_keypair(keypair, ignore_missing=True, user_id=None) โ€” deletes a keypair, no cap ๐Ÿ—‘๏ธ

  • keypair โ€” the value can be either the ID of a keypair, or a Keypair <#openstack.compute.v2.keypair.Keypair> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the keypair does not exist. When set to True, no exception will be set when attempting to delete a nonexistent keypair.
  • user_id โ€” optional user_id owning the keypair.

Returns: None


get_keypair(keypair, user_id=None) โ€” gets you a single keypair ๐Ÿ’–

  • keypair โ€” the value can be either the ID of a keypair, or a Keypair <#openstack.compute.v2.keypair.Keypair> instance.
  • user_id โ€” optional user_id owning the keypair.

Returns: one Keypair <#openstack.compute.v2.keypair.Keypair>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


find_keypair(name_or_id, ignore_missing=True, *, user_id=None) โ€” hunts down a single keypair for you, main character energy ๐Ÿ•ต๏ธโ€โ™€๏ธ

  • name_or_id โ€” the name or ID of a keypair.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • user_id โ€” optional user_id owning the keypair.

Returns: one Keypair <#openstack.compute.v2.keypair.Keypair> or None

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises: DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. Yeah, if there's more than one match it's gonna be messy ๐Ÿ™ˆ


keypairs(**query) โ€” returns a generator of keypairs, go off ๐Ÿ”ฅ

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns: a generator of keypair objects


๐ŸŒ Server IPs ๐ŸŒ

One more time, the exact same proxy class โ€” yes the whole kwargs list, here it is, character for character ๐ŸŽ€

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

server_ips(server, network_label=None) โ€” returns a generator of server IPs, iykyk ๐ŸŒˆ

  • server โ€” the server can be either the ID of a server, or a Server <#openstack.compute.v2.server.Server>.
  • network_label โ€” the name of a particular network to list IP addresses from.

That's the IPs handled โ€” keep scrolling bestie, the next chunk is literally right below ๐Ÿ’–

Returns โ€” a generator of ServerIP objects โœจ that's the last little return from the Server IP zone, bestie.

๐ŸŒธ Server Group Operations ๐ŸŒธ

okay so these methods hang off the Proxy class, and the full signature is a whole mood โ€” copy it exactly, no cap:

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

create_server_group(**attrs) โ€” create a new server group from attributes

Parameters:

  • attrs โ€” keyword arguments that get used to create a ServerGroup (openstack.compute.v2.server_group.ServerGroup), made up of the properties on the ServerGroup class. literally building the vibe from the class props ๐Ÿ’…

Returns โ€” the results of server group creation โœจ

delete_server_group(server_group, ignore_missing=True) โ€” delete a server group

Parameters:

  • server_group โ€” the value can be either the ID of a server group or a ServerGroup (openstack.compute.v2.server_group.ServerGroup) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the server group does not exist. When set to True, no exception will be set when attempting to delete a nonexistent server group. bestie said โ€œif itโ€™s not there, we move onโ€ ๐Ÿซถ

Returns โ€” None

find_server_group(name_or_id, ignore_missing=True, *, all_projects=False) โ€” find a single server group

Parameters:

  • name_or_id โ€” the name or ID of a server group.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • all_projects โ€” when set to True, search for server groups by name across all projects. Note that this will likely result in a higher chance of duplicates. Admin-only by default. so true, itโ€™s giving โ€œlook everywhereโ€ energy ๐Ÿ‘€

Returns โ€” one ServerGroup (openstack.compute.v2.server_group.ServerGroup) or None

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

Raises DuplicateResource (openstack.exceptions.DuplicateResource) when multiple resources are found. not two of them, bestie ๐Ÿ˜ญ

get_server_group(server_group) โ€” get a single server group

Parameters:

  • server_group โ€” the value can be the ID of a server group or a ServerGroup (openstack.compute.v2.server_group.ServerGroup) instance.

Returns โ€” a ServerGroup (openstack.compute.v2.server_group.ServerGroup) object.

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

server_groups(*, all_projects=False, **query) โ€” return a generator of server groups

Parameters:

  • all_projects โ€” when set to True, lists servers groups (yes, that's what the page says ๐Ÿ‘€) from all projects. Admin-only by default.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of ServerGroup objects ๐ŸŒˆ


๐Ÿฆ‹ Server Interface Operations ๐Ÿฆ‹

same Proxy energy, same full signature โ€” here it is again, exactly:

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

create_server_interface(server, **attrs) โ€” create a new server interface from attributes

Parameters:

  • server โ€” the server can be either the ID of a server or a Server (openstack.compute.v2.server.Server) instance that the interface belongs to.
  • attrs โ€” keyword arguments which will be used to create a ServerInterface (openstack.compute.v2.server_interface.ServerInterface), comprised of the properties on the ServerInterface class.

Returns โ€” the results of server interface creation โœจ

delete_server_interface(server_interface, server=None, ignore_missing=True) โ€” delete a server interface

Parameters:

  • server_interface โ€” the value can be either the ID of a server interface or a ServerInterface (openstack.compute.v2.server_interface.ServerInterface) instance.
  • server โ€” this parameter need to be specified when ServerInterface ID is given as value. It can be either the ID of a server or a Server (openstack.compute.v2.server.Server) instance that the interface belongs to.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the server interface does not exist. When set to True, no exception will be set when attempting to delete a nonexistent server interface.

Returns โ€” None

get_server_interface(server_interface, server=None) โ€” get a single server interface

Parameters:

  • server_interface โ€” the value can be the ID of a server interface or a ServerInterface (openstack.compute.v2.server_interface.ServerInterface) instance.
  • server โ€” this parameter need to be specified when ServerInterface ID is given as value. It can be either the ID of a server or a Server (openstack.compute.v2.server.Server) instance that the interface belongs to.

Returns โ€” one ServerInterface (openstack.compute.v2.server_interface.ServerInterface)

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

server_interfaces(server, **query) โ€” return a generator of server interfaces

Parameters:

  • server โ€” the server can be either the ID of a server or a Server (openstack.compute.v2.server.Server).
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of ServerInterface objects ๐ŸŽ€


๐Ÿ’œ Server Tag Operations ๐Ÿ’œ

one more Proxy signature moment, because the manual page said so and we respect the manual page:

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

add_tag_to_server(server, tag) โ€” add a tag to a server.

Parameters:

  • server โ€” either the ID of a server or a Server (openstack.compute.v2.server.Server) instance.
  • tag โ€” the tag to add.

Returns โ€” None

remove_tag_from_server(server, tag) โ€” remove a tag from a server.

Parameters:

  • server โ€” either the ID of a server or a Server (openstack.compute.v2.server.Server) instance.
  • tag โ€” the tag to remove.

Returns โ€” None

remove_tags_from_server(server) โ€” remove all tags from a server.

Parameters:

  • server โ€” either the ID of a server or a Server (openstack.compute.v2.server.Server) instance.
  • tag โ€” the tag to remove. (the page lists tag here even though the signature is just server โ€” iconic documentation behavior ๐Ÿ’€)

Returns โ€” None ๐Ÿ’…

๐ŸŒธ Server External Event Operations ๐ŸŒธ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Ok so the methods on this one, bestie ๐Ÿ‘‡

  • create_server_external_events(events) โ€” makes one or more server external events. Plural. A whole lil batch. ๐Ÿ’…
โš ๏ธ Warning: this API is intended for inter-service communication only (e.g. Neutron, Cyborg notifying Nova about events). So like... it's for the services talking to each other, not for you to be messy with. Respect the group chat boundaries fr fr ๐Ÿ™ˆ

Parameters

  • events โ€” List of dicts, each containing event attributes (name, server_uuid, status, tag).

Returns

A generator of ServerExternalEvent โ€” a generator, so it's giving "I'll give you the events one at a time, be patient" energy โœจ


๐Ÿฆ‹ Availability Zone Operations ๐Ÿฆ‹

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • availability_zones(details=False) โ€” returns a generator of availability zones. The zones!! The places your stuff lives!! ๐ŸŒˆ

Parameters

  • details โ€” Return extra details about the availability zones. This defaults to False as it generally requires extra permission. So like, lowkey the extra tea is behind a permission wall ๐Ÿ”’ โ€” that's why False is the default, it's not being shady, it's being polite.

Returns

A generator of availability zone AvailabilityZone <#openstack.compute.v2.availability_zone.AvailabilityZone> ๐ŸŽ€


๐Ÿ’œ Limits Operations ๐Ÿ’œ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • get_limits(**query) โ€” retrieves the limits that are applied to the project's account. Your ceilings, your caps, the "no you can't have infinite of that" receipts ๐Ÿ“‹โœจ

Returns

A Limits object, including both AbsoluteLimits <#openstack.compute.v2.limits.AbsoluteLimits> and RateLimits. Two for one, we love a combo ๐Ÿ’…


โญ Hypervisor Operations โญ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • hypervisors(details=False, **query) โ€” returns a generator of hypervisors. The actual physical(ish) machines hosting your vibes ๐Ÿ–ฅ๏ธ๐Ÿ’–

Parameters

  • details โ€” When set to the default, False, Hypervisor <#openstack.compute.v2.hypervisor.Hypervisor> instances will be returned with only basic information populated. Just the headline, not the whole story.
  • query โ€” Optional query parameters to be sent to limit the resources being returned. Filter away, bestie ๐Ÿ”

Returns

A generator of hypervisor.

  • find_hypervisor(name_or_id, ignore_missing=True, *, details=True) โ€” finds a single hypervisor. One (1) hypervisor, specifically, no extras ๐Ÿ‘‘

Parameters

  • name_or_id โ€” The name or ID of a hypervisor.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. So True = "it's fine, no drama", False = "I want the error, I want the truth" ๐Ÿ˜ญ
  • details โ€” When set to False, instances with only basic data will be returned. The default, True, will cause instances with full data to be returned. Note the flip from hypervisors() above โ€” here it defaults to True, ok? Don't mix them up ๐Ÿ’€

Returns

One: class:~openstack.compute.v2.hypervisor.Hypervisor or None.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found. Yes, multiple. Chaos. Not the vibe ๐Ÿ™ˆ

  • get_hypervisor(hypervisor) โ€” gets a single hypervisor.

Parameters

  • hypervisor โ€” The value can be the ID of a hypervisor or a Hypervisor <#openstack.compute.v2.hypervisor.Hypervisor> instance. ID or the whole object, dealer's choice ๐ŸŽฒ

Returns

A Hypervisor <#openstack.compute.v2.hypervisor.Hypervisor> object.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • get_hypervisor_uptime(hypervisor) โ€” gets uptime information for a hypervisor. How long has it been awake, bestie, when did it last sleep ๐Ÿ˜ดโฑ๏ธ

Parameters

  • hypervisor โ€” The value can be the ID of a hypervisor or a Hypervisor <#openstack.compute.v2.hypervisor.Hypervisor> instance.

Returns

A Hypervisor <#openstack.compute.v2.hypervisor.Hypervisor> object.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


๐Ÿงš Extension Operations ๐Ÿงš

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • find_extension(name_or_id, ignore_missing=True) โ€” finds a single extension. Extensions are the little bonus features, the add-ons, the accessories of the compute world ๐ŸŽ€

Parameters

  • name_or_id โ€” The name or ID of an extension.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns

One Extension <#openstack.compute.v2.extension.Extension> or None.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

Raises DuplicateResource <#openstack.exceptions.DuplicateResource> when multiple resources are found.

  • extensions() โ€” retrieves a generator of extensions. All of them. The whole collection. Slay โœจ

Returns

A generator of extension instances.


๐Ÿ“ QuotaClassSet Operations ๐Ÿ“

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • get_quota_class_set(quota_class_set='default') โ€” gets a single quota class set.

Only one quota class is permitted, default. That's it. One class. There is no other class. Don't go looking ๐Ÿ‘€

Parameters

  • quota_class_set โ€” The value can be the ID of a quota class set (only default is supported) or a QuotaClassSet instance.

Returns

One QuotaClassSet.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • update_quota_class_set(quota_class_set, **attrs) โ€” updates a QuotaClassSet.

Only one quota class is permitted, default. Same rule, still true, we're not being repetitive, the API is ๐Ÿ’…

Parameters

  • quota_class_set โ€” either the ID of a quota class set (and listen, only default is supported, so don't get creative ๐Ÿ’…) or a QuotaClassSet instance.
  • attrs โ€” the attributes you wanna update on the QuotaClassSet that quota_class_set is representing.

Returns

The updated QuotaSet โœจ


๐ŸŽ€ QuotaSet Operations ๐ŸŽ€

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_quota_set(project, usage=False, **query)

Show ya the QuotaSet info for the project ๐Ÿ‘‘

Parameters

  • project โ€” ID or instance of Project <#openstack.identity.v3.project.Project> for the project you want the quota for.
  • usage โ€” when you set this to True, quota usage and reservations get filled in. Obsessed with the receipts ๐Ÿ“Š
  • query โ€” extra query parameters to use, if you're feeling extra.

Returns

One QuotaSet <#openstack.compute.v2.quota_set.QuotaSet> ๐Ÿ’–

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. (Yeah. It's gone. ๐Ÿ˜ญ)

get_quota_set_defaults(project)

Show ya the QuotaSet defaults for the project โ€” like, the factory settings era โœจ

Parameters

project โ€” ID or instance of Project <#openstack.identity.v3.project.Project> for the project you want the quota for.

Returns

One QuotaSet <#openstack.compute.v2.quota_set.QuotaSet>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

revert_quota_set(project, **query)

Reset the quota for the project/user. Ctrl+Z but make it cloud ๐Ÿซถ

Parameters

  • project โ€” ID or instance of Project <#openstack.identity.v3.project.Project> for the project you wanna reset the quota on.
  • query โ€” additional parameters to be used.

Returns

None โ€” yeah, nothing back, it just does the thing ๐Ÿ’…

update_quota_set(project, *, user=None, **attrs)

Update a QuotaSet. Glow-up szn ๐Ÿ”ฅ

Parameters

  • project โ€” ID or instance of Project <#openstack.identity.v3.project.Project> for the project you wanna update the quota on.
  • user_id โ€” optional ID of the user to set quotas as.
  • attrs โ€” the attributes to update on the QuotaSet that quota_set is representing.

Returns

The updated QuotaSet


๐Ÿฆ‹ Server Migration Operations ๐Ÿฆ‹

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

abort_server_migration(server_migration, server, ignore_missing=True)

Abort an in-progress server migration. Not me pulling the plug mid-move ๐Ÿ’€

Parameters

  • server_migration โ€” the value can be either the ID of a server migration or a ServerMigration <#openstack.compute.v2.server_migration.ServerMigration> instance.
  • server โ€” you have to specify this when a ServerMigration ID is given as the value. It can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance that the migration belongs to.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the server migration doesn't exist. When set to True, no exception gets set when you attempt to delete a nonexistent server migration. (Yes, it says "delete" in a migration function. Iconic. ๐Ÿ™ˆ)

Returns

None

force_complete_server_migration(server_migration, server=None)

Force complete an in-progress server migration. No cap, we finishing this โœจ

Parameters

  • server_migration โ€” the value can be either the ID of a server migration or a ServerMigration <#openstack.compute.v2.server_migration.ServerMigration> instance.
  • server โ€” you have to specify this when a ServerMigration ID is given as the value. It can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance that the migration belongs to.

Returns

None

get_server_migration(server_migration, server, ignore_missing=True)

Get a single server migration. Just the one. Main character energy ๐Ÿ‘‘

Parameters

  • server_migration โ€” the value can be the ID of a server migration or a ServerMigration <#openstack.compute.v2.server_migration.ServerMigration> instance.
  • server โ€” this parameter needs to be specified when a ServerMigration ID is given as the value. It can be either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance that the migration belongs to.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the server migration doesn't exist. When set to True, no exception gets set when you attempt to delete a nonexistent server migration.

Returns

One ServerMigration <#openstack.compute.v2.server_migration.ServerMigration> ๐ŸŒธ

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

server_migrations(server)

Return a generator of migrations for a server. All the migrations, one by one, in a neat lil stream ๐ŸŒˆ

Parameters

server โ€” the server can be either the ID of a server or a Server <#openstack.compute.v2.server.Server>.

Returns

A generator of ServerMigration objects โ€” ServerMigration <#openstack.compute.v2.server_migration.ServerMigration>


๐ŸŒธ Migration Operations ๐ŸŒธ

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

migrations(**query)

Return a generator of migrations for all the servers. Every single one, bestie ๐Ÿซถ

Parameters

query โ€” optional query parameters sent along to limit the migrations being returned.

Returns

A generator of Migration objects โœจ


๐ŸŽ€ Interactive Consoles ๐ŸŽ€

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_server_remote_console(server, **attrs)

Create a remote console on the server. Peek at your box from afar ๐Ÿ‘€

Parameters

server โ€” either the ID of a server or a Server <#openstack.compute.v2.server.Server> instance.

Returns

One ServerRemoteConsole <#openstack.compute.v2.server_remote_console.ServerRemoteConsole> ๐Ÿ’–

get_server_console_url(server, console_type)

Create a remote console on the server. (Yeah, the description is literally the same as the one above it โ€” nope, not me being lazy, that's genuinely what it says, iykyk ๐Ÿ’€)

Parameters

  • server โ€” either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance. either one works bestie ๐Ÿ’ซ
  • console_type โ€” the type of the console connection.

Returns โ€” a dictionary with the console type and url ๐ŸŽ€

validate_console_auth_token(console_token) Look up console connection info for a console auth token. iykyk โœจ

Parameters

  • console_token โ€” the console auth token, exactly as it came back in the URL from get_server_console_url.

Returns โ€” a dictionary with connection details, and ngl those details vary depending on the console type.

get_server_console_output(server, length=None) Grab the console output for a server. literally just the log ๐Ÿ’…

Parameters

  • server โ€” either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance.
  • length โ€” optional, the number of lines to fetch from the end of the console log. leave it out and you get all the lines, no cap.

Returns โ€” the console output as a dict. control characters get escaped so it's a valid JSON string ๐Ÿซถ

create_console(server, console_type, console_protocol=None) Create a remote console on the server. main character behaviour honestly ๐Ÿ‘‘

when the microversion supported is higher than 2.6, a remote console gets created; otherwise it falls back to the deprecated call to get the server console. so yeah, older microversion = deprecated path, be aware ๐Ÿ˜ญ

Parameters

  • server โ€” either the ID of a server, or a Server <#openstack.compute.v2.server.Server> instance.
  • console_type โ€” the type of the remote console. supported values are: novnc, spice-html5, rdp-html5, serial, webmks (supported after 2.8), spice-direct (supported after 2.99).
  • console_protocol โ€” optional console protocol. heads up: it's only respected after microversion 2.6.

Returns โ€” a dictionary with the console type, the connection details (a url), and optionally the protocol โœจ


โœจ Helpers โœจ

okay so this is the proxy class itself, and she has a LOT of keyword arguments. every single one, coming right up ๐Ÿ’–

class openstack.compute.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

wait_for_delete(res, interval=2, wait=120, callback=None) Wait for a resource to be deleted. she will sit there and watch it disappear, iconic patience ๐Ÿงš

Parameters

  • res โ€” the resource to wait on to be deleted.
  • interval โ€” number of seconds to wait before two consecutive checks. default is 2.
  • wait โ€” maximum number of seconds to wait before the change. default is 120.
  • callback โ€” a callback function. it gets called with a single value, progress, which is a percentage value from 0-100.

Returns โ€” the resource is returned on success ๐ŸŽ€

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to delete failed to occur in the specified seconds. so like, don't just wait forever, mmkay?


๐ŸŒˆ Container Infrastructure Management ๐ŸŒˆ

๐Ÿฆ‹ Cluster Operations ๐Ÿฆ‹

class openstack.container_infrastructure_management.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_cluster(**attrs) Create a new cluster from attributes. fresh cluster, fresh vibes โœจ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster>, comprised of the properties on the Cluster class.

Returns โ€” the results of cluster creation ๐Ÿ’ซ

delete_cluster(cluster, ignore_missing=True) Delete a cluster. bye bestie ๐Ÿ‘‹

Parameters

  • cluster โ€” the value can be either the ID of a cluster or a Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the cluster does not exist. when set to True, no exception will be set when attempting to delete a nonexistent cluster. default is True, so she's chill about it ๐Ÿ™ˆ

Returns โ€” None

find_cluster(name_or_id, ignore_missing=True) Find a single cluster. the search is ON ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a cluster.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. when set to True, None will be returned when attempting to find a nonexistent resource.

Returns โ€” one Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster> or None ๐Ÿซถ

get_cluster(cluster) Get a single cluster. just the one, not a whole crowd ๐Ÿ’…

Parameters

  • cluster โ€” the value can be the ID of a cluster or a Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster> instance.

Returns โ€” one Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

clusters(**query) Return a generator of clusters. a whole lil generator of them, we love a lazy iterator ๐ŸŒธ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of cluster objects Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster> ๐Ÿ”ฅ

update_cluster(cluster, **attrs) Update a cluster. glow-up time ๐Ÿ’–

Parameters

  • cluster โ€” either the id of a cluster or a Cluster <#openstack.container_infrastructure_management.v1.cluster.Cluster> instance.
  • attrs โ€” the attributes to update on the cluster represented by cluster.

Returns โ€” the updated cluster โœจ


๐ŸŽ€ Cluster Certificates Operations ๐ŸŽ€

class openstack.container_infrastructure_management.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_cluster_certificate(**attrs) Create a new cluster_certificate from a CSR. certificates, but make it cute ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a ClusterCertificate <#openstack.container_infrastructure_management.v1.cluster_certificate.ClusterCertificate>, comprised of the properties on the ClusterCertificate class.

Returns โ€” the results of cluster_certificate creation โญ

get_cluster_certificate(cluster_certificate) Get a single cluster_certificate. one (1) certificate, coming right up ๐Ÿฆ‹

Parameters

  • cluster_certificate โ€” the value can be the ID of a cluster_certificate or a ClusterCertificate <#openstack.container_infrastructure_management.v1.cluster_certificate.ClusterCertificate> instance.

Returns โ€” one ClusterCertificate <#openstack.container_infrastructure_management.v1.cluster_certificate.ClusterCertificate>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ’€

๐ŸŽ€ Cluster Templates Operations ๐ŸŽ€

First up: the class herself. Say hi to the proxy, she's got a lot of keyword args and honestly she's thriving:

class openstack.container_infrastructure_management.v1._proxy.Proxy(session,
*, service_type=None, service_name=None, interface=None,
region_name=None, endpoint_override=None, version=None, auth=None,
user_agent=None, connect_retries=None, logger=None, allow=None,
additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

  • create_cluster_template(**attrs) โ€” makes a brand-new cluster template out of attributes, main character behavior only ๐Ÿ’…

Parameters

  • attrs โ€” keyword arguments that get used to create a ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate>, made up of the properties on the ClusterTemplate class.

Returns The results of cluster_template creation โœจ

  • delete_cluster_template(cluster_template, ignore_missing=True) โ€” bye bye cluster template, no notes ๐Ÿซถ

Parameters

  • cluster_template โ€” the value can be either the ID of a cluster_template or a ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the cluster_template doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent cluster_template.

Returns None

  • find_cluster_template(name_or_id, ignore_missing=True) โ€” hunts down a single cluster_template, lowkey a detective ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a cluster_template.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. When set to True, None gets returned when attempting to find a nonexistent resource.

Returns One ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate> or None

  • get_cluster_template(cluster_template) โ€” grabs a single cluster_template, no gatekeeping ๐ŸŽ€

Parameters

  • cluster_template โ€” the value can be the ID of a cluster_template or a ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate> instance.

Returns One ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ

  • cluster_templates(**query) โ€” returns a generator of cluster_templates, she gives and she gives ๐ŸŒธ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns A generator of cluster_template objects ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate>

  • update_cluster_template(cluster_template, **attrs) โ€” glow-up time for your cluster_template โœจ

Parameters

  • cluster_template โ€” either the id of a cluster_template or a ClusterTemplate <#openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate> instance.
  • attrs โ€” the attributes to update on the cluster_template represented by cluster_template.

Returns The updated cluster_template ๐Ÿ‘‘


๐ŸŒˆ Service Operations ๐ŸŒˆ

Same class, same absolutely iconic wall of keyword args, so here she is again in full because we do not skip details in this house:

class openstack.container_infrastructure_management.v1._proxy.Proxy(session,
*, service_type=None, service_name=None, interface=None,
region_name=None, endpoint_override=None, version=None, auth=None,
user_agent=None, connect_retries=None, logger=None, allow=None,
additional_headers=None, client_name=None, client_version=None,
allow_version_hack=None, global_request_id=None, min_version=None,
max_version=None, default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • services() โ€” returns a generator of services, she's a whole vibe check on what's running ๐Ÿ”ฅ

Returns A generator of service objects Service <#openstack.container_infrastructure_management.v1.service.Service>


๐Ÿ’œ Database API ๐Ÿ’œ

So for the full rundown on how to actually use database, go peep Using OpenStack Database <>. That's the homework bestie, iykyk ๐Ÿ“š

๐Ÿฆ‹ The Database Class ๐Ÿฆ‹

The database high-level interface lives through the database member of a Connection <#openstack.connection.Connection> object. Important detail fr fr: that database member only gets added if the service is detected. No service, no member, that's just how it is ๐Ÿซถ

๐Ÿ“ Database Operations ๐Ÿ“

Once more with feeling โ€” the proxy class, exact same signature, character for character:

class openstack.database.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • create_database(instance, **attrs) โ€” creates a new database from attributes, new database just dropped ๐Ÿ’…

Parameters

  • instance โ€” this can be either the ID of an instance or a Instance <#openstack.database.v1.instance.Instance>
  • attrs โ€” keyword arguments which will be used to create a Database <#openstack.database.v1.database.Database>, comprised of the properties on the Database class.

Returns The results of server creation

  • delete_database(database, instance=None, ignore_missing=True) โ€” deletes a database, gone girl energy ๐Ÿ˜ญ

Parameters

  • database โ€” the value can be either the ID of a database or a Database <#openstack.database.v1.database.Database> instance.
  • instance โ€” this parameter needs to be specified when an ID is given as database. It can be either the ID of an instance or a Instance <#openstack.database.v1.instance.Instance>
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the database doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent database.

Returns None

  • find_database(name_or_id, instance, ignore_missing=True) โ€” finds a single database, sleuth mode activated ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • name_or_id โ€” the name or ID of a database.
  • instance โ€” this can be either the ID of an instance or a Instance <#openstack.database.v1.instance.Instance>
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource doesn't exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns One Database <#openstack.database.v1.database.Database> or None

  • databases(instance, **query) โ€” returns a generator of databases, the whole collection, no crumbs ๐ŸŒˆ

Parameters

  • instance โ€” this can be either the ID of an instance or a Instance <#openstack.database.v1.instance.Instance> instance that the interface belongs to.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns A generator of database objects

  • get_database(database, instance=None) โ€” gets a single database, bestie delivers ๐Ÿ“ฆ

Parameters

  • instance โ€” this parameter needs to be specified when an ID is given as database. It can be either the ID of an instance or a Instance <#openstack.database.v1.instance.Instance>
  • database โ€” the value can be the ID of a database or a Database <#openstack.database.v1.database.Database> instance.

Returns: one Database ๐Ÿ—„๏ธ

Raises NotFoundException when no resource can be found. yeah โ€” if it's not there, it really isn't there, no cap ๐Ÿ˜ญ


๐Ÿจ Flavor Operations

The flavor corner of the proxy, bestie. Same class, same everything:

class openstack.database.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

find_flavor(name_or_id, ignore_missing=True)

Find a single flavor ๐Ÿ” like, just one. the one. periodt.

Parameters

  • name_or_id โ€” The name or ID of a flavor.
  • ignore_missing โ€” When set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. so likeโ€ฆ ghost it or catch feelings, your call ๐Ÿ’…

Returns: One Flavor or None

get_flavor(flavor)

Get a single flavor โœจ

Parameters

  • flavor โ€” The value can be the ID of a flavor or a Flavor instance.

Returns: One Flavor

Raises NotFoundException when no resource can be found. she's not here, bestie ๐Ÿซถ

flavors(**query)

Return a generator of flavors ๐ŸŒˆ yes, a generator, not a list โ€” she's lazy in the efficient way, not the toxic way.

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns: A generator of flavor objects


๐Ÿงš Instance Operations

Now the main character section โ€” instances, the whole reason you're here tbh ๐Ÿ‘‘

class openstack.database.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_instance(**attrs)

Create a new instance from attributes ๐Ÿฃ it's giving birth-of-a-database energy.

Parameters

  • attrs โ€” Keyword arguments which will be used to create a Instance, comprised of the properties on the Instance class.

Returns: The results of server creation

delete_instance(instance, ignore_missing=True)

Delete an instance ๐Ÿ’€ gone. reduced to atoms. respectfully.

Parameters

  • instance โ€” The value can be either the ID of an instance or a Instance instance.
  • ignore_missing โ€” When set to False, NotFoundException will be raised when the instance does not exist. When set to True, no exception will be set when attempting to delete a nonexistent instance. so like, unbothered. moisturized. in her lane โœจ

Returns: None

find_instance(name_or_id, ignore_missing=True)

Find a single instance ๐Ÿ”Ž

Parameters

  • name_or_id โ€” The name or ID of a instance.
  • ignore_missing โ€” When set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns: One Instance or None

get_instance(instance)

Get a single instance ๐ŸŒธ

Parameters

  • instance โ€” The value can be the ID of an instance or a Instance instance.

Returns: One Instance

Raises NotFoundException when no resource can be found. ๐Ÿ˜ญ

instances(**query)

Return a generator of instances ๐ŸŒŸ

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns: A generator of instance objects

update_instance(instance, **attrs)

Update a instance โœ๏ธ glow-up time, we love a transformation arc.

Parameters

  • instance โ€” Either the id of a instance or a Instance instance.
  • attrs โ€” The attributes to update on the instance represented by instance.

Returns: The updated instance


๐ŸŽ€ User Operations

And finally the users section โ€” the little guys who actually log in ๐Ÿซถ database users, not like, your ex. different thing.

class openstack.database.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_user(instance, **attrs)

Create a new user from attributes ๐Ÿง‘โ€๐Ÿ’ป new account, who dis

Parameters

  • instance โ€” This can be either the ID of an instance or a Instance
  • attrs โ€” Keyword arguments which will be used to create a User, comprised of the properties on the User class.

Returns: The results of server creation

delete_user(user, instance=None, ignore_missing=True)

Delete a user ๐Ÿ—‘๏ธ bye bestie, block and delete, the whole routine.

Parameters

  • user โ€” The value can be either the ID of a user or a User instance.
  • instance โ€” This parameter needs to be specified when an ID is given as user. It can be either the ID of an instance or a Instance
  • ignore_missing โ€” When set to False, NotFoundException will be raised when the user does not exist. When set to True, no exception will be set when attempting to delete a nonexistent user.
โš ๏ธ lowkey important: if you're passing an ID as user, you must also pass instance. no instance, no vibes, no deletion. iykyk ๐Ÿ’…

Returns: None

find_user(name_or_id, instance, ignore_missing=True)

Find a single user ๐Ÿ” note that unlike delete_user, instance here is required โ€” no default, she's not optional. main character energy fr.

Parameters

  • name_or_id โ€” The name or ID of a user.
  • instance โ€” This can be either the ID of an instance or a Instance
  • ignore_missing โ€” When set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns: One User or None

users(instance, **query)

Return a generator of users ๐ŸŒˆ๐Ÿ’–

Parameters

  • instance โ€” This can be either the ID of an instance or a Instance
  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns: A generator of user objects

get_user(user, instance=None)

Get a single user โญ

Parameters

  • user โ€” The value can be the ID of a user or a User instance.
  • instance โ€” This parameter needs to be specified when an ID is given as database. It can be either the ID of an instance or a Instance
๐Ÿ™ˆ and yes, the original docstring literally says database there even though the parameter is instance. we're reporting it exactly as written, character for character โ€” not my typo, i'm just the messenger ๐Ÿซก

Returns โ€” one User (fr the openstack.database.v1.user.User one ๐Ÿ’…)

Raises โ€” NotFoundException (that's openstack.exceptions.NotFoundException) when no resource can be found, no cap. ๐Ÿ˜ญ


๐Ÿฆ‹ DNS API

For the full glow-up on how to actually use dns, peep Using OpenStack DNS.

๐ŸŒธ The DNS Class

Okay so the dns high-level interface lives on the dns member of a Connection object. Iconic. But heads up bestie: that dns member is only added if the service is detected โ€” no service, no member, that's just how it is. ๐Ÿซถ

๐ŸŽ€ DNS Zone Operations

Here's the whole constructor, exactly as-is, because we do not paraphrase signatures in this house:

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿ’œ zones(**query)

Retrieve a generator of zones โ€” yes, a generator, so it's lazy and cute like that. โœจ

Parameters

  • query โ€” optional query params you can send to limit which resources come back:
    • name: Zone Name field.
    • type: Zone Type field.
    • email: Zone email field.
    • status: Status of the zone.
    • ttl: TTL field filter.abs
    • description: Zone description field filter.

Returns โ€” a generator of zone Zone instances (the openstack.dns.v2.zone.Zone kind ๐Ÿฆ‹).

create_zone(**attrs)

Create a brand new zone from attributes. Main character energy for your DNS. ๐Ÿ‘‘

Parameters

  • attrs โ€” keyword arguments used to create a Zone (openstack.dns.v2.zone.Zone), made up of the properties on the Zone class.

Returns โ€” the results of zone creation.

get_zone(zone)

Get a zone. Simple. Slay. ๐Ÿ’…

Parameters

  • zone โ€” the value can be the ID of a zone or a Zone (openstack.dns.v2.zone.Zone) instance.

Returns โ€” a Zone instance.

delete_zone(zone, ignore_missing=True, delete_shares=False)

Delete a zone. Bye bestie ๐Ÿ‘‹๐Ÿ˜ญ

Parameters

  • zone โ€” the value can be the ID of a zone or a Zone (openstack.dns.v2.zone.Zone) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone.
  • delete_shares โ€” when True, delete the zone shares along with the zone.

Returns โ€” Zone been deleted.

find_zone(name_or_id, ignore_missing=True)

Find a single zone โ€” like a search but for exactly one, we love a monogamous lookup. ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a zone.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone.

Returns โ€” Zone (openstack.dns.v2.zone.Zone).

abandon_zone(zone, **attrs)

Abandon Zone ๐Ÿซฅ (yes that's really the name, it's giving "walking away dramatically").

Parameters

  • zone โ€” the value can be the ID of a zone to be abandoned or a ZoneExport (openstack.dns.v2.zone_export.ZoneExport) instance.

Returns โ€” None.

xfr_zone(zone, **attrs)

Trigger update of a secondary Zone. Go off, trigger it. ๐Ÿ”ฅ

Parameters

  • zone โ€” the value can be the ID of a zone to be abandoned or a ZoneExport (openstack.dns.v2.zone_export.ZoneExport) instance.

Returns โ€” None.

โญ Recordset Operations

Same constructor, same everything, here it is again verbatim because it belongs to this section too:

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐ŸŽ€ recordsets(zone=None, **query)

Retrieve a generator of recordsets. Generators keep giving, iykyk. โœจ

Parameters

  • zone โ€” the optional value can be the ID of a zone or a Zone (openstack.dns.v2.zone.Zone) instance. If it is not given, all recordsets for all zones of the tenant would be retrieved.
  • query โ€” optional query params sent to limit the resources being returned:
    • name: Recordset Name field.
    • type: Type field.
    • status: Status of the recordset.
    • ttl: TTL field filter.
    • description: Recordset description field filter.

Returns โ€” a generator of zone (Recordset, i.e. openstack.dns.v2.recordset.Recordset) instances.

create_recordset(zone, **attrs)

Create a new recordset in the zone. Nesting it right in there. ๐Ÿช†

Parameters

  • zone โ€” the value can be the ID of a zone or a Zone (openstack.dns.v2.zone.Zone) instance.
  • attrs โ€” keyword arguments used to create a Recordset (openstack.dns.v2.recordset.Recordset), made up of the properties on the Recordset class.

Returns โ€” the results of zone creation.

update_recordset(recordset, **attrs)

Update Recordset attributes. Glow-up arc unlocked. ๐Ÿ’–

Parameters

  • attrs โ€” keyword arguments used to create a Recordset (openstack.dns.v2.recordset.Recordset), made up of the properties on the Recordset class.

Returns โ€” the results of zone creation.

get_recordset(recordset, zone)

Get a recordset. One (1) recordset, coming right up. ๐Ÿ“

Parameters

  • zone โ€” the value can be the ID of a zone or a Zone (openstack.dns.v2.zone.Zone) instance.
  • recordset โ€” the value can be the ID of a recordset or a Recordset (openstack.dns.v2.recordset.Recordset) instance.

Returns โ€” Recordset instance.

delete_recordset(recordset, zone=None, ignore_missing=True)

Delete a zone โ€” yes, the label literally says zone, we're not fixing it, we're just reporting it. ๐Ÿ™ˆ

Parameters

  • recordset โ€” the value can be the ID of a recordset or a Recordset (openstack.dns.v2.recordset.Recordset) instance.
  • zone โ€” the value can be the ID of a zone or a Zone (openstack.dns.v2.zone.Zone) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone.

Returns โ€” Recordset instance been deleted.

๐ŸŒˆ Zone Import Operations

And once more, the constructor, character for character, because it's a whole vibe:

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿงš zone_imports(**query)

Retrieve a generator of zone imports โ€” bringing zones in from elsewhere, very "new era" of you. โญ

Parameters

  • query โ€” optional query params you can send to limit the resources being returned:
    • zone_id: Zone I field.
    • message: Message field.
    • status: Status of the zone import record.

Returns โ€” a generator of zone ZoneImport instances (that's openstack.dns.v2.zone_import.ZoneImport ๐Ÿฆ‹).

create_zone_import(**attrs)

Create a new zone import from attributes. Fresh import, fresh start, periodt. ๐Ÿ’…

Parameters

  • attrs โ€” keyword arguments used to create a ZoneImport (openstack.dns.v2.zone_import.ZoneImport), made up of the properties on the ZoneImport class.

Returns โ€” the results of zone creation โœจ that's the whole return value, no cap.

get_zone_import(zone_import)

Grab a single zone import record ๐Ÿ’–

  • zone_import โ€” the value can be the ID of a zone import or a ZoneImport <#openstack.dns.v2.zone_import.ZoneImport> instance.

Returns โ€” a ZoneImport instance.

delete_zone_import(zone_import, ignore_missing=True)

Delete a zone import ๐Ÿ—‘๏ธ

  • zone_import โ€” the value can be the ID of a zone import or a ZoneImport <#openstack.dns.v2.zone_import.ZoneImport> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone.

Returns โ€” the deleted zone import.


๐Ÿฆ‹ Zone Export Operations

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

zone_exports(**query)

Hands you back a generator of zone exports ๐ŸŒˆ (yes, a generator โ€” lazy, iconic, main-character energy)

  • query โ€” optional query parameters to be sent to limit the resources being returned.
    • zone_id: Zone I field.
    • message: Message field.
    • status: Status of the zone import record.

Returns โ€” a generator of zone ZoneExport <#openstack.dns.v2.zone_export.ZoneExport> instances.

create_zone_export(zone, **attrs)

Make a brand-new zone export from attributes ๐Ÿ’…

  • zone โ€” the value can be the ID of a zone to be exported or a ZoneExport <#openstack.dns.v2.zone_export.ZoneExport> instance.
  • attrs โ€” keyword arguments which will be used to create a ZoneExport <#openstack.dns.v2.zone_export.ZoneExport>, comprised of the properties on the ZoneExport class.

Returns โ€” the results of zone creation.

get_zone_export(zone_export)

Get one zone export record ๐ŸŽ€

  • zone โ€” the value can be the ID of a zone import or a ZoneExport <#openstack.dns.v2.zone_export.ZoneExport> instance.

Returns โ€” ZoneExport instance.

get_zone_export_text(zone_export)

Get a zone export record, but as text ๐Ÿ“„ (same data, text-flavored vibe)

  • zone โ€” the value can be the ID of a zone import or a ZoneExport <#openstack.dns.v2.zone_export.ZoneExport> instance.

Returns โ€” ZoneExport instance.

delete_zone_export(zone_export, ignore_missing=True)

Yeet a zone export ๐Ÿ—‘๏ธโœจ

  • zone_export โ€” the value can be the ID of a zone import or a ZoneExport <#openstack.dns.v2.zone_export.ZoneExport> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the zone does not exist. When set to True, no exception will be set when attempting to delete a nonexistent zone.

Returns โ€” the deleted zone export.


๐ŸŒธ FloatingIP Operations

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

floating_ips(**query)

Retrieve a generator of recordsets ๐Ÿซถ

  • query โ€” optional query parameters to be sent to limit the resources being returned.
    • name: Recordset Name field.
    • type: Type field.
    • status: Status of the recordset.
    • ttl: TTL field filter.
    • description: Recordset description field filter.

Returns โ€” a generator of floatingips (FloatingIP <#openstack.dns.v2.floating_ip.FloatingIP>) instances.

get_floating_ip(floating_ip)

Get a Floating IP ๐Ÿ’–

  • floating_ip โ€” the value can be the ID of a floating ip or a FloatingIP <#openstack.dns.v2.floating_ip.FloatingIP> instance. The ID is in format "region_name:floatingip_id".

Returns โ€” FloatingIP instance.

update_floating_ip(floating_ip, **attrs)

Update floating ip attributes โœจ

  • floating_ip โ€” the id or an instance of FloatingIP.
  • attrs โ€” attributes for update on FloatingIP.

๐Ÿ‘‘ TLD Operations

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

tlds(**query)

Retrieve a generator of tlds ๐ŸŒ

  • query โ€” optional query parameters to be sent to limit the resources being returned.
    • name: TLD Name field.

Returns โ€” a generator of tld TLD <#openstack.dns.v2.tld.TLD> instances.

create_tld(**attrs)

Create a new tld from attributes ๐ŸŽ€

  • attrs โ€” keyword arguments which will be used to create a TLD <#openstack.dns.v2.tld.TLD>, comprised of the properties on the TLD class.

Returns โ€” the results of TLD creation.

get_tld(tld)

Get a tld ๐Ÿ”

  • tld โ€” the value can be the ID of a tld or a TLD <#openstack.dns.v2.tld.TLD> instance.

Returns โ€” tld instance.

delete_tld(tld, ignore_missing=True)

Delete a tld ๐Ÿ’€

  • tld โ€” the value can be the ID of a tld or a TLD <#openstack.dns.v2.tld.TLD> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the tld does not exist. When set to True, no exception will be set when attempting to delete a nonexistent tld.

Returns โ€” TLD been deleted.

find_tld(name_or_id, ignore_missing=True)

Find a single tld ๐Ÿงš

  • name_or_id โ€” the name or ID of a tld.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the tld does not exist. When set to True, no exception will be set when attempting to delete a nonexistent tld.

Returns โ€” TLD <#openstack.dns.v2.tld.TLD>.


โญ Zone Transfer Operations

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • zone_transfer_requests(**query) โ€” grab a generator of all the zone transfer requests โœจ

Parameters

query โ€” optional query params you can send to filter down what comes back:

  • status: the status of the recordset.

Returns

A generator of transfer requests โ€” ZoneTransferRequest <#openstack.dns.v2.zone_transfer.ZoneTransferRequest> instances, bestie ๐Ÿซถ

  • get_zone_transfer_request(request) โ€” pull the info for one ZoneTransfer Request ๐Ÿ”

Parameters

request โ€” can be the ID of a transfer request, or a ZoneTransferRequest <#openstack.dns.v2.zone_transfer.ZoneTransferRequest> instance. Either works, no cap.

Returns

A zone transfer request instance.

  • create_zone_transfer_request(zone, **attrs) โ€” make a fresh ZoneTransfer Request out of attributes ๐ŸŒฑ

Parameters

  • zone โ€” can be the ID of a zone you wanna transfer, or a ZoneExport <#openstack.dns.v2.zone_export.ZoneExport> instance.
  • attrs โ€” keyword args used to create the ZoneTransferRequest <#openstack.dns.v2.zone_transfer.ZoneTransferRequest>, made up of the properties on the ZoneTransferRequest class.

Returns

The results of zone transfer request creation.

  • update_zone_transfer_request(request, **attrs) โ€” change up the attributes on a ZoneTransfer Request ๐Ÿ’…

Parameters

  • floating_ip โ€” the id or an instance of ZoneTransferRequest <#openstack.dns.v2.zone_transfer.ZoneTransferRequest>. (yes, the param is literally called floating_ip in this doc, we don't ask questions ๐Ÿซ )
  • attrs โ€” attributes to update on the ZoneTransferRequest <#openstack.dns.v2.zone_transfer.ZoneTransferRequest>.
  • delete_zone_transfer_request(request, ignore_missing=True) โ€” yeet a ZoneTransfer Request ๐Ÿ’€

Parameters

  • request โ€” can be the ID of a zone transfer request, or a ZoneTransferRequest <#openstack.dns.v2.zone_transfer.ZoneTransferRequest> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the zone doesn't exist. When set to True, no exception is set when you try to delete a nonexistent zone.

Returns

The deleted zone transfer request.

  • zone_transfer_accepts(**query) โ€” get a generator of zone transfer accepts โœจ

Parameters

query โ€” optional query params to send to limit the resources returned:

  • status: the status of the recordset.

Returns

A generator of transfer accepts โ€” ZoneTransferAccept <#openstack.dns.v2.zone_transfer.ZoneTransferAccept> instances.

  • get_zone_transfer_accept(accept) โ€” get the info for one ZoneTransfer Accept ๐Ÿ”Ž

Parameters

request โ€” can be the ID of a transfer accept, or a ZoneTransferAccept <#openstack.dns.v2.zone_transfer.ZoneTransferAccept> instance. (yeah the param is listed as request even tho the arg is accept โ€” that's literally what it says, iykyk ๐Ÿ™ˆ)

Returns

A zone transfer request instance.

  • create_zone_transfer_accept(**attrs) โ€” make a brand new ZoneTransfer Accept from attributes ๐ŸŽ€

Parameters

attrs โ€” keyword args used to create the ZoneTransferAccept <#openstack.dns.v2.zone_transfer.ZoneTransferAccept>, comprised of the properties on the ZoneTransferAccept class.

Returns

The results of zone transfer request creation.


๐ŸŒธ Zone Share Operations ๐ŸŒธ

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • zone_shares(zone, **query) โ€” get a generator of zone shares ๐Ÿ’–

Parameters

  • zone โ€” the zone ID or a Zone <#openstack.dns.v2.zone.Zone> instance.
  • query โ€” optional query params to send to limit the resources returned:
    • target_project_id: the target project ID field.

Returns

A generator of zone shares โ€” ZoneShare <#openstack.dns.v2.zone_share.ZoneShare> instances.

  • get_zone_share(zone, zone_share) โ€” get one zone share ๐Ÿ”

Parameters

  • zone โ€” can be the ID of a zone or a Zone <#openstack.dns.v2.zone.Zone> instance.
  • zone_share โ€” can be either the ID of the zone share, or a ZoneShare <#openstack.dns.v2.zone_share.ZoneShare> instance that the zone share belongs to.

Returns

A ZoneShare instance.

  • find_zone_share(zone, zone_share_id, ignore_missing=True) โ€” find a single zone share ๐Ÿฆ‹

Parameters

  • zone โ€” can be the ID of a zone or a Zone <#openstack.dns.v2.zone.Zone> instance.
  • zone_share_id โ€” the zone share ID.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the zone share doesn't exist. When set to True, None is returned when you try to find a nonexistent zone share.

Returns

ZoneShare <#openstack.dns.v2.zone_share.ZoneShare>

  • create_zone_share(zone, **attrs) โ€” create a new zone share from attributes ๐ŸŒฑ

Parameters

  • zone โ€” the zone ID or a Zone <#openstack.dns.v2.zone.Zone> instance.
  • attrs โ€” keyword args used to create a ZoneShare <#openstack.dns.v2.zone_share.ZoneShare>, comprised of the properties on the ZoneShare class.

Returns

The results of zone share creation.

  • delete_zone_share(zone, zone_share, ignore_missing=True) โ€” delete a zone share ๐Ÿ’€

Parameters

  • zone โ€” the zone ID or a Zone <#openstack.dns.v2.zone.Zone> instance.
  • zone_share โ€” can be either the ID of the zone share, or a ZoneShare <#openstack.dns.v2.zone_share.ZoneShare> instance that the zone share belongs to.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the zone share doesn't exist. When set to True, no exception is set when you try to delete a nonexistent zone share.

Returns

None


โœจ Limit Operations โœจ

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • limits(**query) โ€” get a generator of limits ๐Ÿ‘‘

Returns

A generator of limits โ€” Limit <#openstack.dns.v2.limit.Limit> instances.


๐ŸŽ€ Quota Operations ๐ŸŽ€

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • quotas(**query) โ€” returns a generator of quotas ๐Ÿ’œ

Parameters

query โ€” optional query params you send to limit the resources being returned.

  • -a, --all โ€” bestie this is the one that shows you everything, no filter, no cap ๐Ÿ’…
  • -n, --number โ€” ok so this one's giving "numbered list" energy, it literally adds line numbers to the output โœจ
  • -s, --squeeze-blank โ€” the way this one just smooths things out... it collapses multiple blank lines into a single one, iconic behavior honestly ๐ŸŽ€
  • -u, --unbuffered โ€” no buffering, no waiting, just immediately pushing output through. it's giving impatient main character energy fr fr ๐Ÿ’€

๐ŸŒธ Service Status Operations ๐ŸŒธ

okay so check it โ€” this is literally the same Proxy class definition again, same constructor, same everything:

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

service_statuses()

Retrieve a generator of service statuses โ€” like, it hands you back a generator that spits out all the service statuses one at a time ๐Ÿฆ‹

  • Returns โ€” a generator of service statuses, specifically ServiceStatus <#openstack.dns.v2.service_status.ServiceStatus> instances. so you get all the tea about what's up with each service ๐Ÿ’–

get_service_status(service)

Get a status of a service in the Designate system โ€” this one's your lookup tool, you give it a service and it tells you what's going on with it ๐Ÿ”

  • service โ€” so this can be either the ID of a service OR a ServiceStatus <#openstack.dns.v2.service_status.ServiceStatus> instance. like, you can pass it the actual object or just the ID, either way works bestie โœจ
  • Returns โ€” a ServiceStatus instance. periodt. ๐Ÿ‘‘

๐Ÿ’€ Blacklist Operations ๐Ÿ’€

again, same Proxy class, same constructor, we're literally just copy-pasting the vibe at this point:

class openstack.dns.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

blacklists(**query)

Retrieve a generator of blacklists โ€” so like, this one's giving you a generator of all the blacklist entries ๐Ÿšซ

  • Returns โ€” a generator of Blacklist <#openstack.dns.v2.blacklist.Blacklist> instances. so you get them one by one, very chill, very on-demand ๐Ÿ’…

get_blacklist(blacklist)

Get a blacklist โ€” singular. one. single. blacklist. ๐ŸŽฏ

  • blacklist โ€” the value can be either the ID of a blacklist OR a Blacklist <#openstack.dns.v2.blacklist.Blacklist> instance. like, pass it whatever you got bestie ๐Ÿซถ
  • Returns โ€” a Blacklist instance. simple as that. no cap. ๐Ÿ’–

create_blacklist(**attrs)

Create a new blacklist โ€” you're making a brand new one, main character energy fr fr โœจ

  • attrs โ€” these are keyword arguments that'll be used to create a Blacklist <#openstack.dns.v2.blacklist.Blacklist>. they're comprised of the properties on the Blacklist class, so like, you're just passing in the ingredients and it bakes you a blacklist ๐Ÿงš
  • Returns โ€” the results of blacklist creation. so like, the new blacklist that you just made. slay. ๐Ÿ”ฅ

update_blacklist(blacklist, **attrs)

Update blacklist attributes โ€” you're changing stuff on an existing one, giving it a little makeover ๐Ÿ’…

  • blacklist โ€” the id or an instance of ~openstack.dns.v2.blacklist.Blacklist. so like, whatever you got, it'll take it ๐ŸŽ€
  • attrs โ€” attributes for update on ~openstack.dns.v2.blacklist.Blacklist. these are the ones you're changing, bestie ๐ŸŒธ
  • Returns โ€” the updated blacklist. so like, here's the glow-up, looking fresh ๐Ÿ’–

delete_blacklist(blacklist, ignore_missing=True)

Delete a blacklist โ€” bye bye ๐Ÿ‘‹ it's giving "you're not coming to the function anymore" energy ๐Ÿ’€

  • blacklist โ€” the id or an instance of ~openstack.dns.v2.blacklist.Blacklist. same deal, ID or object, either works ๐Ÿฆ‹
  • ignore_missing โ€” okay so this one's important bestie. when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the blacklist does not exist. but when set to True (which is the default!), no exception will be set when attempting to delete a nonexistent blacklist. so like, if you're not sure it's there, leave this as True and it'll just quietly do its thing ๐Ÿคซ
  • Returns โ€” the blacklist that's been deleted. like, here's what got yeeted ๐Ÿ—‘๏ธ

๐ŸŒˆ Identity API v2 ๐ŸŒˆ

okay so for the details on how to use identity, you gotta see Using OpenStack Identity <>. that's your homework bestie, go read it ๐Ÿ“š

๐ŸŽ€ The Identity v2 Class ๐ŸŽ€

the identity high-level interface is available through the identity member of a Connection <#openstack.connection.Connection> object. so like, you access it through the connection, iykyk ๐Ÿ’…

important note: the identity member will only be added if the service is detected. so like, if it's not there, it's not there. no vibes to be had ๐Ÿ’€

โœจ Extension Operations โœจ

okay so we're back with another Proxy class definition, same constructor arguments, same everything:

class openstack.identity.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

extensions()

Retrieve a generator of extensions โ€” it's giving you all the extensions, one at a time, very chill ๐Ÿฆ‹

  • Returns โ€” a generator of extension instances. so like, a whole stream of them ๐Ÿ’–

get_extension(extension)

Get a single extension โ€” just one. singular. focused. ๐ŸŽฏ

  • extension โ€” the value can be either the ID of an extension OR an Extension <#openstack.identity.v2.extension.Extension> instance. so like, pass whatever you have bestie โœจ
  • Returns โ€” one Extension <#openstack.identity.v2.extension.Extension>. periodt. ๐Ÿ’…
  • Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no extension can be found. so like, if it doesn't exist, you're getting an exception, no cap ๐Ÿ˜ญ

๐Ÿ‘‘ User Operations ๐Ÿ‘‘

and again, same Proxy class, same constructor, we're literally just going through the motions at this point:

class openstack.identity.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_user(**attrs)

Create a new user from attributes โ€” you're making a whole new user, main character energy fr fr ๐Ÿ”ฅ

  • attrs โ€” keyword arguments which will be used to create a User <#openstack.identity.v2.user.User>, comprised of the properties on the User class. so like, you're just passing in all the deets and it creates the user for you ๐Ÿงš
  • Returns โ€” the results of user creation. so like, the new user, fresh out the oven ๐Ÿ’–

delete_user(user, ignore_missing=True)

Delete a user โ€” bye bestie ๐Ÿ‘‹ you're gone, you're out, no more vibes from you ๐Ÿ’€

  • user โ€” the value can be either the ID of a user OR a User <#openstack.identity.v2.user.User> instance. same deal as always, ID or object ๐Ÿฆ‹
  • ignore_missing โ€” okay so when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the user does not exist. but when set to True (the default!), no exception will be set when attempting to delete a nonexistent user. so like, it just quietly does nothing if they're already gone ๐Ÿคซ
  • Returns โ€” None. that's it. nothing. nada. silence. ๐Ÿ’…

find_user(name_or_id, ignore_missing=True)

Find a single user โ€” you're looking for one specific user, giving detective energy ๐Ÿ”

  • name_or_id โ€” the name or ID of a user. so like, you can search by either one, very flexible bestie โœจ
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. but when set to True (default!), None will be returned when attempting to find a nonexistent resource. so like, if you're not sure they're there, you'll just get None back, no drama ๐ŸŽ€
  • Returns โ€” one User <#openstack.identity.v2.user.User> or None. so like, either you found them or you didn't, no in-between ๐Ÿ’–

get_user(user)

Get a single user โ€” again, just one, focused, singular, no cap ๐ŸŽฏ

So like, wrapping up get_user real quick:

  • Parameters
    • user โ€” the value can be the ID of a user or a User (#openstack.identity.v2.user.User) instance. ๐Ÿ’–
  • Returns โ€” One User (#openstack.identity.v2.user.User). โœจ
  • Raises โ€” NotFoundException (#openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ Like, it's just not there bestie, no cap.

users(**query)

Retrieve a generator of users. ๐Ÿ”ฅ Yes, a generator โ€” it's giving lazy iterator energy, she doesn't dump everything on you at once.

  • Parameters
    • query โ€” optional query parameters that get sent along to limit the resources being returned. ๐ŸŽ€
  • Returns โ€” a generator of user instances. Slay.

update_user(user, **attrs)

Update a user. Glow-up time. ๐Ÿ’…

  • Parameters
    • user โ€” either the ID of a user or a User (#openstack.identity.v2.user.User) instance. ๐Ÿซถ
    • attrs โ€” the attributes you're updating on the user represented by user.
  • Returns โ€” the updated user. Iconic.

๐ŸŽญ Role Operations

class openstack.identity.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Look at that constructor. It's giving "I have a lot of kwargs and I'm not sorry." ๐Ÿ’€ Every single one is up there in the block above, verbatim, don't come for me.

create_role(**attrs)

Create a new role from attributes. New role, who dis? ๐Ÿ‘‘

  • Parameters
    • attrs โ€” keyword arguments that'll be used to create a Role (#openstack.identity.v2.role.Role), made up of the properties on the Role class. ๐Ÿฆ‹
  • Returns โ€” the results of role creation.

delete_role(role, ignore_missing=True)

Delete a role. Bye bestie ๐Ÿ‘‹

  • Parameters
    • role โ€” the value can be either the ID of a role or a Role (#openstack.identity.v2.role.Role) instance.
    • ignore_missing โ€” when it's set to False, NotFoundException (#openstack.exceptions.NotFoundException) gets raised when the role does not exist. When it's set to True, no exception gets set when you attempt to delete a nonexistent role. ๐Ÿ™ˆ (Lowkey the forgiving mode, fr.)
  • Returns โ€” None.

find_role(name_or_id, ignore_missing=True)

Find a single role. Detective mode ๐Ÿ•ต๏ธโ€โ™€๏ธโœจ

  • Parameters
    • name_or_id โ€” the name or ID of a role.
    • ignore_missing โ€” when it's set to False, NotFoundException (#openstack.exceptions.NotFoundException) gets raised when the resource does not exist. When it's set to True, None gets returned when you attempt to find a nonexistent resource. ๐Ÿ˜Œ
  • Returns โ€” One Role (#openstack.identity.v2.role.Role) or None.

get_role(role)

Get a single role. Gimme gimme ๐Ÿซด

  • Parameters
    • role โ€” the value can be the ID of a role or a Role (#openstack.identity.v2.role.Role) instance.
  • Returns โ€” One Role (#openstack.identity.v2.role.Role).
  • Raises โ€” NotFoundException (#openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ

roles(**query)

Retrieve a generator of roles. โญ

  • Parameters
    • query โ€” optional query parameters to be sent to limit the resources being returned.
  • Returns โ€” a generator of role instances.

update_role(role, **attrs)

Update a role. She's evolving ๐Ÿ’ซ

  • Parameters
    • role โ€” either the ID of a role or a Role (#openstack.identity.v2.role.Role) instance.
    • attrs โ€” the attributes to update on the role represented by role.
  • Returns โ€” the updated role.

๐Ÿ  Tenant Operations

class openstack.identity.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Same constructor, same absolute wall of kwargs โ€” copied exactly, every default and all. ๐Ÿ’œ

create_tenant(**attrs)

Create a new tenant from attributes. New tenant just dropped ๐ŸŽ€

  • Parameters
    • attrs โ€” keyword arguments which will be used to create a Tenant (#openstack.identity.v2.tenant.Tenant), comprised of the properties on the Tenant class.
  • Returns โ€” the results of tenant creation.

delete_tenant(tenant, ignore_missing=True)

Delete a tenant. ๐Ÿงน

  • Parameters
    • tenant โ€” the value can be either the ID of a tenant or a Tenant (#openstack.identity.v2.tenant.Tenant) instance.
    • ignore_missing โ€” when set to False, NotFoundException (#openstack.exceptions.NotFoundException) will be raised when the tenant does not exist. When set to True, no exception will be set when attempting to delete a nonexistent tenant. ๐Ÿ™ˆ
  • Returns โ€” None.

find_tenant(name_or_id, ignore_missing=True)

Find a single tenant. ๐Ÿ”

  • Parameters
    • name_or_id โ€” the name or ID of a tenant.
    • ignore_missing โ€” when set to False, NotFoundException (#openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. โœจ
  • Returns โ€” One Tenant (#openstack.identity.v2.tenant.Tenant) or None.

get_tenant(tenant)

Get a single tenant. Gimme ๐Ÿ˜ค

  • Parameters
    • tenant โ€” the value can be the ID of a tenant or a Tenant (#openstack.identity.v2.tenant.Tenant) instance.
  • Returns โ€” One Tenant (#openstack.identity.v2.tenant.Tenant).
  • Raises โ€” NotFoundException (#openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ

tenants(**query)

Retrieve a generator of tenants. ๐ŸŒธ

  • Parameters
    • query โ€” optional query parameters to be sent to limit the resources being returned.
  • Returns โ€” a generator of tenant instances.

update_tenant(tenant, **attrs)

Update a tenant. โœจ

  • Parameters
    • tenant โ€” either the ID of a tenant or a Tenant (#openstack.identity.v2.tenant.Tenant) instance.
    • attrs โ€” the attributes to update on the tenant represented by tenant.
  • Returns โ€” the updated tenant.

๐ŸŒˆ Identity API v3

For details on how to use identity, see Using OpenStack Identity <>. (Yes, that's the literal reference as written โ€” I'm not out here inventing links, bestie. ๐Ÿซถ)

๐Ÿ’ซ The Identity v3 Class

The identity high-level interface is available through the identity member of a Connection (#openstack.connection.Connection) object. The identity member will only be added if the service is detected. โœจ Like, she only shows up if she's invited.


๐ŸŽ€ Credential Operations

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

v3 proxy, same giant kwargs list, verbatim, character for character. ๐Ÿ‘‘

create_credential(**attrs)

Create a new credential from attributes. ๐Ÿ”

  • Parameters
    • attrs โ€” keyword arguments which will be used to create a Credential (#openstack.identity.v3.credential.Credential), comprised of the properties on the Credential class.
  • Returns โ€” the results of credential creation.

delete_credential(credential, ignore_missing=True)

Delete a credential. ๐Ÿ—‘๏ธ

  • Parameters
    • credential โ€” the value can be either the ID of a credential or a Credential (#openstack.identity.v3.credential.Credential) instance.
  • ignore_missing โ€” bestie, this is the drama switch ๐ŸŽ€ when it's False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised the second the credential doesn't exist. When it's True, literally nothing happens โ€” no exception gets set when you try to delete a credential that was never there. ghosted, respectfully ๐Ÿ’…

Returns

None


๐ŸŒธ find_credential(name_or_id, ignore_missing=True)

Find one single credential. just the one. we're not greedy โœจ

Parameters

  • name_or_id โ€” the name or the ID of a credential, either works, iykyk.
  • ignore_missing โ€” when it's False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the resource doesn't exist. when it's True, you just get None back when you go looking for something that isn't there. no cap, very chill of it ๐Ÿฆ‹

Returns

One Credential <#openstack.identity.v3.credential.Credential> or None


๐Ÿ’œ get_credential(credential)

Get a single credential. the getting-est of them all ๐Ÿ‘‘

Parameters

  • credential โ€” the value can be the ID of a credential or a Credential <#openstack.identity.v3.credential.Credential> instance. your choice, main character ๐ŸŒˆ

Returns

One Credential <#openstack.identity.v3.credential.Credential>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


๐Ÿฆ‹ credentials(**query)

Retrieve a generator of credentials. a whole little stream of them, iconic ๐Ÿ’ซ

Parameters

  • query โ€” optional query parameters, sent along to limit the resources being returned. basically "here's what I want, filter accordingly" ๐Ÿ’…

Returns

A generator of credentials instances.


๐ŸŽ€ update_credential(credential, **attrs)

Update a credential. glow-up time โœจ

Parameters

  • credential โ€” either the ID of a credential or a Credential <#openstack.identity.v3.credential.Credential> instance.
  • attrs โ€” the attributes to update on the credential represented by credential. sprinkle sprinkle ๐Ÿงš

Returns

The updated credential


๐Ÿ‘‘ Domain Operations ๐Ÿ‘‘

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

like, that is the whole constructor signature and I am not about to paraphrase it. it's giving very "read it and weep" energy ๐Ÿ’€ every kwarg stays, fr fr.


โญ create_domain(**attrs)

Create a brand new domain from attributes. fresh out the box ๐ŸŽ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Domain <#openstack.identity.v3.domain.Domain>, comprised of the properties on the Domain class.

Returns

The results of domain creation


๐Ÿ’– delete_domain(domain, ignore_missing=True)

Delete a domain. gone, bye, slay ๐Ÿซถ

Parameters

  • domain โ€” the value can be either the ID of a domain or a Domain <#openstack.identity.v3.domain.Domain> instance.
  • ignore_missing โ€” when it's False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the domain doesn't exist. when it's True, no exception gets set when you try to delete a domain that never existed. we love a graceful exit ๐Ÿ’…

Returns

None


๐Ÿ”ฅ find_domain(name_or_id, ignore_missing=True)

Find a single domain. detective mode ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a domain.
  • ignore_missing โ€” set it to False and a NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. set it to True and you get None back when you go hunting for a nonexistent resource. choosing peace, honestly ๐ŸŒธ

Returns

One Domain <#openstack.identity.v3.domain.Domain> or None


๐Ÿ’œ get_domain(domain)

Get a single domain. just the one. periodt ๐Ÿ‘‘

Parameters

  • domain โ€” the value can be the ID of a domain or a Domain <#openstack.identity.v3.domain.Domain> instance.

Returns

One Domain <#openstack.identity.v3.domain.Domain>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


๐ŸŒˆ domains(**query)

Retrieve a generator of domains. a whole parade of them ๐ŸŽ‰

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of domain instances.


โœจ update_domain(domain, **attrs)

Update a domain. the glow-up continues ๐Ÿ’ซ

Parameters

  • domain โ€” either the ID of a domain or a Domain <#openstack.identity.v3.domain.Domain> instance.
  • attrs โ€” the attributes to update on the domain represented by domain.

Returns

The updated domain


๐ŸŽ€ Domain Config Operations ๐ŸŽ€

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

same signature, same energy, we are not re-typing our feelings about it ๐Ÿ’€


๐Ÿ“ create_domain_config(domain, **attrs)

Create a new config for a domain from attributes. cute little config baby ๐Ÿงš

Parameters

  • domain โ€” the value can be the ID of a domain or a Domain <#openstack.identity.v3.domain.Domain> instance.
  • attrs โ€” keyword arguments which will be used to create a DomainConfig <#openstack.identity.v3.domain_config.DomainConfig> comprised of the properties on the DomainConfig class.

Returns

The results of domain config creation


๐Ÿฆ‹ delete_domain_config(domain, ignore_missing=True)

Delete a config for a domain. bye config ๐Ÿ’…

Parameters

  • domain โ€” the value can be the ID of a domain or a a Domain <#openstack.identity.v3.domain.Domain> instance.
  • ignore_missing โ€” when it's False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the identity provider doesn't exist. when it's True, no exception gets set when you attempt to delete a nonexistent config for a domain. ๐Ÿซถ
๐Ÿ‘€ ok so heads up: yes, the original really does say "the identity provider does not exist" in a domain-config method. not a typo I made, not me being chaotic โ€” copying it faithfully, bestie. don't shoot the messenger ๐Ÿ’€

Returns

None


๐ŸŒธ get_domain_config(domain)

Get a single config for a domain.

Parameters

  • domain_id โ€” the value can be the ID of a domain or a Domain <#openstack.identity.v3.domain.Domain> instance.

Returns

One DomainConfig <#openstack.identity.v3.domain_config.DomainConfig>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


โญ update_domain_config(domain, **attrs)

Update a config for a domain. glow-up, config edition โœจ

Parameters

  • domain_id โ€” the value can be the ID of a domain or a Domain <#openstack.identity.v3.domain.Domain> instance.
  • attrs โ€” the attributes to update on the config for a domain represented by domain_id.

Returns

The updated config for a domain


๐Ÿ’œ Endpoint Operations ๐Ÿ’œ

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

yes it's the same giant kwargs list again. it's giving "copy-paste but make it โœจdocumentationโœจ" ๐ŸŒˆ


๐Ÿ”ฅ create_endpoint(**attrs)

Create a new endpoint from attributes. new endpoint just dropped ๐Ÿ‘‘

Parameters

  • attrs โ€” keyword arguments which will be used to create a Endpoint <#openstack.identity.v3.endpoint.Endpoint>, comprised of the properties on the Endpoint class.

Returns: The results of endpoint creation โœจ

  • delete_endpoint(endpoint, ignore_missing=True) โ€” Delete an endpoint ๐Ÿ’…
    • Parameters:
      • endpoint โ€” The value can be either the ID of an endpoint or a Endpoint <#openstack.identity.v3.endpoint.Endpoint> instance.
      • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the endpoint does not exist. When set to True, no exception will be set when attempting to delete a nonexistent endpoint.
    • Returns: None
  • find_endpoint(name_or_id, ignore_missing=True) โ€” Find a single endpoint ๐ŸŽ€
    • Parameters:
      • name_or_id โ€” The name or ID of a endpoint.
      • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
    • Returns: One Endpoint <#openstack.identity.v3.endpoint.Endpoint> or None
  • get_endpoint(endpoint) โ€” Get a single endpoint ๐Ÿฆ‹
    • Parameters:
      • endpoint โ€” The value can be the ID of an endpoint or a Endpoint <#openstack.identity.v3.endpoint.Endpoint> instance.
    • Returns: One Endpoint <#openstack.identity.v3.endpoint.Endpoint>
    • Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.
  • endpoints(**query) โ€” Retrieve a generator of endpoints ๐ŸŒˆ
    • Parameters:
      • query โ€” Optional query parameters to be sent to limit the resources being returned.
    • Returns: A generator of endpoint instances.
  • update_endpoint(endpoint, **attrs) โ€” Update a endpoint ๐Ÿ’–
    • Parameters:
      • endpoint โ€” Either the ID of an endpoint or a Endpoint <#openstack.identity.v3.endpoint.Endpoint> instance.
      • attrs โ€” The attributes to update on the endpoint represented by endpoint.
    • Returns: The updated endpoint
  • endpoint_group_endpoints(endpoint_group, **query) โ€” Retrieve a generator of endpoints which are associated with the endpoint_group. ๐Ÿ‘‘
    • Parameters:
      • endpoint_group โ€” Either the endpoint_group ID or an instance of EndpointGroup
      • query โ€” Optional query parameters to be sent to limit the resources being returned.
    • Returns: A generator of endpoint instances.
  • project_endpoints(project, **query) โ€” Retrieve a generator of endpoints which are associated with the project. ๐ŸŒธ
    • Parameters:
      • project โ€” Either the project ID or an instance of Project <#openstack.identity.v3.project.Project>
      • query โ€” Optional query parameters to be sent to limit the resources being returned.
    • Returns: A generator of endpoint instances.
  • associate_endpoint_with_project(project, endpoint) โ€” Creates a direct association between project and endpoint ๐Ÿ”ฅ
    • Parameters:
      • project โ€” Either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.
      • endpoint โ€” Either the ID of an endpoint or a Endpoint <#openstack.identity.v3.endpoint.Endpoint> instance.
    • Returns: None
  • disassociate_endpoint_from_project(project, endpoint) โ€” Removes a direct association between project and endpoint ๐Ÿ’€
    • Parameters:
      • project โ€” Either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.
      • endpoint โ€” Either the ID of an endpoint or a Endpoint <#openstack.identity.v3.endpoint.Endpoint> instance.
    • Returns: None

๐Ÿ’– Endpoint Group Operations ๐Ÿ’–

Same proxy class signature, exact same kwargs โ€” here it is in all its glory:

       class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)
  • create_endpoint_group(**attrs) โ€” Create a new endpoint group from attributes ๐ŸŽ€
    • Parameters:
      • attrs โ€” Keyword arguments which will be used to create a EndpointGroup, comprised of the properties on the EndpointGroup class.
    • Returns: The results of endpoint group creation
  • delete_endpoint_group(endpoint_group, ignore_missing=True) โ€” Delete an endpoint group ๐Ÿ’…
    • Parameters:
      • endpoint_group โ€” The value can be either the ID of an endpoint group or a EndpointGroup instance.
      • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the endpoint group does not exist. When set to True, no exception will be set when attempting to delete a nonexistent endpoint group.
    • Returns: None
  • find_endpoint_group(name_or_id, ignore_missing=True) โ€” Find a single endpoint group ๐Ÿฆ‹
    • Parameters:
      • name_or_id โ€” The name or ID of a endpoint group.
      • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
    • Returns: One EndpointGroup or None
  • get_endpoint_group(endpoint_group) โ€” Get a single endpoint group ๐ŸŒˆ
    • Parameters:
      • endpoint_group โ€” The value can be the ID of an endpoint group or a EndpointGroup instance.
    • Returns: One EndpointGroup
    • Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.
  • endpoint_groups(**query) โ€” Retrieve a generator of endpoint groups โœจ
    • Parameters:
      • query โ€” Optional query parameters to be sent to limit the resources being returned.
    • Returns: A generator of endpoint group instances.
  • update_endpoint_group(endpoint_group, **attrs) โ€” Update an endpoint group ๐Ÿ’–
    • Parameters:
      • endpoint_group โ€” Either the ID of an endpoint group or a EndpointGroup instance.
      • attrs โ€” The attributes to update on the endpoint group represented by endpoint_group.
    • Returns: The updated endpoint group
  • project_endpoint_groups(project, **query) โ€” Retrieve a generator of endpoint groups which are associated with the project. ๐Ÿ‘‘
    • Parameters:
      • project โ€” Either the project ID or an instance of Project <#openstack.identity.v3.project.Project>
      • query โ€” Optional query parameters to be sent to limit the resources being returned.
    • Returns: A generator of endpoint group instances.

๐ŸŒธ Group Operations ๐ŸŒธ

Same proxy class signature again โ€” no cap, it really is this long:

       class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)
  • create_group(**attrs) โ€” Create a new group from attributes ๐Ÿซถ
    • Parameters:
      • attrs โ€” Keyword arguments which will be used to create a Group <#openstack.identity.v3.group.Group>, comprised of the properties on the Group class.
    • Returns: The results of group creation โœจ

delete_group(group, ignore_missing=True)

Delete a group ๐Ÿ—‘๏ธ โ€” bye bestie, you're out of the group chat (the literal group chat).

  • group โ€” honestly could be either the ID of a group, or a full Group <#openstack.identity.v3.group.Group> instance. Either one works, she's flexible.
  • ignore_missing โ€” okay so this is the important one. Set it to False and a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the group doesn't exist. Set it to True and no exception will be set when attempting to delete a nonexistent group. So True = "idk her, moving on ๐Ÿ’…", False = "we're gonna have a problem".

Returns โ€” None. That's it. Nothing. Void. Silence. ๐Ÿ˜Œ


find_group(name_or_id, ignore_missing=True, **query)

Find a single group ๐Ÿ” โ€” one (1) group, no more, no less.

  • name_or_id โ€” the name or ID of a group. That's the whole brief.
  • ignore_missing โ€” set to False and NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. Set to True and None gets returned when attempting to find a nonexistent resource. So like, you asked, she's not there, you get None and you can go about your day ๐Ÿซถ

Returns โ€” One Group <#openstack.identity.v3.group.Group> or None. That's the vibe check result.


get_group(group)

Get a single group โญ โ€” just one, thanks.

  • group โ€” the value can be the ID of a group or a Group <#openstack.identity.v3.group.Group> instance.

Returns โ€” One Group <#openstack.identity.v3.group.Group>.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. So if she's not there, she's not there, and the SDK will let you know loudly ๐Ÿ˜ญ


groups(**query)

Retrieve a generator of groups โœจ โ€” all of them, streaming in like your feed.

  • query โ€” optional query parameters to be sent to limit the resources being returned. Use this if you don't want the entire population of groups, bestie.

Returns โ€” a generator of group instances. Generator, not a list, iykyk ๐Ÿ”ฅ


update_group(group, **attrs)

Update a group ๐ŸŽ€ โ€” little glow-up, no big deal.

  • group โ€” either the ID of a group or a Group <#openstack.identity.v3.group.Group> instance.
  • attrs โ€” the attributes to update on the group represented by group. Whatever you pass, that's what changes.

Returns โ€” the updated group ๐Ÿ‘‘


add_user_to_group(user, group)

Add user to group ๐Ÿซถ โ€” putting the person in the group chat.

  • user โ€” either the ID of a user or a User <#openstack.identity.v3.user.User> instance.
  • group โ€” either the ID of a group or a Group <#openstack.identity.v3.group.Group> instance.

Returns โ€” None. She did the thing and said nothing. Main character energy.


remove_user_from_group(user, group)

Remove user to group ๐Ÿ’€ โ€” yes, that's how the original says it, and yes, it means taking the user out of the group. Nobody's perfect.

  • user โ€” either the ID of a user or a User <#openstack.identity.v3.user.User> instance.
  • group โ€” either the ID of a group or a Group <#openstack.identity.v3.group.Group> instance.

Returns โ€” None. Boom, they're out. ๐Ÿ™ˆ


check_user_in_group(user, group)

Check whether user belongsto group ๐Ÿ‘€ โ€” the ultimate "are they in the group chat or not".

  • user โ€” either the ID of a user or a User <#openstack.identity.v3.user.User> instance.
  • group โ€” either the ID of a group or a Group <#openstack.identity.v3.group.Group> instance.

Returns โ€” a boolean representing current relation. So True = they're in, False = they're not. Periodt.


group_users(group, **attrs)

List users in a group ๐ŸŒˆ โ€” the full roster.

  • group โ€” either the ID of a group or a Group <#openstack.identity.v3.group.Group> instance.
  • attrs โ€” heads up, only password_expires_at can be filter for result. That is literally the only one, so don't try anything else ๐Ÿ’…

Returns โ€” List of User <#openstack.identity.v3.user.User>. The whole squad, listed out.


๐Ÿฆ‹ Policy Operations ๐Ÿฆ‹

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Yes bestie, that whole signature is real and every single kwarg is there. Do not ask me to shorten it, I would never ๐Ÿ˜ค


create_policy(**attrs)

Create a new policy from attributes โœจ โ€” birthing a policy, iconic.

  • attrs โ€” keyword arguments which will be used to create a Policy <#openstack.identity.v3.policy.Policy>, comprised of the properties on the Policy class.

Returns โ€” the results of policy creation. Look at her, she's created ๐Ÿ’–


delete_policy(policy, ignore_missing=True)

Delete a policy ๐Ÿ—‘๏ธ โ€” say bye.

  • policy โ€” the value can be either the ID of a policy or a Policy <#openstack.identity.v3.policy.Policy> instance.
  • ignore_missing โ€” set to False and NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the policy does not exist. Set to True and no exception will be set when attempting to delete a nonexistent policy. Ghost policy? No problem. ๐Ÿซถ

Returns โ€” None. Nothing to report.


find_policy(name_or_id, ignore_missing=True)

Find a single policy ๐Ÿ” โ€” just the one, thank you.

  • name_or_id โ€” the name or ID of a policy.
  • ignore_missing โ€” set to False and NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. Set to True and None will be returned when attempting to find a nonexistent resource. She's either there or she's a None, no drama.

Returns โ€” One Policy <#openstack.identity.v3.policy.Policy> or None.


get_policy(policy)

Get a single policy โญ โ€” grab her.

  • policy โ€” the value can be the ID of a policy or a Policy <#openstack.identity.v3.policy.Policy> instance.

Returns โ€” One Policy <#openstack.identity.v3.policy.Policy>.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. Loud and clear ๐Ÿ“ข


policies(**query)

Retrieve a generator of policies ๐ŸŽ€ โ€” all of them, one by one.

  • query โ€” optional query parameters to be sent to limit the resources being returned. Filtering is self-care.

Returns โ€” a generator of policy instances. Not a list! A generator. Ngl this matters.


update_policy(policy, **attrs)

Update a policy ๐Ÿ’… โ€” the glow-up chapter.

  • policy โ€” either the ID of a policy or a Policy <#openstack.identity.v3.policy.Policy> instance.
  • attrs โ€” the attributes to update on the policy represented by policy.

Returns โ€” the updated policy. Serving fresh โœจ


๐ŸŒธ Project Operations ๐ŸŒธ

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Same signature, same energy, different operations. She's consistent like that. ๐Ÿ’œ


create_project(**attrs)

Create a new project from attributes ๐Ÿ”ฅ โ€” new project, new era.

  • attrs โ€” keyword arguments which will be used to create a Project <#openstack.identity.v3.project.Project>, comprised of the properties on the Project class.

Returns โ€” the results of project creation. Slay.


delete_project(project, ignore_missing=True)

Delete a project ๐Ÿ’€ โ€” close the whole thing down.

  • project โ€” the value can be either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.
  • ignore_missing โ€” set to False and NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the project does not exist. Set to True and no exception will be set when attempting to delete a nonexistent project. So if you're not sure she's real, leave it at True and move on with your life ๐Ÿ˜Œ

Returns โ€” None.


find_project(name_or_id, ignore_missing=True, **query)

Find a single project ๐Ÿฆ‹ โ€” one project, coming right up.

  • name_or_id โ€” the name or ID of a project.
  • ignore_missing โ€” bestie, if you set this to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets thrown the moment the resource doesn't exist, no cap. Set it to True instead and you just get None back when you go looking for something that's not there. Softest possible landing tbh ๐Ÿซถ

Returns

One Project <#openstack.identity.v3.project.Project> or None โ€” that's it, that's the whole vibe โœจ


๐Ÿ’– get_project(project)

Grab exactly one project. One. Singular. Main character only ๐ŸŒŸ

Parameters

  • project โ€” this can be the ID of a project, or a whole Project <#openstack.identity.v3.project.Project> instance if you already have one chilling in your code.

Returns

One Project <#openstack.identity.v3.project.Project> ๐Ÿ’…

Heads up: this Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. So if there's nothing there, it WILL tell you, loudly ๐Ÿ˜ญ

๐ŸŒธ projects(**query)

Retrieve a generator of projects โ€” like, all of them, streaming at you one at a time, no big list energy ๐Ÿฆ‹

Parameters

  • query โ€” optional query parameters you can send along to limit the resources being returned. Filter away, queen ๐Ÿ‘‘

Returns

A generator of project instances. It's giving infinite scroll but for projects fr fr.


๐ŸŽ€ user_projects(user, **query)

Retrieve a generator of projects to which the user has authorization to access. Basically "what can this person even touch" check ๐Ÿ”ฅ

Parameters

  • user โ€” either the user id or an instance of User <#openstack.identity.v3.user.User>
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of project instances ๐ŸŒˆ


โญ endpoint_projects(endpoint, **query)

Retrieve a generator of projects which are associated with the endpoint. The linkage detective work, lowkey iconic ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • endpoint โ€” either the endpoint ID or an instance of Endpoint <#openstack.identity.v3.endpoint.Endpoint>
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of project instances ๐Ÿ’œ


๐Ÿฆ‹ update_project(project, **attrs)

Update a project. Glow-up time โœจ

Parameters

  • project โ€” either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.
  • attrs โ€” the attributes to update on the project represented by project.

Returns

The updated project ๐Ÿ‘‘


๐Ÿ’€ endpoint_group_projects(endpoint_group, **query)

Retrieve a generator of projects which are associated with the endpoint group. Group-chat membership but for projects, iykyk ๐Ÿซถ

Parameters

  • group (endpoint) โ€” either the endpoint group ID or an instance of EndpointGroup
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of project instances ๐ŸŒŸ


๐Ÿ“ associate_project_with_endpoint_group(endpoint_group, project)

Create a direct association between the endpoint group and project. Matchmaker, matchmaker ๐Ÿงš

Parameters

  • endpoint_group โ€” either the ID of an endpoint group or a EndpointGroup instance.
  • project โ€” either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.

Returns

None โ€” nothing back, but the connection is made, trust ๐Ÿ’–


๐Ÿ™ˆ disassociate_project_from_endpoint_group(endpoint_group, project)

Removes a direct association between endpoint group and project. Unmatching, we've all been there ๐Ÿ˜ญ

Parameters

  • endpoint_group โ€” either the ID of an endpoint group or a EndpointGroup instance.
  • project โ€” either the ID of a project or a Project <#openstack.identity.v3.project.Project> instance.

Returns

None ๐Ÿซฅ


โœจ Service Operations โœจ

Okay so here's the class you're working through. Copy it exactly, don't be creative with it bestie:

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿ’… create_service(**attrs)

Create a new service from attributes. New service just dropped ๐Ÿ”ฅ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Service <#openstack.identity.v3.service.Service>, comprised of the properties on the Service class.

Returns

The results of service creation โœจ


๐Ÿงš delete_service(service, ignore_missing=True)

Delete a service. Bye bestie ๐Ÿ‘‹

Parameters

  • service โ€” the value can be either the ID of a service or a Service <#openstack.identity.v3.service.Service> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the service does not exist. When set to True, no exception will be set when attempting to delete a nonexistent service. Chill mode is the default ๐Ÿซถ

Returns

None


๐ŸŒˆ find_service(name_or_id, ignore_missing=True)

Find a single service. Detective mode, activated ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • name_or_id โ€” the name or ID of a service.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns

One Service <#openstack.identity.v3.service.Service> or None โ€” could go either way, honestly ๐Ÿ’€


๐ŸŽ€ get_service(service)

Get a single service. Just the one. Very demure ๐ŸŒธ

Parameters

  • service โ€” the value can be the ID of a service or a Service <#openstack.identity.v3.service.Service> instance.

Returns

One Service <#openstack.identity.v3.service.Service> โญ

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. So like, don't be surprised ๐Ÿ˜ญ


๐Ÿฆ‹ services(**query)

Retrieve a generator of services โ€” streaming the whole lineup at you ๐Ÿ’œ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of service instances. Periodt.


๐Ÿ‘‘ update_service(service, **attrs)

Update a service. Service glow-up arc ๐ŸŒŸ

Parameters

  • service โ€” either the ID of a service or a Service <#openstack.identity.v3.service.Service> instance.
  • attrs โ€” the attributes to update on the service represented by service.

Returns

The updated service ๐Ÿ”ฅ


๐Ÿ’œ User Operations ๐Ÿ’œ

Same class, same exact signature โ€” yes, it's the same block again, that's just how the page is laid out, don't come for me ๐Ÿ™ˆ

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿ“ create_user(**attrs)

Create a new user from attributes. New person, who dis ๐Ÿ’…

Parameters

  • attrs โ€” keyword arguments which will be used to create a User <#openstack.identity.v3.user.User>, comprised of the properties on the User class.

Returns

The results of user creation โœจ


๐ŸŒธ delete_user(user, ignore_missing=True)

Delete a user. It's giving blocked ๐Ÿซฅ

Parameters

  • user โ€” the value can be either the ID of a user or a User <#openstack.identity.v3.user.User> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the user does not exist. When set to True, no exception will be set when attempting to delete a nonexistent user.

Returns

None ๐ŸŽ€


โญ find_user(name_or_id, ignore_missing=True, **query)

Find a single user. Where they at ๐Ÿ‘€

Parameters

  • name_or_id โ€” the name or ID of a user.
  • ignore_missing โ€” vibe check on missing stuff: set it to False and a NotFoundException <#openstack.exceptions.NotFoundException> gets thrown the moment the resource doesn't exist. Set it to True and you just get None back when you go looking for something that isn't there. no drama, no crash. ๐Ÿซถ

Returns One User <#openstack.identity.v3.user.User> or None

get_user(user)

Get a single user. one. just the one. ๐Ÿ’…

Parameters

  • user โ€” can be the ID of a user, or a User <#openstack.identity.v3.user.User> instance. either is slay.

Returns One User <#openstack.identity.v3.user.User>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. so like, if it's giving nothing, it tells you. ๐Ÿ˜ญ

user_groups(user)

List groups a user is in. like, which group chats is this person actually in. ๐Ÿ‘‘

Parameters

  • user โ€” either the ID of a user or a User <#openstack.identity.v3.user.User> instance

Returns List of group

users(**query)

Retrieve a generator of users. all of them. a whole generator, so it's lowkey efficient bestie. โœจ

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns A generator of user instances.

update_user(user, **attrs)

Update a user. glow-up time. ๐Ÿฆ‹

Parameters

  • user โ€” Either the ID of a user or a User <#openstack.identity.v3.user.User> instance.
  • attrs โ€” The attributes to update on the user represented by attrs.

Returns The updated user

update_password(user, current_password, password)

Update the password for the user the token belongs to. putting in the old one to set the new one, very "confirm your identity" of it. ๐Ÿ”

Parameters

  • user โ€” Either the ID of a user or a User <#openstack.identity.v3.user.User> instance.
  • current_password โ€” The user's current password.
  • password โ€” The user's new password.

Returns None


๐ŸŽ€ Token Operations ๐ŸŽ€

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

validate_token(token, nocatalog=False, allow_expired=False)

Validate a token. is it real? is it valid? we find out. ๐Ÿ”ฅ

Parameters

  • token โ€” The token to validate.
  • nocatalog โ€” Whether the returned token should not include a catalog.
  • allow_expired โ€” Whether to allow expired tokens.

Returns A Token <#openstack.identity.v3.token.Token>.

check_token(token, allow_expired=False)

Check if a token is valid. simple yes-or-no energy. โญ

Parameters

  • token โ€” The token to check.
  • allow_expired โ€” Whether to allow expired tokens.

Returns True if valid, else False.

revoke_token(token)

Revoke a token. blocking them. unfollowing. it's over. ๐Ÿ’€

Parameters

  • token โ€” The token to revoke.

Returns None


๐Ÿ’– Trust Operations ๐Ÿ’–

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_trust(**attrs)

Create a new trust from attributes. building trust fr fr. ๐Ÿซถ

Parameters

  • attrs โ€” Keyword arguments which will be used to create a Trust <#openstack.identity.v3.trust.Trust>, comprised of the properties on the Trust class.

Returns The results of trust creation

delete_trust(trust, ignore_missing=True)

Delete a trust. okay bye. ๐Ÿ‘‹

Parameters

  • trust โ€” The value can be either the ID of a trust or a Trust <#openstack.identity.v3.trust.Trust> instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the credential does not exist. When set to True, no exception will be set when attempting to delete a nonexistent credential.

Returns None

find_trust(name_or_id, ignore_missing=True)

Find a single trust. where is it. we must locate it. ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of a trust.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns One Trust <#openstack.identity.v3.trust.Trust> or None

get_trust(trust)

Get a single trust. just the one. giving main character. ๐Ÿ‘‘

Parameters

  • trust โ€” The value can be the ID of a trust or a Trust <#openstack.identity.v3.trust.Trust> instance.

Returns One Trust <#openstack.identity.v3.trust.Trust>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

trusts(**query)

Retrieve a generator of trusts. the whole collection, lazily. โœจ

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns A generator of trust instances.


๐ŸŒˆ Region Operations ๐ŸŒˆ

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_region(**attrs)

Create a new region from attributes. new region just dropped. ๐ŸŒ

Parameters

  • attrs โ€” Keyword arguments which will be used to create a Region <#openstack.identity.v3.region.Region>, comprised of the properties on the Region class.

Returns The results of region creation.

delete_region(region, ignore_missing=True)

Delete a region. yeeting it. ๐Ÿ—‘๏ธ

Parameters

  • region โ€” The value can be either the ID of a region or a Region <#openstack.identity.v3.region.Region> instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the region does not exist. When set to True, no exception will be thrown when attempting to delete a nonexistent region.

Returns None

find_region(name_or_id, ignore_missing=True)

Find a single region. gotta find it first bestie. ๐Ÿ”Ž

Parameters

  • name_or_id โ€” The name or ID of a region.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the region does not exist. When set to True, None will be returned when attempting to find a nonexistent region.

Returns One Region <#openstack.identity.v3.region.Region> or None

get_region(region)

Get a single region. ๐Ÿ’…

Parameters

  • region โ€” The value can be the ID of a region or a Region <#openstack.identity.v3.region.Region> instance.

Returns One Region <#openstack.identity.v3.region.Region>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no matching region can be found.

regions(**query)

Retrieve a generator of regions

Parameters

  • query โ€” optional query params bestie, sent along to limit the regions being returned. ๐Ÿ’…

Returns

A generator of region instances. โœจ


โœจ update_region(region, **attrs) โœจ

Update a region. We love a lil glow-up. ๐Ÿ’–

Parameters

  • region โ€” either the ID of a region or a Region instance (openstack.identity.v3.region.Region). ๐Ÿฆ‹
  • attrs โ€” the attributes to update on the region represented by region. ๐ŸŽ€

Returns

The updated region. Slay. ๐Ÿ‘‘


๐Ÿ’– Role Operations ๐Ÿ’–

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐ŸŒธ create_role(**attrs) ๐ŸŒธ

Create a shiny new role from attributes. Main character creation energy. ๐Ÿ’ซ

Parameters

  • attrs โ€” keyword arguments used to create a Role (openstack.identity.v3.role.Role), made up of the properties on the Role class. ๐ŸŽ€

Returns

The results of role creation. Obsessed. ๐Ÿ’–


๐Ÿฆ‹ delete_role(role, ignore_missing=True) ๐Ÿฆ‹

Delete a role. Bye bestie. ๐Ÿ‘‹

Parameters

  • role โ€” the value can be either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐Ÿ’…
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the role does not exist. When set to True, no exception will be thrown when attempting to delete a nonexistent role. ๐Ÿ™ˆ

Returns

None โ€” that's literally it. ๐Ÿคทโ€โ™€๏ธ


๐ŸŽ€ find_role(name_or_id, ignore_missing=True, **query) ๐ŸŽ€

Find a single role. Detective mode: activated. ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a role. ๐Ÿฆ‹
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the role does not exist. When set to True, None will be returned when attempting to find a nonexistent role. ๐Ÿ˜ญ

Returns

One Role (openstack.identity.v3.role.Role) or None. ๐Ÿ’…


โœจ get_role(role) โœจ

Get a single role. Gimme gimme. ๐Ÿซถ

Parameters

  • role โ€” the value can be the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐ŸŒธ

Returns

One Role (openstack.identity.v3.role.Role). ๐Ÿ‘‘

Raises

NotFoundException (openstack.exceptions.NotFoundException) when no matching role can be found. ๐Ÿ’€


๐ŸŒˆ roles(**query) ๐ŸŒˆ

Retrieve a generator of roles. Endless scroll, but make it IAM. ๐Ÿ“œ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. The options are: domain_id, name. โœจ

Returns

A generator of role instances. ๐Ÿฆ‹


๐Ÿ’œ update_role(role, **attrs) ๐Ÿ’œ

Update a role. Small tweaks, big vibes. ๐Ÿ’…

Parameters

  • role โ€” either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐ŸŽ€
  • kwargs โ€” the attributes to update on the role represented by value. Only name can be updated. โš ๏ธ

Returns

The updated role. Slay. ๐Ÿ‘‘


๐ŸŽ€ Role Assignment Operations ๐ŸŽ€

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿฆ‹ role_assignments_filter(domain=None, project=None, system=None, group=None, user=None) ๐Ÿฆ‹

Retrieve a generator of roles assigned to user/group. Filtering era. ๐Ÿ’–

Parameters

  • domain โ€” either the ID of a domain or a Domain instance (openstack.identity.v3.domain.Domain). ๐ŸŒธ
  • project โ€” either the ID of a project or a Project instance (openstack.identity.v3.project.Project). ๐ŸŽ€
  • system โ€” either the system name or a System instance (openstack.identity.v3.system.System). ๐Ÿฆ‹
  • group โ€” either the ID of a group or a Group instance (openstack.identity.v3.group.Group). ๐Ÿ’…
  • user โ€” either the ID of a user or a User instance (openstack.identity.v3.user.User). โœจ

Returns

A generator of role instances. ๐ŸŒˆ


๐Ÿ’œ role_assignments(**query) ๐Ÿ’œ

Retrieve a generator of role assignments. The lore. ๐Ÿ“š

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. The options are: group_id, role_id, scope_domain_id, scope_project_id, inherited_to, user_id, include_names, include_subtree. ๐ŸŽ€

Returns

RoleAssignment (openstack.identity.v3.role_assignment.RoleAssignment). ๐Ÿ‘‘


๐ŸŒธ assign_domain_role_to_user(domain, user, role, *, inherited=False) ๐ŸŒธ

Assign role to user on a domain. Giving them the keys, respectfully. ๐Ÿ”‘

Parameters

  • domain โ€” either the ID of a domain or a Domain instance (openstack.identity.v3.domain.Domain). ๐Ÿฆ‹
  • user โ€” either the ID of a user or a User instance (openstack.identity.v3.user.User). ๐Ÿ’…
  • role โ€” either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐ŸŽ€
  • inherited โ€” whether the role assignment is inherited. ๐ŸŒฑ

Returns

None โ€” no cap. โœจ


๐Ÿฆ‹ unassign_domain_role_from_user(domain, user, role, *, inherited=False) ๐Ÿฆ‹

Unassign role from user on a domain. Revoking access, iconic behavior. ๐Ÿšซ

Parameters

  • domain โ€” either the ID of a domain or a Domain instance (openstack.identity.v3.domain.Domain). ๐ŸŒธ
  • user โ€” either the ID of a user or a User instance (openstack.identity.v3.user.User). ๐Ÿ’…
  • role โ€” either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐ŸŽ€
  • inherited โ€” whether the role assignment is inherited. ๐ŸŒฑ

Returns

None. Periodt. ๐Ÿ’…


โœจ validate_user_has_domain_role(domain, user, role, *, inherited=False) โœจ

Validates that a user has a role on a domain. Vibe check, but for IAM. โœ…

Parameters

  • domain โ€” either the ID of a domain or a Domain instance (openstack.identity.v3.domain.Domain). ๐Ÿฆ‹
  • user โ€” either the ID of a user or a User instance (openstack.identity.v3.user.User). ๐Ÿ’…
  • role โ€” either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐ŸŽ€

Returns

True if user has role in domain. ๐Ÿ”ฅ


๐ŸŽ€ assign_domain_role_to_group(domain, group, role, *, inherited=False) ๐ŸŽ€

Assign role to group on a domain. Group chat gets permissions. ๐Ÿ’ฌ

Parameters

  • domain โ€” either the ID of a domain or a Domain instance (openstack.identity.v3.domain.Domain). ๐ŸŒธ
  • group โ€” either the ID of a group or a Group instance (openstack.identity.v3.group.Group). ๐Ÿฆ‹
  • role โ€” either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐Ÿ’…
  • inherited โ€” whether the role assignment is inherited. ๐ŸŒฑ

Returns

None. ๐Ÿ’–


๐ŸŒˆ unassign_domain_role_from_group(domain, group, role, *, inherited=False) ๐ŸŒˆ

Unassign role from group on a domain. Removing them from the group project. ๐Ÿ˜ญ

Parameters

  • domain โ€” either the ID of a domain or a Domain instance (openstack.identity.v3.domain.Domain). ๐ŸŽ€
  • group โ€” either the ID of a group or a Group instance (openstack.identity.v3.group.Group). ๐Ÿฆ‹
  • role โ€” either the ID of a role or a Role instance (openstack.identity.v3.role.Role). ๐Ÿ’…
  • inherited โ€” whether the role assignment is inherited. ๐ŸŒฑ

Returns

None. ๐Ÿซถ


๐Ÿ’œ validate_group_has_domain_role(domain, group, role, *, inherited=False) ๐Ÿ’œ

Validates that a group has a role on a domain. Checking the receipts. ๐Ÿงพ

Parameters

  • domain โ€” either the ID of a domain, or a Domain instance (that's openstack.identity.v3.domain.Domain for you โœจ)
    • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
    • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)

Returns โ€” True if the group has that role on the domain ๐Ÿซถ


assign_project_role_to_user(project, user, role, *, inherited=False)

Hand a role to a user, on a project. That's it, that's the vibe ๐Ÿ’…

Parameters

  • project โ€” either the ID of a project, or a Project instance (openstack.identity.v3.project.Project)
  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • inherited โ€” whether the role assignment is inherited ๐Ÿ‘‘

Returns โ€” None


unassign_project_role_from_user(project, user, role, *, inherited=False)

Take that role back from the user on a project. Reversal arc, we love to see it ๐Ÿ˜ญ

Parameters

  • project โ€” either the ID of a project, or a Project instance (openstack.identity.v3.project.Project)
  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • inherited โ€” whether the role assignment is inherited ๐Ÿ‘‘

Returns โ€” None


validate_user_has_project_role(project, user, role, *, inherited=False)

Checks that a user fr fr has a role on a project ๐Ÿ”

Parameters

  • project โ€” either the ID of a project, or a Project instance (openstack.identity.v3.project.Project)
  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)

Returns โ€” True if the user has that role in the project ๐Ÿ’–


assign_project_role_to_group(project, group, role, *, inherited=False)

Same energy as the user version, but the whole group eats ๐Ÿ“

Parameters

  • project โ€” either the ID of a project, or a Project instance (openstack.identity.v3.project.Project)
  • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • inherited โ€” whether the role assignment is inherited ๐Ÿ‘‘

Returns โ€” None


unassign_project_role_from_group(project, group, role, *, inherited=False)

Yank the role back off the group on that project ๐Ÿ™ˆ

Parameters

  • project โ€” either the ID of a project, or a Project instance (openstack.identity.v3.project.Project)
  • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • inherited โ€” whether the role assignment is inherited ๐Ÿ‘‘

Returns โ€” None


validate_group_has_project_role(project, group, role, *, inherited=False)

Vibe check: does this group actually have this role on this project? ๐ŸŒˆ

Parameters

  • project โ€” either the ID of a project, or a Project instance (openstack.identity.v3.project.Project)
  • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)

Returns โ€” True if the group has that role in the project โœจ


assign_system_role_to_user(user, role, system)

Now we're at the system level โ€” assign a role to a user on a system, no inherited kwarg here bestie, note the difference ๐Ÿ’€

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • system โ€” the system name

Returns โ€” None


unassign_system_role_from_user(user, role, system)

Take the system-level role away from the user. Bye bestie ๐Ÿ‘‹

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • system โ€” the system name

Returns โ€” None


validate_user_has_system_role(user, role, system)

Does the user hold this role on the system? Let's find out ๐Ÿ”ฅ

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • system โ€” the system name

Returns โ€” True if the user has that role in the system ๐Ÿ’œ


assign_system_role_to_group(group, role, system)

Group edition of the system-level handout. Same three args, no kwarg ๐ŸŽ€

Parameters

  • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • system โ€” the system name

Returns โ€” None


unassign_system_role_from_group(group, role, system)

And the un-assign for the group on the system. Clean up your messes, icon ๐Ÿ’…

Parameters

  • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • system โ€” the system name

Returns โ€” None


validate_group_has_system_role(group, role, system)

Checks whether the group has the role on the system. The final vibe check of this little saga ๐Ÿฆ‹

Parameters

  • group โ€” either the ID of a group, or a Group instance (openstack.identity.v3.group.Group)
  • role โ€” either the ID of a role, or a Role instance (openstack.identity.v3.role.Role)
  • system โ€” the system name

Returns โ€” True if the group has that role on the system โญ


๐ŸŽ€ Registered Limit Operations ๐ŸŽ€

New section, new obsession. Meet the proxy class in all its glory โ€” yes we're printing the whole signature, it's giving main character ๐Ÿงš

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

registered_limits(**query)

Gives you a generator of registered_limits โ€” yes, a generator, so it's lazy and cute about it โœจ

Parameters

  • query โ€” optional query parameters, sent along to limit which registered_limits come back to you.

Returns โ€” a generator of registered_limits instances. That's RegisteredLimit (openstack.identity.v3.registered_limit.RegisteredLimit) ๐Ÿซถ


get_registered_limit(registered_limit)

Grabs one single registered_limit. Just the one. Lowkey the simplest method here ๐Ÿ’–

Parameters

  • registered_limit โ€” the value can be the ID of a registered_limit, or a RegisteredLimit instance (openstack.identity.v3.registered_limit.RegisteredLimit).

Returns โ€” one RegisteredLimit (openstack.identity.v3.registered_limit.RegisteredLimit).

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found ๐Ÿ˜ญ


create_registered_limit(**attrs)

Builds a brand-new registered_limit out of attributes you pass in ๐ŸŒธ

Parameters

  • attrs โ€” keyword arguments which will be used to create a RegisteredLimit (openstack.identity.v3.registered_limit.RegisteredLimit), comprised of the properties on the RegisteredLimit class.

Returns โ€” the results of registered_limit creation.


update_registered_limit(registered_limit, **attrs)

Updates an existing registered_limit, because glow-ups are real ๐Ÿ‘‘

Parameters

aaaand the parameter list is where this part cuts off โ€” next part picks it right back up, don't @ me ๐Ÿ’€
  • registered_limit โ€” either the ID of a registered_limit, or a RegisteredLimit instance (openstack.identity.v3.registered_limit.RegisteredLimit for the full flex ๐Ÿ’…).
  • kwargs โ€” the attributes you want to update on the registered_limit that value points at.

Returns โ€” the updated registered_limit. slay โœจ

๐ŸŽ€ delete_registered_limit(registered_limit, ignore_missing=True)

Deletes a registered_limit. bye bestie ๐Ÿ‘‹

Parameters

  • registered_limit โ€” either the ID of a registered_limit, or a RegisteredLimit instance (openstack.identity.v3.registered_limit.RegisteredLimit).
  • ignore_missing โ€” set it to False and NotFoundException (openstack.exceptions.NotFoundException) will be raised when the registered_limit doesn't exist. Set it to True and nothing gets thrown when you try to delete a registered_limit that was never there. no drama, no exception ๐Ÿซถ

Returns โ€” None


๐Ÿ‹ Limit Operations

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿงต limits(**query)

Gives you a generator of limits. it's giving infinite scroll but make it quotas ๐Ÿ’€

Parameters

  • query โ€” optional query parameters, sent along to limit which limits get returned. yes we said limit twice, it's that kind of day.

Returns โ€” a generator of limits instances. ๐ŸŒˆ

๐Ÿ” get_limit(limit)

Grabs one single limit. just the one. main character only ๐Ÿ‘‘

Parameters

  • limit โ€” the value can be the ID of a limit, or a Limit instance (openstack.identity.v3.limit.Limit).

Returns โ€” one Limit (openstack.identity.v3.limit.Limit).

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ

๐Ÿ› ๏ธ create_limit(**attrs)

Makes a whole new limit out of attributes. build-a-bear but for identity quotas ๐Ÿงธ

Parameters

  • attrs โ€” keyword arguments that get used to create a Limit (openstack.identity.v3.limit.Limit), made up of the properties on the Limit class.

Returns โ€” the results of limit creation. new limit just dropped ๐Ÿ”ฅ

โœ๏ธ update_limit(limit, **attrs)

Updates a limit. glow-up time ๐Ÿ’…

Parameters

  • limit โ€” either the ID of a limit. or a Limit instance (openstack.identity.v3.limit.Limit).
  • kwargs โ€” the attributes to update on the limit represented by value.

Returns โ€” the updated limit.

๐Ÿ—‘๏ธ delete_limit(limit, ignore_missing=True)

Deletes a limit. it's over bestie ๐Ÿ’€

Parameters

  • limit โ€” the value can be either the ID of a limit, or a Limit instance (openstack.identity.v3.limit.Limit).
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the limit does not exist. When set to True, no exception will be thrown when attempting to delete a nonexistent limit. lowkey the most forgiving flag ever ๐Ÿซถ

Returns โ€” None


๐Ÿฆ‹ Application Credential Operations

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐ŸŽŸ๏ธ application_credentials(user, **query)

Hands you a generator of application credentials. no passwords, just vibes โœจ

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User).
  • query โ€” optional query parameters that get sent to limit the resources being returned.

Returns โ€” a generator of application credentials instances, i.e. ApplicationCredential (openstack.identity.v3.application_credential.ApplicationCredential).

๐Ÿ”Ž get_application_credential(user, application_credential)

Gets one single application credential. one (1) credential. iconic ๐ŸŽ€

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User).
  • application_credential โ€” the value can be the ID of a application credential, or an ApplicationCredential instance (openstack.identity.v3.application_credential.ApplicationCredential).

Returns โ€” one ApplicationCredential (openstack.identity.v3.application_credential.ApplicationCredential).

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

๐Ÿช„ create_application_credential(user, name, **attrs)

Creates a brand new application credential from attributes. fresh credential, who dis ๐ŸŒธ

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User).
  • name โ€” the name of the application credential, which is unique to the user.
  • attrs โ€” keyword arguments which will be used to create an ApplicationCredential (openstack.identity.v3.application_credential.ApplicationCredential), comprised of the properties on the ApplicationCredential class.

Returns โ€” the results of application credential creation.

๐Ÿ•ต๏ธ find_application_credential(user, name_or_id, ignore_missing=True, **query)

Finds one single application credential. detective mode ๐Ÿ”

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User).
  • name_or_id โ€” the name or ID of an application credential.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. soft launch of a search, honestly ๐Ÿซถ

Returns โ€” one ApplicationCredential (openstack.identity.v3.application_credential.ApplicationCredential) or None

๐Ÿงน delete_application_credential(user, application_credential, ignore_missing=True)

Deletes an application credential. revoke, block, delete ๐Ÿ’…

Parameters

  • user โ€” either the ID of a user, or a User instance (openstack.identity.v3.user.User).
  • application_credential โ€” the value can be either the ID of an application credential, or an ApplicationCredential instance (openstack.identity.v3.application_credential.ApplicationCredential).
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the application credential does not exist. When set to True, no exception will be thrown when attempting to delete a nonexistent application credential.

Returns โ€” None


๐Ÿงš Federation Protocol Operations

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐ŸŒ create_federation_protocol(idp, **attrs)

Creates a new federation protocol from attributes. crossing identity providers like it's nothing ๐Ÿ’ซ

Parameters

  • delete_federation_protocol(idp, protocol, ignore_missing=True) โ€” bestie, this deletes a federation protocol. gone. poof. ๐Ÿ’…

Parameters:

  • idp โ€” the ID, or an IdentityProvider instance (that's openstack.identity.v3.identity_provider.IdentityProvider), of the identity provider that the protocol is attached to. Pro tip from the docs: this can be None if protocol is itself a FederationProtocol (openstack.identity.v3.federation_protocol.FederationProtocol) instance. ๐Ÿซถ
  • protocol โ€” the ID of a federation protocol, or a FederationProtocol (openstack.identity.v3.federation_protocol.FederationProtocol) instance.
  • ignore_missing โ€” set it to False and a NotFoundException (openstack.exceptions.NotFoundException) gets raised when the federation protocol doesn't exist. set it to True and no exception fires when you try to delete a nonexistent federation protocol. no drama, no error, just vibes. โœจ

Returns: None

  • find_federation_protocol(idp, protocol, ignore_missing=True) โ€” finds you a single federation protocol, like the world's most helpful search bar ๐Ÿ”

Parameters:

  • idp โ€” the ID, or an IdentityProvider (openstack.identity.v3.identity_provider.IdentityProvider) instance, of the identity provider the protocol is attached to.
  • protocol โ€” the name or ID of a federation protocol.
  • ignore_missing โ€” False means a NotFoundException (openstack.exceptions.NotFoundException) gets raised when the resource doesn't exist. True means you just get None back when you go looking for a nonexistent resource. it's giving "no thoughts, just None" ๐Ÿ˜Œ

Returns: one federation protocol, or None

  • get_federation_protocol(idp, protocol) โ€” grabs a single federation protocol, no searching around

Parameters:

  • idp โ€” the ID, or an IdentityProvider (openstack.identity.v3.identity_provider.IdentityProvider) instance, of the identity provider the protocol is attached to. can be None if protocol is a FederationProtocol (openstack.identity.v3.federation_protocol.FederationProtocol) instance.
  • protocol โ€” the value can be the ID of a federation protocol, or a FederationProtocol (openstack.identity.v3.federation_protocol.FederationProtocol) instance.

Returns: one federation protocol

Raises: NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ’€

  • federation_protocols(idp, **query) โ€” hands you a generator of federation protocols, iconic generator behaviour fr fr

Parameters:

  • idp โ€” the ID, or an IdentityProvider (openstack.identity.v3.identity_provider.IdentityProvider) instance, of the identity provider the protocol is attached to.
  • query โ€” optional query parameters, sent along to limit the resources being returned. use them, bestie, your list will thank you ๐ŸŽ€

Returns: a generator of federation protocol instances.

  • update_federation_protocol(idp, protocol, **attrs) โ€” glow-up time for a federation protocol โœจ

Parameters:

  • idp โ€” the ID, or an IdentityProvider (openstack.identity.v3.identity_provider.IdentityProvider) instance, of the identity provider the protocol is attached to. can be None if protocol is a FederationProtocol (openstack.identity.v3.federation_protocol.FederationProtocol) instance.
  • protocol โ€” either the ID of a federation protocol, or a FederationProtocol (openstack.identity.v3.federation_protocol.FederationProtocol) instance.
  • attrs โ€” the attributes to update on the federation protocol represented by protocol.

Returns: the updated federation protocol


๐Ÿ—บ๏ธ Mapping Operations ๐Ÿ—บ๏ธ

Same class energy, one more time โ€” because yes, it's literally the same signature. here it is in full:

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_mapping(**attrs)

Creates a brand-new mapping from attributes โ€” mapping main character energy ๐Ÿ‘‘

Parameters:

  • attrs โ€” keyword arguments which will be used to create a Mapping (openstack.identity.v3.mapping.Mapping), comprised of the properties on the Mapping class.

Returns: the results of mapping creation ๐ŸŒˆ

delete_mapping(mapping, ignore_missing=True)

Deletes a mapping. bye bestie ๐Ÿฆ‹

Parameters:

  • mapping โ€” the ID of a mapping, or a Mapping (openstack.identity.v3.mapping.Mapping) instance.
  • ignore_missing โ€” set to False and a NotFoundException (openstack.exceptions.NotFoundException) is raised when the mapping doesn't exist. set to True and no exception gets set when you attempt to delete a nonexistent mapping. we love a soft landing ๐Ÿ’œ

Returns: None

find_mapping(name_or_id, ignore_missing=True)

Finds a single mapping โ€” detective mode activated ๐Ÿ”Ž

Parameters:

  • name_or_id โ€” the name or ID of a mapping.
  • ignore_missing โ€” False means a NotFoundException (openstack.exceptions.NotFoundException) gets raised when the resource doesn't exist. True means None comes back when you attempt to find a nonexistent resource.

Returns: one Mapping (openstack.identity.v3.mapping.Mapping), or None

get_mapping(mapping)

Gets a single mapping, straightforward, no cap

Parameters:

  • mapping โ€” the value can be the ID of a mapping, or a Mapping (openstack.identity.v3.mapping.Mapping) instance.

Returns: one Mapping (openstack.identity.v3.mapping.Mapping)

Raises: NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ

mappings(**query)

Retrieves a generator of mappings โ€” yes, a generator, they're everywhere, get used to it โœจ

Parameters:

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns: a generator of mapping instances.

update_mapping(mapping, **attrs)

Updates a mapping. little refresh, little self-care ๐ŸŽ€

Parameters:

  • mapping โ€” either the ID of a mapping, or a Mapping (openstack.identity.v3.mapping.Mapping) instance.
  • attrs โ€” the attributes to update on the mapping represented by mapping.

Returns: the updated mapping


๐Ÿชช Identity Provider Operations ๐Ÿชช

And one more time, the class signature, identical, because the docs said so and we do not skip details on this page:

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_identity_provider(**attrs)

Creates a new identity provider from attributes โ€” birth of an icon ๐Ÿ‘‘

Parameters:

  • attrs โ€” keyword arguments which will be used to create an IdentityProvider (openstack.identity.v3.identity_provider.IdentityProvider), comprised of the properties on the IdentityProvider class.

Returns: the results of identity provider creation โญ

  • delete_identity_provider(identity_provider, ignore_missing=True) โ€” bestie, this deletes an identity provider, periodt ๐Ÿ—‘๏ธ

Parameters:

  • identity_provider โ€” the ID of an identity provider, or a IdentityProvider instance (link: <#openstack.identity.v3.identity_provider.IdentityProvider>).
  • ignore_missing โ€” set this to False and a NotFoundException (link: <#openstack.exceptions.NotFoundException>) will be raised when the identity provider doesn't exist. Set it to True (the default, bestie) and literally nothing happens when you try to delete a nonexistent one. No drama. ๐Ÿ’…

Returns: None

  • find_identity_provider(name_or_id, ignore_missing=True) โ€” finds you a single identity provider, like a little scavenger hunt ๐Ÿ”

Parameters:

  • name_or_id โ€” the name or ID of an identity provider.
  • ignore_missing โ€” set to False and NotFoundException (link: <#openstack.exceptions.NotFoundException>) gets raised when the resource doesn't exist. Set to True and you just get None back when it can't find anything.

Returns: the details of an identity provider or None.

  • get_identity_provider(identity_provider) โ€” get one single mapping (yes, the docs say "mapping" here, we don't ask questions ๐Ÿ˜ญ)

Parameters:

  • mapping โ€” the value can be the ID of an identity provider or a IdentityProvider instance (link: <#openstack.identity.v3.identity_provider.IdentityProvider>).

Returns: the details of an identity provider.

Raises NotFoundException (link: <#openstack.exceptions.NotFoundException>) when no resource can be found. ๐Ÿ’€

  • identity_providers(**query) โ€” retrieve a whole generator of identity providers, we love a generator moment โœจ

Parameters:

  • query โ€” optional query parameters you send to limit the resources being returned.

Returns: a generator of identity provider instances. IdentityProvider (link: <#openstack.identity.v3.identity_provider.IdentityProvider>)

  • update_identity_provider(identity_provider, **attrs) โ€” update a mapping, glow-up edition ๐Ÿ’–

Parameters:

  • mapping โ€” either the ID of an identity provider or a IdentityProvider instance (link: <#openstack.identity.v3.identity_provider.IdentityProvider>).
  • attrs โ€” the attributes to update on the identity_provider represented by identity_provider.

Returns: the updated identity provider.


๐ŸŽ€ Access Rule Operations ๐ŸŽ€

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • access_rules(user, **query) โ€” retrieve a generator of access rules, so many rules bestie ๐Ÿฆ‹

Parameters:

  • user โ€” either the ID of a user or a User instance (link: <#openstack.identity.v3.user.User>).
  • query โ€” optional query parameters to send to limit the resources being returned.

Returns: a generator of access rules instances.

  • delete_access_rule(user, access_rule, ignore_missing=True) โ€” deletes an access rule, bye bye ๐Ÿ‘‹

Parameters:

  • user โ€” either the ID of a user or a User instance (link: <#openstack.identity.v3.user.User>).
  • access_rule โ€” the value can be either the ID of an access rule or a AccessRule instance.
  • ignore_missing โ€” set to False and NotFoundException (link: <#openstack.exceptions.NotFoundException>) gets raised when the access rule doesn't exist. Set to True and no exception gets thrown when you try to delete a nonexistent access rule.

Returns: None


๐ŸŒˆ Service Provider Operations ๐ŸŒˆ

class openstack.identity.v3._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • create_service_provider(**attrs) โ€” makes a brand new service provider from attributes, slay ๐ŸŽ‰

Parameters:

  • attrs โ€” keyword arguments which will be used to create a ServiceProvider, comprised of the properties on the ServiceProvider class.

Returns: the results of service provider creation.

  • delete_service_provider(service_provider, ignore_missing=True) โ€” delete a service provider, no cap ๐Ÿ—‘๏ธ

Parameters:

  • service_provider โ€” the ID of a service provider or a ServiceProvider instance.
  • ignore_missing โ€” set to False and NotFoundException (link: <#openstack.exceptions.NotFoundException>) will be raised when the service provider doesn't exist. Set to True and no exception gets set when attempting to delete a nonexistent service provider.

Returns: None

  • find_service_provider(name_or_id, ignore_missing=True) โ€” find a single service provider, good luck bestie ๐Ÿ”

Parameters:

  • name_or_id โ€” the name or ID of a service provider.
  • ignore_missing โ€” set to False and NotFoundException (link: <#openstack.exceptions.NotFoundException>) will be raised when the resource doesn't exist. Set to True and None gets returned when attempting to find a nonexistent resource.

Returns: the details of an service provider or None.

  • get_service_provider(service_provider) โ€” get a single service provider, iconic ๐Ÿ‘‘

Parameters:

  • service_provider โ€” the value can be the ID of a service provider or a ServiceProvider instance.

Returns: the details of an service provider.

Raises NotFoundException (link: <#openstack.exceptions.NotFoundException>) when no resource can be found. ๐Ÿ˜ญ

  • service_providers(**query) โ€” retrieve a generator of service providers, generators are giving main character energy โญ

Parameters:

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns: a generator of service provider instances. ServiceProvider

  • update_service_provider(service_provider, **attrs) โ€” update a service provider, glow up again ๐Ÿ’…

Parameters:

  • service_provider โ€” either the ID of an service provider or a ServiceProvider instance.
  • attrs โ€” the attributes to update on the service provider represented by service_provider.

Returns: the updated service provider.


๐ŸŒธ Image API v1 ๐ŸŒธ

For details on how to use image, see Using OpenStack Image <> (the link is literally empty in the source, we're not gonna pretend otherwise ๐Ÿ™ˆ).

๐Ÿฆ‹ The Image v1 Class ๐Ÿฆ‹

The image high-level interface is available through the image member of a Connection object (link: <#openstack.connection.Connection>). The image member will only be added if the service is detected. iykyk โœจ

class openstack.image.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • upload_image(**attrs) โ€” upload a new image from attributes, let's gooo ๐Ÿ”ฅ

Parameters:

  • attrs โ€” keyword arguments which will be used to create a Image (link: <#openstack.image.v1.image.Image>), comprised of the properties on the Image class.

Returns: the results of image creation.

  • delete_image(image, ignore_missing=True) โ€” delete an image, bye bestie ๐Ÿ—‘๏ธ

Parameters:

  • image โ€” this one's either the ID of an image, or a whole entire Image instance. Both slay, pick whichever feels right ๐Ÿซถ
  • ignore_missing โ€” okay so set this to False and a NotFoundException gets raised at you the second the image doesn't exist. Set it to True and no exception will be set when you attempt to delete a nonexistent image. Choosing peace, honestly ๐ŸŒธ

Returns: None โ€” that's the whole personality. Nothing. Void. ๐Ÿ˜ญ

find_image(name_or_id, ignore_missing=True) โ€” finds a single image. One. Singular. Main character only ๐Ÿ’…

Parameters

  • name_or_id โ€” the name or ID of a image ๐Ÿ”
  • ignore_missing โ€” when it's False, a NotFoundException gets raised when the resource doesn't exist. When it's True, None gets returned when you attempt to find a nonexistent resource. No drama, no chaos โœจ

Returns: one Image or None ๐Ÿ’ซ

get_image(image) โ€” gets a single image, lowkey the most straightforward one here.

Parameters

  • image โ€” the ID of an image, or an Image instance.

Returns: one Image ๐Ÿ’–

Raises: NotFoundException when no resource can be found. She's not gonna sugarcoat it for you ๐Ÿ˜ญ

images(**query) โ€” returns a generator of images. Not a list, bestie, a generator. We love a lazy iterator ๐Ÿ‘‘

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Use them or don't, the vibes are yours ๐Ÿฆ‹

Returns: a generator of image objects โญ

update_image(image, **attrs) โ€” updates a image.

Parameters

  • image โ€” either the ID of a image, or an Image instance.
  • attrs โ€” the attributes to update on the image represented by image.

Returns: the updated image ๐ŸŒˆ


Image API v2

For details on how to use image, see Using OpenStack Image ๐Ÿ“–

The Image v2 Class

The image high-level interface is available through the image member of a Connection object. The image member will only be added if the service is detected โ€” so if it's just not there, that's literally why, no cap ๐Ÿ™ˆ

Image Operations

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Look at all those keyword args. Gorgeous. Every single one of them is a None by default and that's exactly how she likes it ๐ŸŽ€

create_image(name, *, filename=None, data=None, container=None,
md5=None, sha256=None, disk_format=None, container_format=None,
tags=None, disable_vendor_agent=True, allow_duplicates=False,
meta=None, wait=False, timeout=3600, validate_checksum=False,
use_import=False, import_method=None, uri=None,
remote_region=None, remote_image_id=None,
remote_service_interface=None, stores=None, all_stores=None,
all_stores_must_succeed=None, size=None, **kwargs)

Create an image and optionally upload data โœจ

Creates a new image. If filename or data are provided, it will also upload data to this image.

Okay so, real talk: uploading image data is actually quite a complicated procedure. Like, genuinely. There are three ways to upload an image:

  • Image upload
  • Image import
  • Image tasks

If the image tasks API is enabled, this must be used. However โ€” this API is deprecated since the Image service's Mitaka (12.0.0) release and is now admin-only. ๐Ÿ’€ Assuming this API is not enabled, you may choose between image upload or image import. Image import is more powerful and allows you to upload data from multiple sources including other glance instances. It should be preferred on all services that support it. Periodt.

Parameters

  • name โ€” name of the image to create. If it's a pathname of an image, the name will be constructed from the extensionless basename of the path. Cute, right? ๐ŸŒธ
  • filename โ€” the path to the file to upload, if needed. (optional, defaults to None)
  • data โ€” image data (string or file-like object). It is mutually exclusive with filename โ€” pick one, not both, we've talked about this ๐Ÿ™ˆ
  • container โ€” name of the container in swift where images should be uploaded for import if the cloud requires such a thing. (optional, defaults to 'images')
  • md5 โ€” md5 sum of the image file. If not given, an md5 will be calculated.
  • sha256 โ€” sha256 sum of the image file. If not given, an md5 will be calculated. (yes bestie, it says md5 there too โ€” that's literally what the doc says, we're just reading it out ๐Ÿ’€)
  • disk_format โ€” the disk format the image is in. (optional, defaults to the os-client-config config value for this cloud)
  • container_format โ€” the container format the image is in. (optional, defaults to the os-client-config config value for this cloud)
  • tags โ€” list of tags for this image. Each tag is a string of at most 255 chars. Keep 'em short and iconic ๐ŸŽ€
  • disable_vendor_agent โ€” whether or not to append metadata flags to the image to inform the cloud in question to not expect a vendor agent to be running. (optional, defaults to True)
  • allow_duplicates โ€” if true, skips checks that enforce unique image name. (optional, defaults to False)
  • meta โ€” a dict of key/value pairs to use for metadata that bypasses automatic type conversion. Raw. Untouched. Feral, even ๐Ÿฆ‹
  • wait โ€” if true, waits for image to be created. Defaults to true โ€” however, be aware that one of the upload methods is always synchronous. So like, don't get too comfortable ๐Ÿ˜Œ
  • timeout โ€” seconds to wait for image creation. None is forever. Literally forever. Think about that ๐Ÿ•ฐ๏ธ
  • validate_checksum โ€” if true and cloud returns checksum, compares return value with the one calculated or passed into this call. If value does not match โ€” raises exception. Default is 'false' โš ๏ธ
  • use_import โ€” use the 'glance-direct' method of the interoperable image import mechanism to import the image. This defaults to false because it is harder on the target cloud so should only be used when needed, such as when the user needs the cloud to transform image format. If the cloud has disabled direct uploads, this will default to true. If you wish to use other import methods, use the import_image method instead ๐Ÿ‘‘
  • import_method โ€” method to use for importing the image. Not all deployments support all methods. One of: glance-direct (default), web-download, glance-download (copy-image is not used with create). Use of glance-direct requires the image be first staged ๐Ÿ”ฅ
  • uri โ€” required only if using the web-download import method. This url is where the data is made available to the Image service.
  • remote_region โ€” the remote glance region to download the image from when using glance-download.
  • remote_image_id โ€” the ID of the image to import from the remote glance when using glance-download.
  • remote_service_interface โ€” the remote glance service interface to use when using glance-download.
  • stores โ€” list of stores to be used when enabled_backends is activated in glance. List values can be the id of a store or a Store instance. Implies use_import equals True ๐Ÿ’œ
  • all_stores โ€” upload to all available stores. Mutually exclusive with store and stores. Implies use_import equals True.
  • all_stores_must_succeed โ€” okay so when this is True, if an error pops off during the upload in at least one store, the worfklow fails, the data is deleted from stores where copying is done (not staging), and the state of the image stays unchanged. When itโ€™s False, the workflow will fail (data deleted from stores, โ€ฆ) only if the import fails on all stores specified by the user. In a partial success, the locations added to the image are the stores where the data was actually uploaded correctly. Default is True. Implies use_import equals True. ๐Ÿ’…
  • size โ€” size of the image data in bytes. Providing this lets Glance pre-allocate storage and can improve upload performance โœจ. If you donโ€™t provide it and data is a file-like object, the size will be calculated automatically.

Additional kwargs get passed to image creation as extra metadata for the image, and all values get converted to string except for min_disk, min_ram, size and virtual_size, which get converted to int.

If you are sure you have all of your data types correct or have an advanced need to be explicit, use meta. If you are just a normal consumer, using kwargs is likely the right choice. If a value is in meta and kwargs, meta wins. Periodt.

Returns: The results of image creation ๐ŸŒŸ

Raises: SDKException if there are problems uploading ๐Ÿ˜ญ


๐Ÿฆ‹ import_image

import_image(image, method='glance-direct', *, uri=None, remote_region=None, remote_image_id=None, remote_service_interface=None, store=None, stores=None, all_stores=None, all_stores_must_succeed=None)

Import data to an existing image.

The interoperable image import process was introduced in Image API v2.6. It mainly lets image importing happen from an external URL and lets the Image service download it by itself without sending binary data at image creation. Iconic behavior, honestly ๐Ÿ‘‘

Parameters

  • image โ€” the value can be the ID of a image or an Image instance.
  • method โ€” method to use for importing the image. Not all deployments support all methods. One of: glance-direct (default), web-download, glance-download, or copy-image. Use of glance-direct requires the image be first staged.
  • uri โ€” required only if using the web-download import method. This url is where the data is made available to the Image service.
  • remote_region โ€” the remote glance region to download the image from when using glance-download.
  • remote_image_id โ€” the ID of the image to import from the remote glance when using glance-download.
  • remote_service_interface โ€” the remote glance service interface to use when using glance-download.
  • store โ€” used when enabled_backends is activated in glance. The value can be the id of a store or a Store instance.
  • stores โ€” list of stores to be used when enabled_backends is activated in glance. List values can be the id of a store or a Store instance.
  • all_stores โ€” upload to all available stores. Mutually exclusive with store and stores.
  • all_stores_must_succeed โ€” when set to True, if an error occurs during the upload in at least one store, the worfklow fails, the data is deleted from stores where copying is done (not staging), and the state of the image is unchanged. When set to False, the workflow will fail (data deleted from stores, โ€ฆ) only if the import fails on all stores specified by the user. In case of a partial success, the locations added to the image will be the stores where the data has been correctly uploaded. Default is True.

Returns: The raw response from the request.


๐ŸŒธ stage_image

stage_image(image, *, filename=None, data=None, size=None)

Stage binary image data.

Parameters

  • image โ€” the value can be the ID of a image or an Image instance.
  • filename โ€” optional name of the file to read data from.
  • data โ€” optional data to be uploaded as an image.
  • size โ€” optional size of the data in bytes. Providing this lets Glance pre-allocate storage and can improve staging performance. If you donโ€™t provide it and data is a file-like object, the size will be calculated automatically.

Returns: The results of image creation.


๐Ÿ’– upload_image

upload_image(container_format=None, disk_format=None, data=None, size=None, **attrs)

Create and upload a new image from attributes.

Parameters

  • container_format โ€” format of the container. A valid value is ami, ari, aki, bare, ovf, ova, or docker.
  • disk_format โ€” the format of the disk. A valid value is ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, or iso.
  • data โ€” the data to be uploaded as an image.
  • attrs โ€” keyword arguments which will be used to create a Image, comprised of the properties on the Image class.

Returns: The results of image creation.


๐ŸŽ€ download_image

download_image(image, *, stream=False, output=None, chunk_size=1048576, store_preferences=None)

Download an image.

This will download an image to memory when stream=False, or allow streaming downloads using an iterator when stream=True. For examples of working with streamed responses, see the section called Downloading an Image with stream=True (docs anchor: #download-image-stream-true) ๐Ÿซถ

Parameters

  • image โ€” the value can be either the ID of an image or a Image instance.
  • stream โ€”
    • When True, return a requests.Response instance allowing you to iterate over the response data stream instead of storing its entire contents in memory. See requests.Response.iter_content() for more details.
    • NOTE: If you do not consume the entirety of the response you must explicitly call requests.Response.close() or otherwise risk inefficiencies with the requests libraryโ€™s handling of connections.
    • When False, return the entire contents of the response.
  • output โ€” either a file object or a path to store data into.
  • chunk_size โ€” size in bytes to read from the wire and buffer at one time. Defaults to 1024 * 1024 = 1 MiB.
  • store_preferences โ€” list of store names to prefer when downloading.

Returns: When output is not given โ€” the bytes comprising the given Image when stream is False, otherwise a requests.Response instance. When output is given โ€” a Image instance.


๐Ÿงš delete_image

delete_image(image, *, store=None, ignore_missing=True)

Delete an image.

Parameters

  • image โ€” the value can be either the ID of an image or a Image instance.
  • store โ€” the value can be either the ID of a store or a Store instance that the image is associated with. If specified, the image will only be deleted from the specified store.
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the image does not exist. When set to True, no exception will be set when attempting to delete a nonexistent image.

Returns: None


๐ŸŒˆ find_image

find_image(name_or_id, ignore_missing=True)

Find a single image.

Parameters

  • name_or_id โ€” the name or ID of a image.
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns: one Image or None โ€” literally just the image, or the void, no in-between bestie ๐Ÿ’…


โœจ get_image(image) โœจ

Get a single image. One (1) image. That's the whole gig.

Parameters

  • image โ€” the value can be the ID of an image or an Image instance. (yes, ID string or the whole object, both slay)

Returns: one Image

Raises NotFoundException when no resource can be found. Like, it's not hiding, it's just not there ๐Ÿ˜ญ

๐ŸŒธ images(**query) ๐ŸŒธ

Return a generator of images โ€” a whole lil stream of them, one at a time, no cap.

Parameters

  • query โ€” optional query parameters sent along to limit the resources being returned. Use these or you're getting the entire camera roll, bestie ๐Ÿซถ

Returns: a generator of image objects


๐Ÿ’– update_image(image, **attrs) ๐Ÿ’–

Update an image. Glow-up time โœจ

Parameters

  • image โ€” either the ID of an image or an Image instance.
  • attrs โ€” the attributes to update on the image represented by image.

Returns: the updated image


๐Ÿฆ‹ deactivate_image(image) ๐Ÿฆ‹

Deactivate an image. It's taking a nap, do not disturb ๐Ÿ’ค

Parameters

  • image โ€” either the ID of an image or an Image instance.

Returns: None


๐ŸŒˆ reactivate_image(image) ๐ŸŒˆ

Reactivate an image. Nap's over, main character energy restored ๐Ÿ‘‘

Parameters

  • image โ€” either the ID of an image or an Image instance.

Returns: None


๐ŸŽ€ add_tag(image, tag) ๐ŸŽ€

Add a tag to an image. Little label, big personality.

Parameters

  • image โ€” the value can be the ID of an image or an Image instance.
  • tag โ€” the tag to be added.

Returns: None


๐Ÿ“ remove_tag(image, tag) ๐Ÿ“

Remove a tag from an image. Un-label it, respectfully.

Parameters

  • image โ€” the value can be the ID of an image or an Image instance.
  • tag โ€” the tag to be removed.

Returns: None


๐Ÿ‘‘ Image Task Operations ๐Ÿ‘‘

Okay so this whole block hangs off the same proxy class, and yes you have to look at the full signature, it's giving "terms and conditions" but make it Python ๐Ÿ˜ญ

class openstack.image.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿ’œ image_tasks(image) ๐Ÿ’œ

Return a generator of Image Tasks โ€” a nice lil lazy stream of them ๐Ÿ’ซ

Parameters

  • image โ€” the value can be either the name of an image or an Image instance. (name or object, yes both, we love flexibility)

Returns: a generator object of image tasks

Raises NotFoundException when no resource can be found. It looked. It found nothing. It's fine. We're fine. ๐Ÿ˜ญ

๐Ÿงš Image Location Operations ๐Ÿงš

Same proxy class, same absolutely massive signature โ€” here it is again, because the page loves you and wants you fully informed ๐Ÿ’…

class openstack.image.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿ”ฅ add_image_location(image, url, *, validation_data=None) ๐Ÿ”ฅ

Add a location to an image. It's getting a new address, congrats ๐ŸŽ‰

Parameters

  • image โ€” either the ID of an image or an Image instance.
  • url โ€” a valid location url. Valid. We're being picky and honestly? Respect.
  • validation_data โ€” values to be used to populate the corresponding image properties. Keyword-only, note the * bestie ๐Ÿซถ

Returns: the created image location


โญ image_locations(image) โญ

Get locations associated to an Image โ€” plural, a whole little collection of addresses.

Parameters

  • image โ€” either the ID of an image or an Image instance.

Returns: a generator of image location objects


๐Ÿ’€ Member Operations ๐Ÿ’€

Third time's the charm, here's the proxy signature again (it does not get shorter, sorry babe):

class openstack.image.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿซถ add_member(image, **attrs) ๐Ÿซถ

Create a new member from attributes. It's a whole person for your image, iconic ๐Ÿ’–

Parameters

  • image โ€” the value can be the ID of an image or an Image instance that the member will be created for.
  • attrs โ€” keyword arguments which will be used to create a Member, comprised of the properties on the Member class.
See Image Sharing Reference for details: https://docs.openstack.org/api-ref/image/v2/index.html?expanded=create-image-member-detail#create-image-member

Returns: the results of member creation


๐Ÿ™ˆ remove_member(member, image=None, ignore_missing=True) ๐Ÿ™ˆ

Delete a member. Bye bestie, no hard feelings ๐ŸŒธ

Parameters

  • member โ€” the value can be either the ID of a member or a Member instance.
  • image โ€” the value can be either the ID of an image or an Image instance that the member is part of. This is required if member is an ID. Like, an ID alone doesn't tell us where to look, yk? ๐Ÿ”
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the member does not exist. When set to True, no exception will be set when attempting to delete a nonexistent member. (Default is True, so by default we simply do not care ๐Ÿ’…)

Returns: None


๐ŸŽ€ find_member(name_or_id, image, ignore_missing=True) ๐ŸŽ€

Find a single member. Just the one. Scavenger hunt, but polite.

Parameters

  • name_or_id โ€” the name or ID of a member.
  • image โ€” this is the image that the member belongs to, the value can be the ID of an image or an Image instance.
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. (Different flavour of "missing" handling than remove_member, don't mix them up!)

Returns: one Member or None


๐Ÿฆ‹ get_member(member, image) ๐Ÿฆ‹

Get a single member on an image. Specific member, specific image, very intentional.

Parameters

  • member โ€” the value can be the ID of a member or a Member instance.
  • image โ€” this is the image that the member belongs to. The value can be the ID of an image or an Image instance.

Returns: one Member

Raises NotFoundException when no resource can be found. Again. It's a whole theme ๐Ÿ”ฅ

๐ŸŒˆ members(image, **query) ๐ŸŒˆ

Return a generator of members โ€” all the friends of this image, streamed one by one.

Parameters

  • image โ€” this is the image that the member belongs to, the value can be the ID of an image or an Image instance.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns: a generator of member objects


๐Ÿ’œ update_member(member, image, **attrs) ๐Ÿ’œ

Update the member of an image. Little refresh, little glow-up โœจ

Parameters

  • member โ€” either the ID of a member or a Member instance.

Continuing the update_member deets, bestie:

  • image โ€” the image that this member belongs to. The value can be the ID of an image, or an openstack.image.v2.image.Image instance. ๐Ÿ–ผ๏ธ
  • attrs โ€” the attributes you want to update on the member represented by member.

See the Image Sharing Reference at https://docs.openstack.org/api-ref/image/v2/index.html?expanded=update-image-member-detail#update-image-member for the full tea. โ˜•

Returns: the updated member โœจ


๐Ÿ› ๏ธ Task Operations ๐Ÿ› ๏ธ

Same Proxy energy, same constructor signature โ€” no cap:

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

tasks(**query)

Return a generator of tasks. ๐ŸŒ€

Parameters: query โ€” optional query parameters sent along to limit the resources being returned.

Returns: a generator of task objects.

get_task(task)

Get task details. ๐Ÿ”

Parameters: task โ€” the value can be the ID of a task or an openstack.image.v2.task.Task instance.

Returns: one Task (openstack.image.v2.task.Task).

Raises: openstack.exceptions.NotFoundException when no resource can be found. ๐Ÿ˜ญ

create_task(**attrs)

Create a new task from attributes. ๐ŸŽ€

Parameters: attrs โ€” keyword arguments used to create a Task (openstack.image.v2.task.Task), made up of the properties on the Task class.

Returns: the results of task creation.

wait_for_task(task, status='success', failures=None, interval=2, wait=120)

Wait for a task to be in a particular status. โณ

Parameters:

  • task โ€” the resource to wait on until it reaches the specified status. The resource must have a status attribute.
  • status โ€” desired status.
  • failures (list) โ€” statuses that would be interpreted as failures.
  • interval โ€” number of seconds to wait between consecutive checks. Defaults to 2.
  • wait โ€” maximum number of seconds to wait before the change. Defaults to 120.

Returns: the resource is returned on success. ๐Ÿซถ

Raises: openstack.exceptions.ResourceTimeout if the transition to the desired status failed to occur in the specified seconds.

Raises: openstack.exceptions.ResourceFailure if the resource has transited to one of the failure statuses.

Raises: AttributeError if the resource does not have a status attribute. ๐Ÿ’€


๐Ÿ“ Schema Operations ๐Ÿ“

Again, same Proxy constructor signature โ€” iconic, unchanged:

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_images_schema()

Get images schema. ๐Ÿ–ผ๏ธ

Returns: one Schema.

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_image_schema()

Get single image schema.

Returns: one Schema.

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_members_schema()

Get image members schema. ๐Ÿ‘ฏ

Returns: one Schema.

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_member_schema()

Get image member schema.

Returns: one Schema.

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_tasks_schema()

Get image tasks schema. ๐Ÿ—‚๏ธ

Returns: one Schema.

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_task_schema()

Get image task schema.

Returns: one Schema.

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_namespace_schema()

Get metadata definition namespace schema. ๐Ÿงš

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_namespaces_schema()

Get metadata definition namespaces schema.

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_resource_type_schema()

Get metadata definition resource type association schema. ๐Ÿ”—

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_resource_types_schema()

Get metadata definition resource type associations schema.

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_object_schema()

Get metadata definition object schema. ๐Ÿ“ฆ

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_objects_schema()

Get metadata definition objects schema.

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_property_schema()

Get metadata definition property schema. ๐Ÿท๏ธ

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_properties_schema()

Get metadata definition properties schema.

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_tag_schema()

Get metadata definition tag schema. ๐Ÿ”–

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.

get_metadef_tags_schema()

Get metadata definition tags schema.

Returns: one MetadefSchema (openstack.image.v2.metadef_schema.MetadefSchema).

Raises: openstack.exceptions.NotFoundException when no resource can be found.


๐Ÿ” Service Info Discovery Operations ๐Ÿ”

And one more time, the Proxy constructor signature stays serving looks:

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

stores(details=False, **query)

Return a generator of supported image stores. ๐Ÿ›๏ธ

Returns โ€” a generator of store objects ๐Ÿ›๏ธโœจ

get_import_info()

Okay so this one is giving โ€œtell me the image constraintsโ€ energy. It gets a info about image constraints (yes, โ€œa infoโ€ โ€” we keep the sourceโ€™s grammar exactly, bestie ๐Ÿ’…).

Returns โ€” One Import <#openstack.image.v2.service_info.Import> ๐ŸŽ€

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


๐Ÿงš Metadef Namespace Operations

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_metadef_namespace(**attrs)

Create a new metadef namespace from attributes. New namespace, who dis? โœจ

Parameters

  • attrs โ€” Keyword arguments which will be used to create a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> comprised of the properties on the MetadefNamespace class.

Returns โ€” The results of metadef namespace creation.

delete_metadef_namespace(metadef_namespace, ignore_missing=True)

Delete a metadef namespace. Poof, gone โ€” but only if you actually mean it ๐Ÿซถ

Parameters

  • metadef_namespace โ€” The value can be either the name of a metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the metadef namespace does not exist.

Returns โ€” None

get_metadef_namespace(metadef_namespace)

Get a single metadef namespace. Main-character retrieval behavior, honestly ๐Ÿ‘‘

Parameters

  • metadef_namespace โ€” Either the name of a metadef namespace or an MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.

Returns โ€” One MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

metadef_namespaces(**query)

Return a generator of metadef namespaces. Itโ€™s giving infinite scroll, but for namespaces ๐ŸŒˆ

Returns โ€” A generator object of metadef namespaces.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

update_metadef_namespace(metadef_namespace, **attrs)

Update a server. Yes, the original description literally says โ€œserverโ€ here โ€” we are simply reporting the lore, bestie ๐Ÿ˜ญ๐Ÿ’€

Parameters

  • metadef_namespace โ€” Either the name of a metadef namespace or an MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • attrs โ€” The attributes to update on the metadef namespace represented by metadef_namespace.

Returns โ€” The updated metadef namespace.


๐Ÿฆ‹ Metadef Object Operations

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_metadef_object(namespace, **attrs)

Create a new object from namespace. New object, who dis? ๐Ÿ’ซ

Parameters

  • namespace โ€” The value can be either the name of a metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • attrs โ€” Keyword arguments which will be used to create a MetadefObject <#openstack.image.v2.metadef_object.MetadefObject>, comprised of the properties on the Metadef object class.

Returns โ€” A metadef namespace.

get_metadef_object(metadef_object, namespace)

Get a single metadef object. One object, zero chaos (ideally) ๐ŸŽ€

Parameters

  • metadef_object โ€” The value can be the ID of a metadef_object or a MetadefObject <#openstack.image.v2.metadef_object.MetadefObject> instance.
  • namespace โ€” The value can be either the name of a metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.

Returns โ€” One MetadefObject <#openstack.image.v2.metadef_object.MetadefObject>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

metadef_objects(namespace)

Get metadef object list of the namespace. The source says it returns One MetadefObject โ€” singular, iconic, no cap ๐Ÿ’…

Parameters

  • namespace โ€” The value can be either the name of a metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.

Returns โ€” One MetadefObject <#openstack.image.v2.metadef_object.MetadefObject>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

update_metadef_object(metadef_object, namespace, **attrs)

Update a single metadef object. Glow-up arc, but for metadata โœจ

Parameters

  • metadef_object โ€” The value can be the ID of a metadef_object or a MetadefObject <#openstack.image.v2.metadef_object.MetadefObject> instance.
  • namespace โ€” The value can be either the name of a metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • attrs โ€” Keyword arguments which will be used to update a MetadefObject <#openstack.image.v2.metadef_object.MetadefObject>

Returns โ€” One MetadefObject <#openstack.image.v2.metadef_object.MetadefObject>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

delete_metadef_object(metadef_object, namespace, **attrs)

Removes a single metadef object. Bye bestie, we hardly knew ye ๐Ÿซก

Parameters

  • metadef_object โ€” The value can be the ID of a metadef_object or a MetadefObject <#openstack.image.v2.metadef_object.MetadefObject> instance.
  • namespace โ€” The value can be either the name of a metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • attrs โ€” Keyword arguments which will be used to update a MetadefObject <#openstack.image.v2.metadef_object.MetadefObject>

Returns โ€” The deleted metadef object.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


๐Ÿ’œ Metadef Resource Type Operations

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

metadef_resource_types(**query)

Return a generator of metadef resource types. Resource-type generator realness ๐ŸŒธ

Returns โ€” A generator object of metadef resource types MetadefResourceType <#openstack.image.v2.metadef_resource_type.MetadefResourceType>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

create_metadef_resource_type_association(metadef_namespace, **attrs)

Creates a resource type association between a namespace and the resource type specified in the body of the request. Thatโ€™s the whole description, bestie โ€” no extra Returns or Raises listed here ๐ŸŽ€

Parameters

  • attrs โ€” the keyword args that get used to create a MetadefResourceTypeAssociation <#openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation>, built from the properties on the MetadefResourceTypeAssociation class.

Returns

The results of metadef resource type association creation โœจ

๐Ÿ’… delete_metadef_resource_type_association(metadef_resource_type, metadef_namespace, ignore_missing=True)

Removes a resource type association from a namespace. Bye bestie ๐Ÿ‘‹

Parameters

  • metadef_resource_type โ€” can be either the name of a metadef resource type association or a MetadefResourceTypeAssociation <#openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation> instance.
  • metadef_namespace โ€” can be either the name of the metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the metadef resource type association doesn't exist.

Returns

None

๐Ÿฆ‹ metadef_resource_type_associations(metadef_namespace, **query)

Hands you back a generator of metadef resource type associations.

Parameters

metadef_namespace โ€” can be either the name of the metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.

Returns

A generator object of metadef resource type associations, MetadefResourceTypeAssociation <#openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when nothing can be found. ๐Ÿ˜ญ


๐Ÿงš Metadef Property Operations ๐Ÿงš

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐ŸŒธ create_metadef_property(metadef_namespace, **attrs)

Makes a metadef property. New property just dropped ๐Ÿ’…

Parameters

  • metadef_namespace โ€” can be either the name of the metadef namespace or a MetadefNamespace instance.
  • attrs โ€” the attributes to create on the metadef property represented by metadef_property.

Returns

The created metadef property โœจ

๐ŸŽ€ update_metadef_property(metadef_property, metadef_namespace, **attrs)

Updates a metadef property โ€” glow-up time.

Parameters

  • metadef_property โ€” can be either the name of the metadef property or a MetadefProperty <#openstack.image.v2.metadef_property.MetadefProperty> instance.
  • metadef_namespace โ€” can be either the name of the metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • attrs โ€” the attributes to update on the metadef property represented by metadef_property.

Returns

The updated metadef property โœจ

๐Ÿซถ delete_metadef_property(metadef_property, metadef_namespace, ignore_missing=True)

Deletes a metadef property. It's giving closure ๐Ÿ•Š๏ธ

Parameters

  • metadef_property โ€” can be either the name of the metadef property or a MetadefProperty <#openstack.image.v2.metadef_property.MetadefProperty> instance.
  • metadef_namespace โ€” can be either the name of the metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the instance doesn't exist. When set to True, no exception gets set when you try to delete a nonexistent instance.

Returns

None

๐Ÿ“ get_metadef_property(metadef_property, metadef_namespace, **query)

Gets you a single metadef property.

Parameters

  • metadef_property โ€” can be either the name of the metadef property or a MetadefProperty <#openstack.image.v2.metadef_property.MetadefProperty> instance.
  • metadef_namespace โ€” can be either the name of the metadef namespace or a MetadefNamespace <#openstack.image.v2.metadef_namespace.MetadefNamespace> instance.

Returns

One MetadefProperty <#openstack.image.v2.metadef_property.MetadefProperty>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when nothing can be found. ๐Ÿ˜ญ


โญ Helpers โญ

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿ’œ wait_for_delete(res, interval=2, wait=120, callback=None)

Waits for a resource to be deleted. Bestie is very patient, but not infinitely patient, iykyk ๐Ÿ‘‘

Parameters

  • res โ€” the resource you're waiting on to be deleted.
  • interval โ€” number of seconds to wait before consecutive checks.
  • wait โ€” maximum number of seconds to wait before the change.
  • callback โ€” a callback function. This gets called with a single value, progress, which is a percentage value from 0-100.

Returns

The resource gets returned on success.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to delete failed to occur in the specified seconds. ๐Ÿ’€


๐ŸŒˆ Cache Operations ๐ŸŒˆ

class openstack.image.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿฆ‹ cache_delete_image(image, ignore_missing=True)

Deletes an image from cache. Not me evicting my exes from the group chat ๐Ÿ™ˆ

Parameters

  • image โ€” can be either the ID of an image or an Image <#openstack.image.v2.image.Image> instance.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the image or the cache entry doesn't exist.

Returns

None

โœจ queue_image(image)

Queues image(s) for caching. Get in line, bestie ๐ŸŽŸ๏ธ

๐Ÿงš clear_cache(target='both')

Clears all images from cache, queue, or both. Spring cleaning fr fr ๐Ÿงน

Parameters

target โ€” specify which target you wanna clear. One of: both (default), cache, queue.


๐Ÿ‘‘ KeyManager API ๐Ÿ‘‘

For deets on how to use key_management, see Using OpenStack Key Manager <> ๐ŸŒธ

๐Ÿ”ฅ The KeyManager Class ๐Ÿ”ฅ

The key_management high-level interface is available through the key_manager member of a Connection <#openstack.connection.Connection> object. The key_manager member only gets added if the service is detected. ๐Ÿ’…

โœจ Secret Operations โœจ

Bestie, this is the secret-handling corner of the proxy. The class signature is literally this big thing:

class openstack.key_manager.v1._proxy.Proxy(session, *,
       service_type=None, service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

create_secret(**attrs) โ€” Create a new secret from attributes ๐Ÿ’–

  • attrs โ€” Keyword arguments which will be used to create a Secret <#openstack.key_manager.v1.secret.Secret>, comprised of the properties on the Order class.

Returns: The results of secret creation โœจ


delete_secret(secret, ignore_missing=True) โ€” Delete a secret ๐Ÿซถ

Parameters

  • secret โ€” The value can be either the ID of a secret or a Secret <#openstack.key_manager.v1.secret.Secret> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the secret does not exist. When set to True, no exception will be set when attempting to delete a nonexistent secret.

Returns: None


find_secret(name_or_id, ignore_missing=True) โ€” Find a single secret ๐Ÿ”Ž

Parameters

  • name_or_id โ€” The name or ID of a secret.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns: One Secret <#openstack.key_manager.v1.secret.Secret> or None


get_secret(secret) โ€” Get a single secret ๐Ÿ’…

Parameters

  • secret โ€” The value can be the ID of a secret or a Secret <#openstack.key_manager.v1.secret.Secret> instance.

Returns: One Secret <#openstack.key_manager.v1.secret.Secret>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


secrets(**query) โ€” Return a generator of secrets ๐ŸŒˆ

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns: A generator of secret objects


update_secret(secret, **attrs) โ€” Update a secret โญ

Parameters

  • secret โ€” Either the id of a secret or a Secret <#openstack.key_manager.v1.secret.Secret> instance.
  • attrs โ€” The attributes to update on the secret represented by secret.

Returns: The updated secret


๐ŸŒธ Container Operations ๐ŸŒธ

Same big class signature, now for container business:

class openstack.key_manager.v1._proxy.Proxy(session, *,
       service_type=None, service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

create_container(**attrs) โ€” Create a new container from attributes ๐ŸŽ€

Parameters

  • attrs โ€” Keyword arguments which will be used to create a Container <#openstack.key_manager.v1.container.Container>, comprised of the properties on the Container class.

Returns: The results of container creation


delete_container(container, ignore_missing=True) โ€” Delete a container ๐Ÿ’€

Parameters

  • container โ€” The value can be either the ID of a container or a Container <#openstack.key_manager.v1.container.Container> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the container does not exist. When set to True, no exception will be set when attempting to delete a nonexistent container.

Returns: None


find_container(name_or_id, ignore_missing=True) โ€” Find a single container ๐Ÿฆ‹

Parameters

  • name_or_id โ€” The name or ID of a container.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns: One Container <#openstack.key_manager.v1.container.Container> or None


get_container(container) โ€” Get a single container ๐Ÿ’œ

Parameters

  • container โ€” The value can be the ID of a container or a Container <#openstack.key_manager.v1.container.Container> instance.

Returns: One Container <#openstack.key_manager.v1.container.Container>

Raises: NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


containers(**query) โ€” Return a generator of containers ๐Ÿงš

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns: A generator of container objects


update_container(container, **attrs) โ€” Update a container ๐ŸŒŸ

Parameters

  • container โ€” Either the id of a container or a Container <#openstack.key_manager.v1.container.Container> instance.
  • attrs โ€” The attributes to update on the container represented by container.

Returns: The updated container


๐ŸŽ€ Container ACL Operations ๐ŸŽ€

And here's the class signature one more time, because the ACL glow-up deserves it:

class openstack.key_manager.v1._proxy.Proxy(session, *,
       service_type=None, service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

get_container_acl(container) โ€” Get a container's ACL settings ๐Ÿ”

Parameters

  • container โ€” The value can be the ID of a container or a Container <#openstack.key_manager.v1.container.Container> instance.

Returns: One container ACL


create_container_acl(container, **attrs) โ€” Create or replace a container's ACL ๐Ÿ‘‘

Parameters

  • container โ€” The value can be the ID of a container or a Container <#openstack.key_manager.v1.container.Container> instance.
  • attrs โ€” Keyword arguments which will be used to create a ContainerACL <#openstack.key_manager.v1.container_acl.ContainerACL>, comprised of the properties on the ContainerACL class. The ACL body must be supplied explicitly, typically as a read dict, e.g. read={'users': ['user-id'], 'project-access': False}.

Returns: The results of ACL creation


update_container_acl(container, **attrs) โ€” Update a container's ACL ๐Ÿ’ซ

Parameters

  • container โ€” The value can be the ID of a container or a Container <#openstack.key_manager.v1.container.Container> instance.
  • attrs โ€” The attributes to update on the ACL. The ACL body must be supplied explicitly, typically as a read dict, e.g. read={'users': ['user-id'], 'project-access': True}.

Returns: The updated ACL


delete_container_acl(container, ignore_missing=True) โ€” Reset a container's ACL to default settings ๐Ÿงน

Parameters

  • container โ€” the container you're nuking. Slug in the ID of a container, or hand over an actual Container instance (<#openstack.key_manager.v1.container.Container>) and let the SDK do the heavy lifting ๐Ÿ’…
  • ignore_missing โ€” set it to False and you get a NotFoundException (<#openstack.exceptions.NotFoundException>) thrown at you the second the container doesn't exist. Set it to True and the SDK is just gonna vibe โ€” no exception, no drama, even if you're deleting a container that was never a thing ๐Ÿซถ

Returns โ€” None. That's it, that's the whole return value, bestie.

Order Operations

class openstack.key_manager.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_order(**attrs)

Cooks up a brand-new order straight from its attributes โœจ

Parameters

  • attrs โ€” keyword args that get used to build an Order (<#openstack.key_manager.v1.order.Order>). Basically every property on the Order class, so go off ๐Ÿ‘‘

Returns โ€” the results of order creation. The fresh new order, looking all cute.

delete_order(order, ignore_missing=True)

Yeets an order into the void ๐Ÿ—‘๏ธ

Parameters

  • order โ€” either the ID of an order, or an Order (<#openstack.key_manager.v1.order.Order>) instance.
  • ignore_missing โ€” False means a NotFoundException (<#openstack.exceptions.NotFoundException>) gets raised when the order doesn't exist. True means no exception gets set even when you attempt to delete a nonexistent order. No notes, just vibes ๐Ÿ™ˆ

Returns โ€” None.

find_order(name_or_id, ignore_missing=True)

Finds you a single order, like a lil scavenger hunt ๐Ÿฆ‹

Parameters

  • name_or_id โ€” the name or ID of a order.
  • ignore_missing โ€” False โ†’ NotFoundException (<#openstack.exceptions.NotFoundException>) raised when the resource doesn't exist. True โ†’ you get None back when attempting to find a nonexistent resource. Gentle. Kind. Iconic.

Returns โ€” one Order (<#openstack.key_manager.v1.order.Order>) or None.

get_order(order)

Grabs a single order, no searching around ๐Ÿ’–

Parameters

  • order โ€” the ID of an order, or an Order (<#openstack.key_manager.v1.order.Order>) instance.

Returns โ€” one Order (<#openstack.key_manager.v1.order.Order>).

Raises โ€” NotFoundException (<#openstack.exceptions.NotFoundException>) when no resource can be found. ๐Ÿ˜ญ

orders(**query)

Hands you back a generator of orders, all lined up ๐ŸŒˆ

Parameters

  • query โ€” optional query params you can send along to limit the resources being returned. Filter away, bestie.

Returns โ€” a generator of order objects.

update_order(order, **attrs)

Glow-up time โ€” updates a order ๐Ÿ’…

Parameters

  • order โ€” either the id of a order or an Order (<#openstack.key_manager.v1.order.Order>) instance.
  • attrs โ€” the attributes to update on the order represented by order.

Returns โ€” the updated order. Look at her now ๐Ÿ”ฅ

Quota Operations

class openstack.key_manager.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_project_quota(project)

Get a single project quota โ€” one project, one quota, very monogamous of you ๐ŸŽ€

Parameters

  • project โ€” a project ID or a Project (<#openstack.identity.v3.project.Project>) instance.

Returns โ€” one ProjectQuota (<#openstack.key_manager.v1.project_quota.ProjectQuota>).

Raises โ€” NotFoundException (<#openstack.exceptions.NotFoundException>) when no resource can be found ๐Ÿ’€

get_quota()

Gets the effective quotas for the current project โ€” the real real, not the theoretical โœจ

Returns โ€” one Quota (<#openstack.key_manager.v1.quota.Quota>).

Raises โ€” NotFoundException (<#openstack.exceptions.NotFoundException>) when no resource can be found.

Secret Store Operations

class openstack.key_manager.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

secret_stores(**query)

Returns a generator of secret stores โ€” yes bestie, a whole generator, lazy and efficient, we love to see it ๐Ÿงš

Parameters

  • query โ€” optional query parameters to be sent along to limit the resources being returned.

Returns โ€” a generator of secret store objects.

get_global_default_secret_store()

Gets the global default secret store, the main character of secret stores ๐Ÿ‘‘

Returns โ€” one SecretStore (<#openstack.key_manager.v1.secret_store.SecretStore>).

Raises โ€” NotFoundException (<#openstack.exceptions.NotFoundException>) when no resource can be found. ๐Ÿ˜ญ

get_preferred_secret_store()

Gets the preferred secret store for the current project โ€” this project's personal fave ๐ŸŒธ

Returns โ€” one SecretStore (<#openstack.key_manager.v1.secret_store.SecretStore>).

Raises โ€” NotFoundException (<#openstack.exceptions.NotFoundException>) when no resource can be found.

ProjectQuota Operations

class openstack.key_manager.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

delete_project_quota(project, ignore_missing=True)

Deletes a project quota ๐Ÿ—‘๏ธโœจ

Parameters

  • project โ€” a project ID or a Project (<#openstack.identity.v3.project.Project>) instance.
  • ignore_missing โ€” False means a NotFoundException (<#openstack.exceptions.NotFoundException>) gets raised when the project quota doesn't exist. True means no exception gets set when you attempt to delete a nonexistent project quota. Chill mode: activated ๐Ÿซถ

Returns โ€” None.

get_project_quota(project)

Get a single project quota, one (1) quota, freshly fetched ๐Ÿ’œ

Parameters

  • project โ€” a project ID or a Project (<#openstack.identity.v3.project.Project>) instance.

Returns โ€” one ProjectQuota (<#openstack.key_manager.v1.project_quota.ProjectQuota>).

Raises โ€” NotFoundException (<#openstack.exceptions.NotFoundException>) when no resource can be found.

update_project_quota(project, **attrs)

Updates a project quota โ€” new quota, who dis ๐Ÿ’…

Parameters

  • project โ€” a project ID or a Project (<#openstack.identity.v3.project.Project>) instance.
  • attrs โ€” the attributes to update on the project quota represented by project quota.

Returns โ€” the updated project quota ๐Ÿ”ฅ

โœจ Secret ACL Operations โœจ

Okay bestie, so first up we have the class openstack.key_manager.v1._proxy.Proxy โ€” and yes, the signature is a whole mood, so here it is in all its glory:

class openstack.key_manager.v1._proxy.Proxy(session, *,
       service_type=None, service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)
  • get_secret_acl(secret) โ€” Gets the ACL of a secret. No cap, it's giving "let me see who's allowed".
    • Parameters:
      • secret โ€” Secret ID or a Secret instance (the openstack.key_manager.v1.secret.Secret class).
    • Returns: SecretACL (the openstack.key_manager.v1.secret_acl.SecretACL class) whose read contains the ACL. If no explicit ACL exists, the default ACL is returned.
    • Raises: NotFoundException (the openstack.exceptions.NotFoundException class)
  • set_secret_acl(secret, **attrs) โ€” Set (replace) the ACL of a secret (PUT). It's a full glow-up replacement, bestie.
    • Parameters:
      • secret โ€” Secret ID or Secret instance.
      • attrs โ€” ACL body, typically a read dict.
    • Returns: SecretACL (the openstack.key_manager.v1.secret_acl.SecretACL class) whose acl_ref references the ACL URL.
  • update_secret_acl(secret, **attrs) โ€” Partially update the ACL of a secret (PATCH). Lowkey just tweaking, not a full rewrite.
    • Parameters:
      • secret โ€” Secret ID or Secret instance.
      • attrs โ€” Partial ACL body, typically a read dict.
    • Returns: SecretACL (the openstack.key_manager.v1.secret_acl.SecretACL class) whose acl_ref references the ACL URL.
  • delete_secret_acl(secret, ignore_missing=True) โ€” Delete the ACL of a secret. Bye bye, ACL! ๐Ÿ‘‹
    • Parameters:
      • secret โ€” Secret ID or Secret instance.
      • ignore_missing โ€” When set to False, raise if not found.
    • Returns: None
    • Raises: NotFoundException (the openstack.exceptions.NotFoundException class)

โœจ Secret Consumer Operations โœจ

Same iconic class signature, because consistency is key:

class openstack.key_manager.v1._proxy.Proxy(session, *,
       service_type=None, service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)
  • create_secret_consumer(secret, **attrs) โ€” Create a consumer for a secret. It's giving "let's link this secret to a service".
    • Parameters:
      • secret โ€” Either the id of a secret or a Secret instance (the openstack.key_manager.v1.secret.Secret class).
      • attrs โ€” Must include service, resource_type, resource_id.
    • Returns: The created consumer association.
  • delete_secret_consumer(secret, ignore_missing=True, **attrs) โ€” Delete a consumer association from a secret. Unlinking, bestie.
    • Parameters:
      • secret โ€” Either the id of a secret or a Secret instance (the openstack.key_manager.v1.secret.Secret class).
      • ignore_missing โ€” When set to False, NotFoundException (the openstack.exceptions.NotFoundException class) will be raised when the secret does not exist. When set to True, no exception will be set when attempting to delete a nonexistent secret.
      • attrs โ€” Must include service, resource_type, resource_id.
    • Returns: None
  • secret_consumers(secret, **query) โ€” List consumers for a secret. Get the whole squad of consumers.
    • Parameters:
      • secret โ€” Either the id of a secret or a Secret instance (the openstack.key_manager.v1.secret.Secret class).
    • Returns: A generator of SecretConsumer objects.

โœจ Load Balancer v2 API โœจ

The LoadBalancer Class

Okay so the load_balancer high-level interface? It's literally available through the load_balancer member of a Connection object (that's the openstack.connection.Connection class). But heads up: the load_balancer member will only be added if the service is detected. No service, no member. Periodt.

Load Balancer Operations

And here's the class signature for this one โ€” yes, it's long, but we keep it exact:

class openstack.load_balancer.v2._proxy.Proxy(session, *,
       service_type=None, service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)
  • create_load_balancer(**attrs) โ€” Create a new load balancer from attributes. It's a whole new LB, slay.
    • Parameters:
      • attrs โ€” Keyword arguments which will be used to create a LoadBalancer (the openstack.load_balancer.v2.load_balancer.LoadBalancer class), comprised of the properties on the LoadBalancer class.
    • Returns: The results of load balancer creation.
  • get_load_balancer(load_balancer) โ€” Get a load balancer. Fetching the LB details.
    • Parameters:
      • load_balancer โ€” The value can be the ID of a load balancer or a LoadBalancer instance (the openstack.load_balancer.v2.load_balancer.LoadBalancer class).
    • Returns: One LoadBalancer (the openstack.load_balancer.v2.load_balancer.LoadBalancer class).
  • get_load_balancer_statistics(load_balancer) โ€” Get the load balancer statistics. Stats, bestie!
    • Parameters:
      • load_balancer โ€” The value can be the ID of a load balancer or a LoadBalancer instance (the openstack.load_balancer.v2.load_balancer.LoadBalancer class).
    • Returns: One LoadBalancerStats (the openstack.load_balancer.v2.load_balancer.LoadBalancerStats class).
  • load_balancers(**query) โ€” Retrieve a generator of load balancers. All the LBs, coming right up.
    • Returns: A generator of load balancer instances.
  • delete_load_balancer(load_balancer, ignore_missing=True, cascade=False) โ€” Delete a load balancer. ๐Ÿ—‘๏ธ
    • Parameters:
      • load_balancer โ€” The load_balancer can be either the ID or a LoadBalancer instance (the openstack.load_balancer.v2.load_balancer.LoadBalancer class).
      • ignore_missing โ€” When set to False, NotFoundException (the openstack.exceptions.NotFoundException class) will be raised when the load balancer does not exist. When set to True, no exception will be set when attempting to delete a nonexistent load balancer.
      • cascade โ€” If true will delete all child objects of the load balancer.
    • Returns: None
  • find_load_balancer(name_or_id, ignore_missing=True) โ€” Find a single load balancer. Like a search but for one LB.
    • Parameters:
      • name_or_id โ€” The name or ID of a load balancer.
      • ignore_missing โ€” When set to False, NotFoundException (the openstack.exceptions.NotFoundException class) will be raised when the load balancer does not exist. When set to True, no exception will be set when attempting to find a nonexistent load balancer.
    • Returns: None
  • update_load_balancer(load_balancer, **attrs) โ€” Update a load balancer. Glow-up time.
    • Parameters:
      • load_balancer โ€” The load_balancer can be either the ID or a LoadBalancer instance (the openstack.load_balancer.v2.load_balancer.LoadBalancer class).
      • attrs โ€” The attributes to update on the load balancer represented by load_balancer.
    • Returns: The updated load_balancer.
  • wait_for_load_balancer(name_or_id, status='ACTIVE', failures=['ERROR'], interval=2, wait=300) โ€” Wait for load balancer status. It's giving "are we there yet?" but for LBs.
    • Parameters:
      • name_or_id โ€” The name or ID of the load balancer.
      • status โ€” Desired status.
      • failures (list) โ€” Statuses that would be interpreted as failures. Default to ['ERROR'].
      • interval โ€” Number of seconds to wait between consecutive checks. Defaults to 2.
      • wait โ€” Maximum number of seconds to wait before the status to be reached. Defaults to 300.
    • Returns: The load balancer is returned on success.
  • Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if the transition to the status you want just... didn't happen inside the wait time you gave it. ๐Ÿ˜ญ
  • Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if the resource has walked itself over to one of the failure statuses. yikes.
  • Raises AttributeError if the resource doesn't even have a status attribute, bestie. like it's not even in the chat. ๐Ÿ’€
  • failover_load_balancer(load_balancer) โ€” Failover a load balancer. dramatic but necessary โœจ

Parameters

  • load_balancer โ€” the value can be the ID of a load balancer or a LoadBalancer <#openstack.load_balancer.v2.load_balancer.LoadBalancer> instance.

Returns

None


๐ŸŒธ Listener Operations ๐ŸŒธ

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

(yeah that's the whole constructor again, unedited, no cap โ€” copy it exactly if you're writing it down somewhere ๐Ÿ’…)

  • create_listener(**attrs) โ€” Create a new listener from attributes. it's giving new-listener energy ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a Listener <#openstack.load_balancer.v2.listener.Listener>, comprised of the properties on the Listener class.

Returns

The results of listener creation

  • delete_listener(listener, ignore_missing=True) โ€” Delete a listener. bye girl ๐Ÿฆ‹

Parameters

  • listener โ€” the value can be either the ID of a listener or a Listener <#openstack.load_balancer.v2.listener.Listener> instance.
  • ignore_missing โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the listner does not exist. When set to True, no exception will be set when attempting to delete a nonexistent listener.

Returns

None

  • find_listener(name_or_id, ignore_missing=True) โ€” Find a single listener. detective mode ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a listener.
  • ignore_missing โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns

One Listener <#openstack.load_balancer.v2.listener.Listener> or None

  • get_listener(listener) โ€” Get a single listener.

Parameters

  • listener โ€” the value can be the ID of a listener or a Listener <#openstack.load_balancer.v2.listener.Listener> instance.

Returns

One Listener <#openstack.load_balancer.v2.listener.Listener>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

  • get_listener_statistics(listener) โ€” Get the listener statistics. numbers girlies rise ๐Ÿ’…

Parameters

  • listener โ€” the value can be the ID of a listener or a Listener <#openstack.load_balancer.v2.listener.Listener> instance.

Returns

One ListenerStats <#openstack.load_balancer.v2.listener.ListenerStats>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

  • listeners(**query) โ€” Return a generator of listeners. a whole little lineup โœจ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Valid parameters are:

Returns

A generator of listener objects

  • update_listener(listener, **attrs) โ€” Update a listener. glow-up time ๐ŸŒˆ

Parameters

  • listener โ€” either the id of a listener or a Listener <#openstack.load_balancer.v2.listener.Listener> instance.
  • attrs โ€” the attributes to update on the listener represented by listener.

Returns

The updated listener


๐Ÿซถ Pool Operations ๐Ÿซถ

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

(same constructor, character for character โ€” iconic of her honestly)

  • create_pool(**attrs) โ€” Create a new pool from attributes. pool party ๐ŸŠโ€โ™€๏ธ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Pool <#openstack.load_balancer.v2.pool.Pool>, comprised of the properties on the Pool class.

Returns

The results of Pool creation

  • get_pool(pool) โ€” Get a pool.

Parameters

  • pool โ€” value is either a pool ID or a Pool <#openstack.load_balancer.v2.pool.Pool> instance.

Returns

One Pool <#openstack.load_balancer.v2.pool.Pool>

  • pools(**query) โ€” Retrieve a generator of pools.

Returns

A generator of Pool instances

  • delete_pool(pool, ignore_missing=True) โ€” Delete a pool.

Parameters

  • pool โ€” the pool is either a pool ID or a Pool <#openstack.load_balancer.v2.pool.Pool> instance
  • ignore_missing โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the pool does not exist. When set to True, no exception will be set when attempting to delete a nonexistent pool.

Returns

The deleted pool.

  • 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 โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the pool does not exist. When set to True, no exception will be set when attempting to find a nonexistent pool.

Returns

None

  • update_pool(pool, **attrs) โ€” Update a pool.

Parameters

  • pool โ€” either the id of a pool or a Pool <#openstack.load_balancer.v2.pool.Pool> instance.
  • attrs โ€” the attributes to update on the pool represented by pool.

Returns

The updated pool


๐Ÿ’œ Member Operations ๐Ÿ’œ

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

(yes bestie, the exact same one, do not retype it from memory ๐Ÿ˜ญ)

  • create_member(pool, **attrs) โ€” Create a new member from attributes. welcome to the group chat ๐Ÿ‘‘

Parameters

  • pool โ€” the pool can be either the ID of a pool or a Pool <#openstack.load_balancer.v2.pool.Pool> instance that the member will be created in.
  • attrs โ€” keyword arguments which will be used to create a Member <#openstack.load_balancer.v2.member.Member>, comprised of the properties on the Member class.

Returns

The results of member creation

  • delete_member(member, pool, ignore_missing=True) โ€” Delete a member.

Parameters

  • member โ€” the member can be either the ID of a member or a Member <#openstack.load_balancer.v2.member.Member> instance.
  • pool โ€” okay so this is either the ID of a pool, or a whole Pool <#openstack.load_balancer.v2.pool.Pool> instance that the member belongs to ๐Ÿ’…
  • ignore_missing โ€” set it to False and a NotFoundException <#openstack.exceptions.NotFoundException> gets raised the moment the member doesn't exist. Set it to True and nothing happens โ€” no exception when you try to delete a member that was never there. Iconic lazy-girl behaviour tbh โœจ

Returns โ€” None ๐ŸŽ€

find_member(name_or_id, pool, ignore_missing=True)

Find one single member. Just the one. Main character only ๐Ÿ‘‘

Parameters

  • name_or_id โ€” the name or the ID of a member ๐ŸŒธ
  • pool โ€” either the ID of a pool or a Pool <#openstack.load_balancer.v2.pool.Pool> instance that the member belongs to ๐Ÿซถ
  • ignore_missing โ€” when it's False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the resource doesn't exist. When it's True, you just get None back when you go looking for a resource that isn't there. No drama ๐Ÿ’€

Returns โ€” one Member <#openstack.load_balancer.v2.member.Member> or None โญ

get_member(member, pool)

Get a single member. Again, singular. We're not doing plurals here ๐Ÿ’–

Parameters

  • member โ€” can be the ID of a member or a Member <#openstack.load_balancer.v2.member.Member> instance ๐ŸŽ€
  • pool โ€” the ID of a pool, or a Pool <#openstack.load_balancer.v2.pool.Pool> instance that the member belongs to ๐ŸŒˆ

Returns โ€” one Member <#openstack.load_balancer.v2.member.Member> ๐Ÿ’ซ

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ

members(pool, **query)

Return a generator of members โ€” so many members, a whole little squad ๐Ÿงš

Parameters

  • pool โ€” the ID of a pool, or a Pool <#openstack.load_balancer.v2.pool.Pool> instance that the member belongs to ๐Ÿฆ‹
  • query โ€” optional query parameters you send to limit the resources coming back at you. Valid parameters are:

Returns โ€” a generator of member objects โญ

update_member(member, pool, **attrs)

Update a member. Glow-up time ๐Ÿ’…

Parameters

  • member โ€” either the ID of a member or a Member <#openstack.load_balancer.v2.member.Member> instance ๐ŸŒธ
  • pool โ€” the ID of a pool, or a Pool <#openstack.load_balancer.v2.pool.Pool> instance that the member belongs to ๐Ÿ’œ
  • attrs โ€” the attributes to update on the member represented by member โœจ

Returns โ€” the updated member ๐Ÿ”ฅ


โœจ Health Monitor Operations โœจ

class openstack.load_balancer.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

find_health_monitor(name_or_id, ignore_missing=True)

Find a single health monitor ๐Ÿฉบโœจ

Parameters

  • name_or_id โ€” the name or the ID of a health monitor ๐Ÿ’–
  • ignore_missing โ€” set to False and NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the health monitor doesn't exist. Set to True and no exception is set when you're attempting to find a nonexistent health monitor. Bestie just shrugs ๐Ÿคทโ€โ™€๏ธ

Returns โ€” the openstack.load_balancer.v2.healthmonitor.HealthMonitor object matching the given name or id, or None if nothing matches ๐ŸŒ™

Raises openstack.exceptions.DuplicateResource <#openstack.exceptions.DuplicateResource> if more than one resource is found for this request โ€” like, calm down, pick one ๐Ÿ˜ญ

Raises openstack.exceptions.NotFoundException <#openstack.exceptions.NotFoundException> if nothing is found and ignore_missing is False ๐Ÿ’€

create_health_monitor(**attrs)

Create a brand new health monitor out of attributes. Build-a-bear but for load balancing ๐Ÿงธ

Parameters

  • attrs โ€” keyword arguments that get used to create a HealthMonitor, made up of the properties on the HealthMonitor class ๐ŸŽ€

Returns โ€” the results of HealthMonitor creation โœจ

get_health_monitor(healthmonitor)

Get a health monitor ๐Ÿ‘‘

Parameters

  • healthmonitor โ€” the value can be the ID of a health monitor or a HealthMonitor instance ๐Ÿ’…

Returns โ€” one health monitor ๐Ÿฆ‹

health_monitors(**query)

Retrieve a generator of health monitors โ€” a whole generator, so many of them ๐ŸŒธ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Valid parameters are: 'name', 'created_at', 'updated_at', 'delay', 'expected_codes', 'http_method', 'max_retries', 'max_retries_down', 'pool_id', 'provisioning_status', 'operating_status', 'timeout', 'project_id', 'type', 'url_path', 'is_admin_state_up' ๐ŸŒˆ

Returns โ€” a generator of health monitor instances โญ

delete_health_monitor(healthmonitor, ignore_missing=True)

Delete a health monitor. Bye bestie ๐Ÿ‘‹๐Ÿ’–

Parameters

  • healthmonitor โ€” can be either the ID of the health monitor or a HealthMonitor instance ๐Ÿ’…
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the healthmonitor doesn't exist. When set to True, no exception gets set when you're attempting to delete a nonexistent healthmonitor ๐Ÿ™ˆ

Returns โ€” the deleted health monitor โœจ

update_health_monitor(healthmonitor, **attrs)

Update a health monitor. Self-care era ๐Ÿง–โ€โ™€๏ธ

Parameters

  • healthmonitor โ€” can be either the ID of the health monitor or a HealthMonitor instance ๐ŸŽ€
  • attrs โ€” the attributes to update on the health monitor represented by healthmonitor ๐Ÿฆ‹

Returns โ€” the updated health monitor ๐Ÿ”ฅ


โœจ L7 Policy Operations โœจ

class openstack.load_balancer.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_l7_policy(**attrs)

Create a new l7policy from attributes ๐Ÿ‘‘

Parameters

  • attrs โ€” keyword arguments which will be used to create a L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy>, comprised of the properties on the L7Policy class ๐Ÿ’–

Returns โ€” the results of l7policy creation โœจ

delete_l7_policy(l7_policy, ignore_missing=True)

Delete a l7policy ๐Ÿ—‘๏ธ๐Ÿ’…

Parameters

  • l7_policy โ€” the value can be either the ID of a l7policy or a L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance ๐ŸŒธ
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the l7policy doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent l7policy โ€” she simply lets it go ๐Ÿฆ‹

Returns โ€” None ๐ŸŽ€

find_l7_policy(name_or_id, ignore_missing=True)

Find a single l7policy ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a l7policy ๐ŸŒˆ
  • ignore_missing โ€” okay so when this is False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised the moment the resource doesn't exist. When it's True? You just get None back when you try to find something that isn't there. No drama, no exception ๐Ÿ’…

Returns โ€” one L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> or None, no cap


get_l7_policy(l7_policy)

Get a single l7policy. Just the one. The main character ๐ŸŽ€

Parameters

  • l7_policy โ€” this value can be the ID of a l7policy, or an actual L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance. Either works, she's flexible โœจ

Returns โ€” one L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ like it's literally not there


l7_policies(**query)

Return a generator of l7policies. A whole lil stream of them ๐ŸŒธ

Parameters

  • query โ€” optional query parameters you send over to limit the resources being returned. Valid parameters are:
bestie the list of valid parameters is literally empty in the source, I'm not making stuff up for you ๐Ÿ’€ that's just how it is

Returns โ€” a generator of l7policy objects ๐Ÿฆ‹


update_l7_policy(l7_policy, **attrs)

Update a l7policy. Glow-up time ๐Ÿ‘‘

Parameters

  • l7_policy โ€” either the id of a l7policy or a L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance.
  • attrs โ€” the attributes to update on the l7policy represented by l7policy.

Returns โ€” the updated l7policy ๐Ÿ”ฅ


โœจ L7 Rule Operations โœจ

class openstack.load_balancer.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_l7_rule(l7_policy, **attrs)

Create a shiny new l7rule from attributes โœจ

Parameters

  • l7_policy โ€” the l7_policy can be either the ID of a l7policy, or an L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance that the l7rule is gonna be created in. It's giving "where do I live" energy ๐Ÿ 
  • attrs โ€” keyword arguments that get used to create a L7Rule <#openstack.load_balancer.v2.l7_rule.L7Rule>, made up of the properties on the L7Rule class.

Returns โ€” the results of l7rule creation ๐ŸŽ€


delete_l7_rule(l7rule, l7_policy, ignore_missing=True)

Delete a l7rule. Bye bestie ๐Ÿ‘‹

Parameters

  • l7rule โ€” the l7rule can be either the ID of a l7rule or a L7Rule <#openstack.load_balancer.v2.l7_rule.L7Rule> instance.
  • l7_policy โ€” the l7_policy can be either the ID of a l7policy or an L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance that the l7rule belongs to.
  • ignore_missing โ€” when it's False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the l7rule does not exist. When it's True, no exception will be set when you attempt to delete a nonexistent l7rule. Very chill of it ๐Ÿงš

Returns โ€” None


find_l7_rule(name_or_id, l7_policy, ignore_missing=True)

Find a single l7rule ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a l7rule.
  • l7_policy โ€” the l7_policy can be either the ID of a l7policy or an L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance that the l7rule belongs to.
  • ignore_missing โ€” when it's False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource does not exist. When it's True, None gets returned when you attempt to find a nonexistent resource ๐Ÿซถ

Returns โ€” one L7Rule <#openstack.load_balancer.v2.l7_rule.L7Rule> or None


get_l7_rule(l7rule, l7_policy)

Get a single l7rule. One. Singular. Iconic ๐Ÿ’…

Parameters

  • l7rule โ€” the l7rule can be the ID of a l7rule or a L7Rule <#openstack.load_balancer.v2.l7_rule.L7Rule> instance.
  • l7_policy โ€” the l7_policy can be either the ID of a l7policy or an L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance that the l7rule belongs to.

Returns โ€” one L7Rule <#openstack.load_balancer.v2.l7_rule.L7Rule>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ


l7_rules(l7_policy, **query)

Return a generator of l7rules ๐ŸŒˆ

Parameters

  • l7_policy โ€” the l7_policy can be either the ID of a l7_policy or an L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance that the l7rule belongs to.
  • query โ€” optional query parameters you send over to limit the resources being returned. Valid parameters are:
again, the source lists zero valid parameters here. Not me inventing new ones for the aesthetic ๐Ÿ’€

Returns โ€” a generator of l7rule objects ๐Ÿฆ‹


update_l7_rule(l7rule, l7_policy, **attrs)

Update a l7rule โœจ

Parameters

  • l7rule โ€” either the ID of a l7rule or a L7Rule <#openstack.load_balancer.v2.l7_rule.L7Rule> instance.
  • l7_policy โ€” the l7_policy can be either the ID of a l7policy or an L7Policy <#openstack.load_balancer.v2.l7_policy.L7Policy> instance that the l7rule belongs to.
  • attrs โ€” the attributes to update on the l7rule represented by l7rule.

Returns โ€” the updated l7rule ๐Ÿ”ฅ


๐Ÿ’œ Provider Operations ๐Ÿ’œ

class openstack.load_balancer.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

providers(**query)

Retrieve a generator of providers ๐ŸŒŸ

Returns โ€” a generator of providers instances


provider_flavor_capabilities(provider, **query)

Retrieve a generator of provider flavor capabilities ๐Ÿ“

Returns โ€” a generator of provider flavor capabilities instances


๐ŸŽ€ Flavor Profile Operations ๐ŸŽ€

class openstack.load_balancer.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_flavor_profile(**attrs)

Create a new flavor profile from attributes โœจ

Parameters

  • attrs โ€” keyword arguments that get used to create a FlavorProfile <#openstack.load_balancer.v2.flavor_profile.FlavorProfile>, made up of the properties on the FlavorProfile class.

Returns โ€” the results of profile creation creation. Yes, "creation creation," that's what it says, and honestly? Slay ๐Ÿ’…


get_flavor_profile(flavor_profile)

Get a flavor profile ๐Ÿ’–

Parameters

  • flavor_profile โ€” this value can be the name of a flavor profile, or a FlavorProfile <#openstack.load_balancer.v2.flavor_profile.FlavorProfile> instance.

Returns โ€” one FlavorProfile <#openstack.load_balancer.v2.flavor_profile.FlavorProfile>


flavor_profiles(**query)

Retrieve a generator of flavor profiles ๐ŸŒธ

Returns โ€” a generator of flavor profiles instances


delete_flavor_profile(flavor_profile, ignore_missing=True)

Delete a flavor profile ๐Ÿ‘‹

Parameters

-

๐Ÿ’… delete_flavor_profile(flavor_profile, ignore_missing=True)

Say bye to a flavor profile ๐Ÿ‘‹

Parameters

  • flavor_profile โ€” the flavor profile can be either the ID or a FlavorProfile instance (the full path is openstack.load_balancer.v2.flavor_profile.FlavorProfile, iykyk)
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the flavor profile does not exist. When set to True, no exception will be set when attempting to delete a nonexistent flavor profile. lowkey the chill option fr fr

Returns

None


๐Ÿ”Ž find_flavor_profile(name_or_id, ignore_missing=True)

Find a single flavor profile, like a lil scavenger hunt ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • name_or_id โ€” the name or ID of a flavor profile
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the flavor profile does not exist. When set to True, no exception will be set when attempting to find a nonexistent flavor profile.

Returns

None


โœจ update_flavor_profile(flavor_profile, **attrs)

Glow-up time for a flavor profile ๐Ÿ’–

Parameters

  • flavor_profile โ€” the flavor_profile can be either the ID or a FlavorProfile (openstack.load_balancer.v2.flavor_profile.FlavorProfile) instance
  • attrs โ€” the attributes to update on the flavor profile represented by flavor_profile

Returns

The updated flavor profile


๐Ÿ“ Flavor Operations

class signature incoming, and yes it's the whole entire thing, exactly as written, no I'm not summarizing it bestie:

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿง create_flavor(**attrs)

Create a new flavor from attributes ๐Ÿฆ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Flavor (openstack.load_balancer.v2.flavor.Flavor), comprised of the properties on the Flavor class.

Returns

The results of flavor creation creation

not a typo of mine โ€” the docs fr said "creation creation" twice and honestly? main character energy. keeping it exactly as-is, no cap ๐Ÿ’€

๐Ÿ‘€ get_flavor(flavor)

Get a flavor

Parameters

  • flavor โ€” the value can be the ID of a flavor or Flavor (openstack.load_balancer.v2.flavor.Flavor) instance.

Returns

One Flavor (openstack.load_balancer.v2.flavor.Flavor)


๐ŸŒˆ flavors(**query)

Retrieve a generator of flavors

Returns

A generator of flavor instances


๐Ÿ’€ delete_flavor(flavor, ignore_missing=True)

Delete a flavor

Parameters

  • flavor โ€” the flavor can be either the ID or a Flavor (openstack.load_balancer.v2.flavor.Flavor) instance
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the flavor does not exist. When set to True, no exception will be set when attempting to delete a nonexistent flavor.

Returns

None


๐Ÿฆ‹ find_flavor(name_or_id, ignore_missing=True)

Find a single flavor

Parameters

  • name_or_id โ€” the name or ID of a flavor
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the flavor does not exist. When set to True, no exception will be set when attempting to find a nonexistent flavor.

Returns

None


๐ŸŽ€ update_flavor(flavor, **attrs)

Update a flavor

Parameters

  • flavor โ€” the flavor can be either the ID or a Flavor (openstack.load_balancer.v2.flavor.Flavor) instance
  • attrs โ€” the attributes to update on the flavor represented by flavor.

Returns

The updated flavor


๐Ÿ’œ Quota Operations

same Proxy class signature, same everything, here we go again (the manpage is obsessed with repeating it and honestly? consistent queen):

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿซถ quotas(**query)

Return a generator of quotas

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Currently no query parameter is supported. (so likeโ€ฆ bring nothing ๐Ÿงš)

Returns

A generator of quota objects


๐ŸŒธ get_quota(quota)

Get a quota

Parameters

  • quota โ€” the value can be the ID of a quota or a Quota (openstack.load_balancer.v2.quota.Quota) instance. The ID of a quota is the same as the project ID for the quota. yes, they're the same thing, that's not a mistake ๐Ÿคฏ

Returns

One Quota (openstack.load_balancer.v2.quota.Quota)

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.


โญ update_quota(quota, **attrs)

Update a quota

Parameters

  • quota โ€” either the ID of a quota or a Quota (openstack.load_balancer.v2.quota.Quota) instance. The ID of a quota is the same as the project ID for the quota.
  • attrs โ€” the attributes to update on the quota represented by quota.

Returns

The updated quota


๐ŸŽ€ get_quota_default()

Get a default quota

Returns

One QuotaDefault


๐Ÿ”ฅ delete_quota(quota, ignore_missing=True)

Delete a quota (i.e. reset to the default quota) โ€” so it's less "delete" and more "rebirth" โœจ

Parameters

  • quota โ€” the value can be either the ID of a quota or a Quota (openstack.load_balancer.v2.quota.Quota) instance. The ID of a quota is the same as the project ID for the quota.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when quota does not exist. When set to True, no exception will be set when attempting to delete a nonexistent quota.

Returns

None


๐Ÿฆ‹ Amphora Operations

you guessed it, the Proxy class signature one more time, character for character:

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿงš amphorae(**query)

Retrieve a generator of amphorae โ€” say it with me, amphorae ๐Ÿบ

Returns

A generator of amphora instances


๐Ÿ‘‘ get_amphora(amphora)

Get a amphora

Parameters

  • amphora โ€” the value can be the ID of an amphora or Amphora (openstack.load_balancer.v2.amphora.Amphora) instance.

Returns

One Amphora (openstack.load_balancer.v2.amphora.Amphora)


๐Ÿ’– find_amphora(amphora, ignore_missing=True)

Find a single amphora

Parameters

  • amphora โ€” the ID or a Amphora (openstack.load_balancer.v2.amphora.Amphora) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the amphora does not exist. When set to True, no exception will be set when attempting to find a nonexistent amphora.

Returns

None


๐ŸŒŸ configure_amphora(amphora)

Update the configuration of an amphora agent

  • amphora โ€” the ID or an Amphora <#openstack.load_balancer.v2.amphora.Amphora> instance.

Returns

None

  • failover_amphora(amphora) โ€” failover an amphora ๐Ÿซถ

Parameters

  • amphora โ€” the ID or an Amphora <#openstack.load_balancer.v2.amphora.Amphora> instance.

Returns

None


๐Ÿฆ‹ Availability Zone Profile Operations

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • create_availability_zone_profile(**attrs) โ€” bestie, this makes a brand new availability zone profile straight from attributes โœจ

Parameters

  • attrs โ€” keyword arguments that get used to create an AvailabilityZoneProfile <#openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile>, built out of the properties on the AvailabilityZoneProfile class. iykyk.

Returns

The results of profile creation

  • get_availability_zone_profile(availability_zone_profile) โ€” grab one availability zone profile, no cap ๐ŸŒธ

Parameters

  • availability_zone_profile โ€” the value here can be the ID of an availability_zone profile or an AvailabilityZoneProfile <#openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile> instance.

Returns

One AvailabilityZoneProfile <#openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile>

  • availability_zone_profiles(**query) โ€” pulls you a generator of availability zone profiles, literally ๐Ÿ’…

Returns

A generator of availability zone profiles instances

  • delete_availability_zone_profile(availability_zone_profile, ignore_missing=True) โ€” yeets an availability zone profile ๐ŸŽ€

Parameters

  • availability_zone_profile โ€” the availability_zone_profile can be either the ID or an AvailabilityZoneProfile <#openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile> instance.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the availability zone profile doesn't exist. When it's set to True, no exception gets set when you try to delete a nonexistent availability zone profile. ๐Ÿซถ

Returns

None

  • find_availability_zone_profile(name_or_id, ignore_missing=True) โ€” finds you a single availability zone profile, iconic behaviour ๐Ÿ™ˆ

Parameters

  • name_or_id โ€” the name or ID of an availability zone profile
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the availability zone profile doesn't exist. When it's set to True, no exception gets set when you try to find a nonexistent availability zone profile.

Returns

None

  • update_availability_zone_profile(availability_zone_profile, **attrs) โ€” updates an availability zone profile โญ

Parameters

  • availability_zone_profile โ€” the availability_zone_profile can be either the ID or an AvailabilityZoneProfile <#openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile> instance.
  • attrs โ€” the attributes to update on the availability zone profile represented by availability_zone_profile.

Returns

The updated availability zone profile


๐ŸŒˆ Availability Zone Operations

class openstack.load_balancer.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • create_availability_zone(**attrs) โ€” creates a new availability zone from attributes, slay ๐Ÿ’–

Parameters

  • attrs โ€” keyword arguments which will be used to create an AvailabilityZone <#openstack.load_balancer.v2.availability_zone.AvailabilityZone>, comprised of the properties on the AvailabilityZoneclass.

Returns

The results of availability_zone creation creation

  • get_availability_zone(availability_zone) โ€” gets you one availability zone ๐Ÿงš

Parameters

  • availability_zone โ€” the value can be the ID of an availability_zone or an AvailabilityZone <#openstack.load_balancer.v2.availability_zone.AvailabilityZone> instance.

Returns

One AvailabilityZone <#openstack.load_balancer.v2.availability_zone.AvailabilityZone>

  • availability_zones(**query) โ€” retrieves a generator of availability zones, very demure ๐Ÿ’œ

Returns

A generator of availability zone instances

  • delete_availability_zone(availability_zone, ignore_missing=True) โ€” deletes an availability_zone ๐Ÿ’€

Parameters

  • availability_zone โ€” the availability_zone can be either the ID or an AvailabilityZone <#openstack.load_balancer.v2.availability_zone.AvailabilityZone> instance.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the availability zone doesn't exist. When it's set to True, no exception will be set when attempting to delete a nonexistent availability zone.

Returns

None

  • find_availability_zone(name_or_id, ignore_missing=True) โ€” finds a single availability zone, periodt โœจ

Parameters

  • name_or_id โ€” the name or ID of an availability zone
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the availability zone doesn't exist. When it's set to True, no exception will be set when attempting to find a nonexistent availability zone.

Returns

None

  • update_availability_zone(availability_zone, **attrs) โ€” updates an availability zone ๐Ÿ”ฅ

Parameters

  • availability_zone โ€” the availability_zone can be either the ID or an AvailabilityZone <#openstack.load_balancer.v2.availability_zone.AvailabilityZone> instance.
  • attrs โ€” the attributes to update on the availability_zone represented by availability_zone.

Returns

The updated availability_zone


๐Ÿ’Œ Message API v2

For details on how to use message, see Using OpenStack Message <> ๐ŸŽ€

๐Ÿ‘‘ The Message v2 Class

The message high-level interface is available through the message member of a Connection <#openstack.connection.Connection> object. The message member only gets added if the service is detected. lowkey magical.

๐Ÿ“ Message Operations

class openstack.message.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • post_message(queue_name, messages) โ€” posts messages to the given queue, go off ๐Ÿ“ฌ

Parameters

  • queue_name โ€” the name of the target queue to post the message to.
  • messages โ€” list of messages body and TTL to post. :type messages: list

A string, and that string has the location of the messages you posted successfully. Slay, you posted. โœจ

messages(queue_name, **query)

Grabs you a generator of messages โ€” a whole lil stream of them, like a feed. ๐Ÿฆ‹

Parameters

  • queue_name โ€” the name of the target queue you're querying messages from.
  • query โ€” optional query params you can send along to narrow down which messages come back. The available ones are:
    • limit: asks for at most that many items to be returned from the query.
    • marker: specifies the ID of the last-seen subscription. The move here is: use the limit param to make an initial limited request, then take the ID of the last-seen subscription from the response and feed it in as the marker param value on your next limited request. Paging, bestie, it's giving pagination. ๐Ÿ’…
    • echo: says whether the messages can be echoed back to the client that posted them.
    • include_claimed: says whether the messages list should include the claimed messages.

Returns

A generator of message instances. A whole generator, so you can loop over it like it's your fyp. ๐ŸŒˆ

get_message(queue_name, message)

Gets you exactly one message. Iconic, singular, main character energy. ๐Ÿ‘‘

Parameters

  • queue_name โ€” the name of the target queue you're getting the message from.
  • message โ€” this value can be the name of a message, or a Message instance.

Returns

One Message.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no message matching the criteria could be found. ๐Ÿ˜ญ Nothing matched, it's literally not there.

delete_message(queue_name, value, claim=None, ignore_missing=True)

Deletes a message. Gone. Reduced to atoms. ๐Ÿ’€

Parameters

  • queue_name โ€” the name of the target queue you're deleting the message from.
  • value โ€” this value can be either the name of a message or a Message instance.
  • claim โ€” this value can be the ID, or a Claim instance, of the claim seizing the message. If it's None, the message has not been claimed.
  • ignore_missing โ€” when you set this to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the message doesn't exist. When it's set to True, no exception gets set when you attempt to delete a nonexistent message. Very chill of it, ngl.

Returns

None.


๐Ÿงบ Queue Operations

class openstack.message.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Yes babes, it's the same Proxy signature again. Three times in this page. She's consistent, we love that for her. ๐Ÿซถ

create_queue(**attrs)

Makes a brand new queue out of attributes. Fresh out the box. ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments that get used to create a Queue, made up of the properties on the Queue class.

Returns

The results of queue creation.

get_queue(queue)

Gets you a queue. One singular queue. ๐Ÿงš

Parameters

  • queue โ€” this value can be the name of a queue or a Queue instance.

Returns

One Queue.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no queue matching the name could be found.

queues(**query)

Gives you a generator of queues โ€” all of them, streaming at you. ๐Ÿฆ‹

Parameters

  • query โ€” optional query params to send along so you can restrict which queues come back. The available ones are:
    • limit: asks for at most that many items to be returned from the query.
    • marker: specifies the ID of the last-seen queue. Use the limit parameter to make an initial limited request, then use the ID of the last-seen queue from the response as the marker parameter value in a subsequent limited request. Same paging trick as before, iykyk. ๐Ÿ’…

Returns

A generator of queue instances.

delete_queue(value, ignore_missing=True)

Deletes a queue. Bye bestie. ๐Ÿ‘‹

Parameters

  • value โ€” this value can be either the name of a queue or a Queue instance.
  • ignore_missing โ€” when you set this to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the queue doesn't exist. When it's set to True, no exception gets set when you attempt to delete a nonexistent queue.

Returns

The deleted queue.


๐ŸŽŸ๏ธ Claim Operations

class openstack.message.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Yup, the exact same signature. She said copy-paste is a valid aesthetic. โœจ

create_claim(queue_name, **attrs)

Creates a new claim from attributes. Claiming things is so fetch. ๐Ÿ”ฅ

Parameters

  • queue_name โ€” the name of the target queue to claim a message from.
  • attrs โ€” keyword arguments that get used to create a Claim, made up of the properties on the Claim class.

Returns

The results of claim creation.

get_claim(queue_name, claim)

Gets you a claim. One claim, no more, no less. ๐Ÿ‘‘

Parameters

  • queue_name โ€” the name of the target queue to claim a message from.
  • claim โ€” this value can be either the ID of a claim or a Claim instance.

Returns

One Claim.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no claim matching the criteria could be found.

update_claim(queue_name, claim, **attrs)

Updates an existing claim from attributes. Glow-up for your claim. ๐Ÿ’…

Parameters

  • queue_name โ€” the name of the target queue to claim a message from.
  • claim โ€” this value can be either the ID of a claim or a Claim instance.
  • attrs โ€” keyword arguments that get used to update a Claim, made up of the properties on the Claim class.

Returns

The results of claim update.

delete_claim(queue_name, claim, ignore_missing=True)

Deletes a claim. Claim revoked, vibe restored. ๐Ÿฆ‹

Parameters

  • queue_name โ€” the name of the target queue to claim messages from.
  • claim โ€” this value can be either the ID of a claim or a Claim instance.
  • ignore_missing โ€” when you set this to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the claim doesn't exist. When it's set to True, no exception gets thrown when you attempt to delete a nonexistent claim.

Returns

The deleted claim.


๐Ÿ“ฌ Subscription Operations

class openstack.message.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Third time's the charm, same signature, same icon behaviour. ๐ŸŽ€

create_subscription(queue_name, **attrs)

Creates a new subscription from attributes. Subscribing is literally self-care. ๐ŸŒธ

Parameters

  • queue_name โ€” the name of the target queue you're subscribing on โœจ
  • attrs โ€” keyword args that get used to create a Subscription, made up of the properties on the Subscription class ๐Ÿ’…

Returns The results of subscription creation ๐ŸŽ€


subscriptions(queue_name, **query)

Pull a whole generator of subscriptions, bestie ๐ŸŒธ

Parameters

  • queue_name โ€” the name of the target queue to subscribe on.
  • query โ€” optional query params you can send to restrict which subscriptions come back. The available ones are:
    • limit: asks for at most that many items back from the query ๐Ÿ”ฅ
    • marker: specifies the ID of the last-seen subscription. Use limit to make your first limited request, then take the ID of the last-seen subscription from the response and drop it in as the marker value on your next limited request. iykyk ๐Ÿงš

Returns A generator of subscription instances ๐Ÿ’œ


get_subscription(queue_name, subscription)

Grab one singular subscription ๐Ÿ‘‘

Parameters

  • queue_name โ€” the name of the target queue of the subscription.
  • message โ€” the value can be the ID of a subscription or a Subscription instance.

Returns One Subscription ๐Ÿฆ‹

Raises NotFoundException <#openstack.exceptions.NotFoundException> when nothing matches the criteria. Sad but true ๐Ÿ˜ญ


delete_subscription(queue_name, value, ignore_missing=True)

Yeet that subscription ๐Ÿ’€

Parameters

  • queue_name โ€” the name of the target queue to delete the subscription from.
  • value โ€” can be either the name of a subscription or a Subscription instance.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the subscription doesn't exist. When it's True, no exception is thrown when you attempt to delete a nonexistent subscription ๐Ÿซถ

Returns The deleted subscription.


๐ŸŒˆ Network API ๐ŸŒˆ

For the deets on how to use network, see Using OpenStack Network <>

โญ The Network Class โญ

The network high-level interface lives on the network member of a Connection <#openstack.connection.Connection> object. Heads up: that network member only gets added if the service is detected ๐Ÿ‘€

๐Ÿฆ‹ Network Operations ๐Ÿฆ‹

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Empty Returns sections in this stretch? Yeah, that's just how it is โ€” no extra lore, no cap ๐Ÿ’…


dhcp_agent_hosting_networks(agent, **query)

A generator of networks hosted by a DHCP agent, slay โœจ

Parameters

  • agent โ€” either the agent id or an instance of Agent.
  • query โ€” kwargs query: optional query parameters to send so you can limit the resources being returned.

Returns A generator of networks ๐ŸŒธ


add_dhcp_agent_to_network(agent, network)

Put a DHCP Agent onto a network ๐Ÿ”ฅ

Parameters

  • agent โ€” either the agent id or an instance of Agent.
  • network โ€” Network instance.

Returns (empty โ€” literally nothing listed here ๐Ÿ™ˆ)


remove_dhcp_agent_from_network(agent, network)

Take a DHCP Agent back off a network ๐Ÿงš

Parameters

  • agent โ€” either the agent id or an instance of Agent.
  • network โ€” Network instance.

Returns (again, nothing listed ๐ŸŒฟ)


create_network(**attrs)

Spin up a brand new network from attributes, main character energy ๐Ÿ‘‘

Parameters attrs โ€” keyword args used to create a Network <#openstack.network.v2.network.Network>, made up of the properties on the Network class.

Returns The results of network creation ๐Ÿ’–


delete_network(network, ignore_missing=True, if_revision=None)

Delete a network. Bye bestie ๐Ÿ‘‹

Parameters

  • network โ€” the value can be either the ID of a network or a Network <#openstack.network.v2.network.Network> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the network doesn't exist. When set to True, no exception is set when attempting to delete a nonexistent network.
  • if_revision โ€” revision to put in the If-Match header of the update request, to perform a compare-and-swap update ๐ŸŽ€

Returns None


find_network(name_or_id, ignore_missing=True, **query)

Find one single network ๐Ÿฆ‹

Parameters

  • name_or_id โ€” the name or ID of a network.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. When set to True, None gets returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters passed into the underlying methods, like query filters.

Returns One Network <#openstack.network.v2.network.Network> or None โญ


get_network(network, *, fields=None)

Get a single network, periodt ๐Ÿ’…

Parameters

  • network โ€” the value can be the ID of a network or a Network <#openstack.network.v2.network.Network> instance.
  • fields โ€” limit the resource fields to fetch. lowkey so useful ๐Ÿ‘€

Returns One Network <#openstack.network.v2.network.Network>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found ๐Ÿ˜ญ


networks(**query)

Return a generator of networks ๐ŸŒˆ

Parameters query โ€” optional query parameters sent to limit the resources being returned. Available parameters include:

  • description: the network description.
  • ipv4_address_scope_id: the ID of the IPv4 address scope for the network.
  • ipv6_address_scope_id: the ID of the IPv6 address scope for the network.
  • is_admin_state_up: network administrative state
  • is_port_security_enabled: the port security status.
  • is_router_external: network is external or not.
  • is_shared: whether the network is shared across projects.
  • name: the name of the network.
  • status: network status
  • project_id: owner project ID
  • provider_network_type: network physical mechanism
  • provider_physical_network: physical network
  • provider_segmentation_id: VLAN ID for VLAN networks or Tunnel ID for GENEVE/GRE/VXLAN networks ๐Ÿงš

Returns A generator of network objects ๐Ÿ’œ


update_network(network, if_revision=None, **attrs)

Update a network โœจ

Parameters

  • network โ€” either the id of a network or an instance of type Network <#openstack.network.v2.network.Network>.
  • if_revision โ€” revision to put in the If-Match header of the update request, to perform a compare-and-swap update.
  • attrs โ€” the attributes to update on the network represented by network.

Returns The updated network ๐Ÿ”ฅ


find_network_ip_availability(name_or_id, ignore_missing=True, **query)

Find the IP availability of a network ๐Ÿ‘‘

Parameters

  • name_or_id โ€” the name or ID of a network.
  • ignore_missing โ€” bestie, when this is set to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised the moment the resource doesn't exist. Set it to True and you just get None back when it goes looking for something that isn't there. No drama, no exception. ๐Ÿซถ
  • query โ€” any extra params you wanna pass down into the underlying methods, like query filters and stuff.

๐Ÿ’ซ Returns

One NetworkIPAvailability <#openstack.network.v2.network_ip_availability.NetworkIPAvailability> or None.


โœจ get_network_ip_availability(network, *, fields=None)

Get the IP availability of a network. Iconic little lookup tbh.

Parameters

  • network โ€” this can be the ID of a network or a Network <#openstack.network.v2.network.Network> instance. Either one slays.
  • fields โ€” limit the resource fields you actually fetch. Keep it lean, queen. ๐Ÿ’…

Returns

One NetworkIPAvailability <#openstack.network.v2.network_ip_availability.NetworkIPAvailability>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


โœจ network_ip_availabilities(**query)

Returns a generator of network ip availabilities. A whole generator, not just one โ€” we're feasting. ๐Ÿ“

Parameters

query โ€”

Optional query parameters you can send to limit which resources come back. The available ones include:

  • ip_version: the IP version of the network
  • network_id: ID of the network to use when listening for network IP availability
  • network_name: the name of the network for that particular network IP availability
  • project_id: the owner project ID

Returns

A generator of network ip availability objects: NetworkIPAvailability <#openstack.network.v2.network_ip_availability.NetworkIPAvailability>.


๐ŸŽ€ Port Operations ๐ŸŽ€

Okay so this whole section is just the proxy class again, same energy, different day:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

โœจ create_port(**attrs)

Create a shiny new port from attributes. New port, who dis. ๐Ÿฆ‹

Parameters

  • attrs โ€” keyword arguments used to create a Port <#openstack.network.v2.port.Port>, made up of the properties on the Port class.

Returns

The results of port creation. ๐ŸŽ€


โœจ create_ports(data)

Create a bunch of ports from a list of attributes. Batch mode, we love efficiency.

Parameters

  • data โ€” list of dicts of attributes that'll be used to create a Port <#openstack.network.v2.port.Port>, made up of the properties on the Port class.

Returns

A generator of port objects.


โœจ delete_port(port, ignore_missing=True, if_revision=None)

Delete a port. Bye bestie, you will not be missed (jk ily). ๐Ÿ’€

Parameters

  • port โ€” the value can be either the ID of a port or a Port <#openstack.network.v2.port.Port> instance.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised if the port doesn't exist. When set to True, no exception gets set when you try to delete a port that isn't there. Cozy deletion. ๐Ÿซถ
  • if_revision โ€” the revision to put in the If-Match header of the update request, so it does a compare-and-swap update. Fancy.

Returns

None. That's it, that's the whole return.


โœจ find_port(name_or_id, ignore_missing=True, **query)

Find one single port. Just one. The main character port. ๐Ÿ‘‘

Parameters

  • name_or_id โ€” the name or ID of a port.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised if the resource doesn't exist. When set to True, None will be returned when you try to find a nonexistent resource. Soft launch failure. ๐Ÿ™ˆ
  • query โ€” any additional parameters passed into the underlying methods, like query filters and such.

Returns

One Port <#openstack.network.v2.port.Port> or None.


โœจ get_port(port, *, fields=None)

Get a single port. Grabbing exactly what you asked for.

Parameters

  • port โ€” the value can be the ID of a port or a Port <#openstack.network.v2.port.Port> instance.
  • fields โ€” limit the resource fields to fetch. Minimalism era. โœจ

Returns

One Port <#openstack.network.v2.port.Port>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


โœจ ports(**query)

Return a generator of ports. So many ports, so little time. ๐ŸŒŠ

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned. Available parameters include:

  • description: the port description.
  • device_id: port device ID.
  • device_owner: port device owner (e.g. network:dhcp).
  • ip_address: IP addresses of an allowed address pair.
  • is_admin_state_up: the administrative state of the port.
  • is_port_security_enabled: the port security status.
  • mac_address: port MAC address.
  • name: the port name.
  • network_id: ID of the network that owns the ports.
  • project_id: the ID of the project who owns the network.
  • status: the port status. The value is ACTIVE or DOWN.
  • subnet_id: the ID of the subnet.

Returns

A generator of port objects. ๐ŸŽ€


โœจ update_port(port, if_revision=None, **attrs)

Update a port. Glow-up time. ๐Ÿ’…

Parameters

  • port โ€” either the ID of a port or a Port <#openstack.network.v2.port.Port> instance.
  • if_revision โ€” the revision to put in the If-Match header of the update request, so it performs a compare-and-swap update.
  • attrs โ€” the attributes to update on the port represented by port.

Returns

The updated port. ๐Ÿ”ฅ


๐ŸŒˆ Router Operations ๐ŸŒˆ

And once again, our beloved proxy class, appearing like it pays rent here:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

โœจ create_router(**attrs)

Create a new router from attributes. Build-a-router workshop. ๐Ÿงš

Parameters

  • attrs โ€” keyword arguments used to create a Router <#openstack.network.v2.router.Router>, made up of the properties on the Router class.

Returns

The results of router creation. ๐Ÿ‘‘


โœจ delete_router(router, ignore_missing=True, if_revision=None)

Delete a router. Sorry to this route. ๐Ÿ˜ญ

Parameters

  • router โ€” the value can be either the ID of a router or a Router <#openstack.network.v2.router.Router> instance.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the router doesn't exist. When set to True, no exception is set when you try to delete a nonexistent router. Peaceful exits only. โœจ
  • if_revision โ€” the revision to put in the If-Match header of the update request, to perform a compare-and-swap update.

Returns

None.


โœจ find_router(name_or_id, ignore_missing=True, **query)

Find a single router.

Parameters

  • name_or_id โ€” the name or ID of a router.
  • ignore_missing โ€” ngl this one is a whole mood. Set it to False and the SDK will straight-up raise NotFoundException <#openstack.exceptions.NotFoundException> if the resource isn't there. Set it to True and you just get None back when you go looking for something that doesn't exist. no drama, no crash ๐Ÿ’…
  • query โ€” any extra params you wanna pass down into the underlying methods, like query filters and stuff.

Returns One Router <#openstack.network.v2.router.Router> or None

โœจ get_router(router, *, fields=None)

Get a single router โ€” just the one, main character energy ๐Ÿ‘‘

Parameters

  • router โ€” the value can be the ID of a router or a Router <#openstack.network.v2.router.Router> instance. either way works, we're flexible like that ๐Ÿซถ
  • fields โ€” limit the resource fields to fetch. keep it light, bestie.

Returns One Router <#openstack.network.v2.router.Router>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. yeah. it'll let you know. loudly. ๐Ÿ˜ญ

๐Ÿฆ‹ routers(**query)

Return a generator of routers โ€” like a whole little router parade, one at a time โœจ

Parameters

query โ€” optional query parameters to be sent to limit the resources being returned. Valid parameters are:

  • description: The description of a router.
  • flavor_id: The ID of the flavor.
  • is_admin_state_up: Router administrative state is up or not
  • is_distributed: The distributed state of a router
  • is_ha: The highly-available state of a router
  • name: Router name
  • project_id: The ID of the project this router is associated with.
  • status: The status of the router.

Returns A generator of router objects

๐Ÿ’– update_router(router, if_revision=None, **attrs)

Update a router. glow-up time.

Parameters

  • router โ€” either the id of a router or a Router <#openstack.network.v2.router.Router> instance.
  • if_revision โ€” revision to put in If-Match header of update request to perform compare-and-swap update. yes it's doing the fancy concurrency thing, we love a careful queen ๐Ÿ”ฅ
  • attrs โ€” the attributes to update on the router represented by router.

Returns The updated router

๐ŸŽ€ add_interface_to_router(router, subnet=None, port=None, *, advertise_host=False)

Add Interface to a router โ€” giving it a little connection, a little something ๐Ÿ’ซ

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • subnet โ€” the ID or a Subnet <#openstack.network.v2.subnet.Subnet> instance of the subnet to add.
  • port โ€” the ID or a Port <#openstack.network.v2.port.Port> instance of the port to add.
  • advertise_host โ€” whether to advertise the subnet's prefixes as host routes within the router's EVPN VNI.

Returns Router with updated interface

๐ŸŒธ remove_interface_from_router(router, subnet=None, port=None)

Remove Interface from a router โ€” breaking up, but make it clean ๐Ÿฅ€

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • subnet โ€” the ID or a Subnet <#openstack.network.v2.subnet.Subnet> instance of the subnet to remove.
  • port โ€” the ID or a Port <#openstack.network.v2.port.Port> instance of the port to remove.

Returns Router with updated interface

๐Ÿงš add_extra_routes_to_router(router, body)

Add extra routes to a router โ€” extra routes, extra vibes, no cap โœจ

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” the request body as documented in the api-ref. (yes, go read the api-ref, iykyk)

Returns Router with updated extra routes

๐Ÿ“ remove_extra_routes_from_router(router, body)

Remove extra routes from a router โ€” cleaning house, respectfully ๐Ÿงน

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” the request body as documented in the api-ref.

Returns Router with updated extra routes

๐Ÿ‘‘ add_gateway_to_router(router, **body)

Add Gateway to a router โ€” the router gets a door now, iconic behavior ๐Ÿšช

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” body with the gateway information

Returns Router with updated interface

๐Ÿ’œ remove_gateway_from_router(router, **body)

Remove Gateway from a router โ€” closing the door behind you, dramatic but valid ๐Ÿ’€

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” body with the gateway information

Returns Router with updated interface

๐ŸŒˆ add_external_gateways(router, body)

Add router external gateways โ€” plural. we're doing multiple gateways, we're thriving.

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” body containing the external_gateways parameter.

Returns Router with added gateways

โญ update_external_gateways(router, body)

Update router external gateways โ€” same gateways, new you โœจ

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” body containing the external_gateways parameter.

Returns Router with updated gateways

๐Ÿฆ‹ remove_external_gateways(router, body)

Remove router external gateways โ€” bye bestie, you were so real ๐Ÿซถ

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • body โ€” body containing the external_gateways parameter.

Returns Router without the removed gateways

๐ŸŽ€ create_conntrack_helper(router, **attrs)

Create a new L3 conntrack helper from attributes โ€” manifesting a conntrack helper into existence ๐Ÿ’ซ

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • attrs โ€” keyword arguments which will be used to create a ConntrackHelper, comprised of the properties on the ConntrackHelper class.

Returns The results of conntrack helper creation

๐Ÿ”ฅ conntrack_helpers(router, **query)

Return a generator of conntrack helpers โ€” a little conntrack helper assembly line ๐Ÿ‘‘

Parameters

  • router โ€” either the router ID or an instance of Router <#openstack.network.v2.router.Router>
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns A generator of conntrack helper objects ConntrackHelper

๐ŸŒธ get_conntrack_helper(conntrack_helper, router)

Get a single L3 conntrack helper โ€” singular. one. the chosen one ๐Ÿ’…

Parameters

  • conntrack_helper โ€” the value can be the ID of a L3 conntrack helper or a ConntrackHelper, instance.
  • router โ€” the value can be the ID of a Router or a Router <#openstack.network.v2.router.Router> instance.

Returns One ConntrackHelper

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

๐Ÿ’œ update_conntrack_helper(conntrack_helper, router, **attrs)

Update a L3 conntrack_helper โ€” new season, new helper arc โœจ

Parameters

  • conntrack_helper โ€” the value can be the ID of a L3 conntrack helper or a ConntrackHelper, instance.
  • router โ€” the value can be the ID of a Router or a Router <#openstack.network.v2.router.Router> instance.
  • attrs โ€” the attributes to update on the L3 conntrack helper represented by conntrack_helper.

Returns The updated conntrack helper

๐Ÿซถ delete_conntrack_helper(conntrack_helper, router, ignore_missing=True)

Delete a L3 conntrack_helper โ€” it's over, goodbye, and note that ignore_missing defaults to True right there in the signature ๐Ÿ‘€

Parameters

  • conntrack_helper โ€” the value can be the ID of a L3 conntrack helper or a ConntrackHelper, instance.
  • router โ€” the value can be the ID of a Router or a Router <#openstack.network.v2.router.Router> instance.
  • ignore_missing โ€” ok so when this is False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the floating ip doesn't exist. When it's True? No exception, no drama, we just move on when you try to delete a nonexistent ip. ๐Ÿ’…

Returns Nothing bestie, None.


๐ŸŒธ Floating IP Operations ๐ŸŒธ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

โœจ create_ip(**attrs)

Make a brand new floating ip out of attributes. Chef's kiss, we love a fresh resource. ๐ŸŽ€

Parameters

  • attrs โ€” these are keyword arguments used to create a FloatingIP <#openstack.network.v2.floating_ip.FloatingIP>, and they're made up of the properties on the FloatingIP class. That's it, that's the vibe.

Returns The results of floating ip creation ๐Ÿ’–

โœจ delete_ip(floating_ip, ignore_missing=True, if_revision=None)

Yeet a floating ip. ๐Ÿ—‘๏ธ

Parameters

  • floating_ip โ€” can be either the ID of a floating ip or a FloatingIP <#openstack.network.v2.floating_ip.FloatingIP> instance. Either way works, pick your fighter.
  • ignore_missing โ€” set to False and a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the floating ip doesn't exist. Set it to True and no exception will be set when attempting to delete a nonexistent ip.
  • if_revision โ€” the revision to put in the If-Match header of the update request, so it performs a compare-and-swap update. Fancy, I know. ๐Ÿ‘‘

Returns None

โœจ find_available_ip()

Find an available IP. The hunt for a free one begins. ๐Ÿ”

Returns One FloatingIP <#openstack.network.v2.floating_ip.FloatingIP> or None

โœจ find_ip(name_or_id, ignore_missing=True, **query)

Find exactly one IP, no more no less.

Parameters

  • name_or_id โ€” the name or ID of an IP.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource doesn't exist. When set to True, None will be returned when attempting to find a nonexistent resource. Gentle. ๐Ÿซถ
  • query โ€” any additional parameters to be passed into underlying methods, like query filters.

Returns One FloatingIP <#openstack.network.v2.floating_ip.FloatingIP> or None

โœจ get_ip(floating_ip, *, fields=None)

Get a single floating ip. Just the one. Main character only. ๐Ÿ’…

Parameters

  • floating_ip โ€” the value can be the ID of a floating ip or a FloatingIP <#openstack.network.v2.floating_ip.FloatingIP> instance.
  • fields โ€” limit the resource fields to fetch.

Returns One FloatingIP <#openstack.network.v2.floating_ip.FloatingIP>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

โœจ ips(**query)

Return a generator of ips. So many ips, so little time.

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned. The valid parameters are, and I quote:

  • description: The description of a floating IP.
  • fixed_ip_address: The fixed IP address associated with a floating IP address.
  • floating_ip_address: The IP address of a floating IP.
  • floating_network_id: The ID of the network associated with a floating IP.
  • port_id: The ID of the port to which a floating IP is associated.
  • project_id: The ID of the project a floating IP is associated with.
  • router_id: The ID of an associated router.
  • status: The status of a floating IP, which can be ACTIVE or DOWN.

Returns A generator of floating IP objects ๐ŸŒˆ

โœจ update_ip(floating_ip, if_revision=None, **attrs)

Update a ip. Glow-up time. โœจ

Parameters

  • floating_ip โ€” either the id of a ip or a FloatingIP <#openstack.network.v2.floating_ip.FloatingIP> instance.
  • if_revision โ€” the revision to put in the If-Match header of the update request, so it performs a compare-and-swap update.
  • attrs โ€” the attributes to update on the ip represented by value.

Returns The updated ip ๐Ÿ’–


๐Ÿฆ‹ Pool Operations ๐Ÿฆ‹

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿ’œ create_pool(**attrs)

Create a new pool from attributes. Pool party, everyone's invited. ๐ŸŠ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Pool <#openstack.network.v2.pool.Pool>, comprised of the properties on the Pool class.

Returns The results of pool creation ๐ŸŽ€

๐Ÿ’œ delete_pool(pool, ignore_missing=True)

Delete a pool. Bye bestie. ๐Ÿ‘‹

Parameters

  • pool โ€” the value can be either the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the pool doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent pool. Lowkey the nicest default.

Returns None

๐Ÿ’œ find_pool(name_or_id, ignore_missing=True, **query)

Find a single pool. One pool. The pool. ๐Ÿ’…

Parameters

  • name_or_id โ€” the name or ID of a pool.
  • ignore_missing โ€” when set to False, a NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource doesn't exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods, such as query filters.

Returns One Pool <#openstack.network.v2.pool.Pool> or None

๐Ÿ’œ get_pool(pool, *, fields=None)

Get a single pool. โœจ

Parameters

  • pool โ€” the value can be the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance.
  • fields โ€” limit the resource fields to fetch.

Returns One Pool <#openstack.network.v2.pool.Pool>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ’€

๐Ÿ’œ pools(**query)

Return a generator of pools. Pool girl summer. ๐ŸŒŠ

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned. The valid parameters are:

  • description: The description for the pool.
  • is_admin_state_up: The administrative state of the pool.
  • lb_algorithm: The load-balancer algorithm used, which is one of round-robin, least-connections and so on.
  • name: The name of the node pool.
  • project_id: The ID of the project the pool is associated with.
  • protocol: The protocol used by the pool, which is one of TCP, HTTP or HTTPS.
  • provider: The name of the provider of the load balancer service.
  • subnet_id: The subnet on which the members of the pool are located.
  • virtual_ip_id: The ID of the virtual IP used.

Returns A generator of pool objects ๐ŸŒธ

๐Ÿ’œ update_pool(pool, **attrs)

Update a pool. Fresh fit, same pool. ๐Ÿ”ฅ

Parameters

  • pool โ€” either the id of a pool, or a whole Pool <#openstack.network.v2.pool.Pool> instance, your call bestie.
    • attrs โ€” the attributes you wanna update on the pool that pool points at.

Returns โ€” the updated pool โœจ

create_pool_member(pool, **attrs)

Create a brand-new pool member out of attributes, slay.

Parameters

  • pool โ€” the pool can be either the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance that the member is gonna be created in.
  • attrs โ€” keyword arguments that get used to create a PoolMember <#openstack.network.v2.pool_member.PoolMember>, made up of the properties on the PoolMember class.

Returns โ€” the results of pool member creation ๐Ÿ’–

delete_pool_member(pool_member, pool, ignore_missing=True)

Delete a pool member, bye bestie ๐Ÿ‘‹

Parameters

  • pool_member โ€” the member can be either the ID of a pool member or a PoolMember <#openstack.network.v2.pool_member.PoolMember> instance.
  • pool โ€” the pool can be either the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance that the member belongs to.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the pool member doesn't exist. When it's set to True, no exception gets set when you try to delete a nonexistent pool member.

Returns โ€” None

find_pool_member(name_or_id, pool, ignore_missing=True, **query)

Find one single pool member, like a little scavenger hunt ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a pool member.
  • pool โ€” the pool can be either the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance that the member belongs to.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. When it's set to True, None gets returned when you try to find a nonexistent resource.
  • query โ€” any extra parameters to be passed into the underlying methods, like query filters, iykyk.

Returns โ€” one PoolMember <#openstack.network.v2.pool_member.PoolMember> or None

get_pool_member(pool_member, pool, *, fields=None)

Get a single pool member, periodt.

Parameters

  • pool_member โ€” the member can be the ID of a pool member or a PoolMember <#openstack.network.v2.pool_member.PoolMember> instance.
  • pool โ€” the pool can be either the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance that the member belongs to.
  • fields โ€” limit the resource fields you fetch.

Returns โ€” one PoolMember <#openstack.network.v2.pool_member.PoolMember>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

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 <#openstack.network.v2.pool.Pool> instance that the member belongs to.
  • query โ€” Optional query parameters to be sent to limit the resources being returned. Valid parameters are:
    • address: the IP address of the pool member.
    • is_admin_state_up: the administrative state of the pool member.
    • name: name of the pool member.
    • project_id: the ID of the project this pool member is associated with.
    • protocol_port: the port on which the application is hosted.
    • subnet_id: subnet ID in which to access this pool member.
    • weight: a positive integer value that indicates the relative portion of traffic that this member should receive from the pool.

Returns โ€” a generator of pool member objects โœจ

update_pool_member(pool_member, pool, **attrs)

Update a pool member, glow-up time ๐Ÿ’…

Parameters

  • pool_member โ€” either the ID of a pool member or a PoolMember <#openstack.network.v2.pool_member.PoolMember> instance.
  • pool โ€” the pool can be either the ID of a pool or a Pool <#openstack.network.v2.pool.Pool> instance that the member belongs to.
  • attrs โ€” the attributes you wanna update on the pool member that pool_member points at.

Returns โ€” the updated pool member ๐Ÿ’–


๐Ÿฆ‹ Auto Allocated Topology Operations ๐Ÿฆ‹

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_auto_allocated_topology(project=None)

Get the auto-allocated topology of a given project, iconic behavior ngl.

Parameters

  • project โ€” the value is the ID or name of a project.

Returns โ€” the auto-allocated topology ๐ŸŒˆ

delete_auto_allocated_topology(project=None, ignore_missing=False)

Delete auto-allocated topology. Gone, bye ๐Ÿ‘‘<

Parameters

  • project โ€” the value is the ID or name of a project.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the topology doesn't exist. When it's set to True, no exception gets raised when you try to delete nonexistant topology.

Returns โ€” None

validate_auto_allocated_topology(project=None)

Validate the resources for auto allocation, a little vibe check basically โญ

Parameters

  • project โ€” the value is the ID or name of a project.

Returns โ€” whether all resources are correctly configured or not


๐ŸŒธ Default Security Group Rules Operations ๐ŸŒธ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_default_security_group_rule(**attrs)

Create a new default security group rule from attributes, no cap ๐Ÿงš

Parameters

  • attrs โ€” keyword arguments that get used to create a DefaultSecurityGroupRule, made up of the properties on the DefaultSecurityGroupRule class.

Returns โ€” the results of default security group rule creation ๐Ÿ’œ

delete_default_security_group_rule(default_security_group_rule, ignore_missing=True)

Delete a default security group rule.

Parameters

  • default_security_group_rule โ€” the value can be either the ID of a default security group rule or a DefaultSecurityGroupRule instance.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the defaul security group rule doesn't exist. When it's set to True, no exception gets set when you try to delete a nonexistent default security group rule.

Returns โ€” None

find_default_security_group_rule(name_or_id, ignore_missing=True, **query)

Find a single default security group rule ๐Ÿซถ

Parameters

  • name_or_id โ€” the ID of a default security group rule.
  • ignore_missing โ€” so when you set this to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised the moment the resource doesn't exist. But set it to True and you just get None back when you try to find something that isn't there. Soft launch, no drama ๐Ÿ’…
  • query โ€” any extra params that get passed down into the underlying methods, like query filters and stuff.

Returns

One DefaultSecurityGroupRule or None

get_default_security_group_rule(default_security_group_rule, *, fields=None)

Get one single default security group rule ๐ŸŽ€

Parameters

  • default_security_group_rule โ€” the value can be the ID of a default security group rule, or a whole DefaultSecurityGroupRule instance.
  • fields โ€” limits which resource fields get fetched.

Returns

DefaultSecurityGroupRule

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

default_security_group_rules(**query)

Returns a generator of default security group rules โœจ

Parameters

query โ€”

optional query params you send to limit the resources coming back. Available parameters include:

  • description: the default security group rule description
  • direction: default security group rule direction
  • ether_type: must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rule.
  • protocol: default security group rule protocol
  • remote_group_id: ID of a remote security group

Returns

A generator of default security group rule objects DefaultSecurityGroupRule


๐Ÿ” Security Group Operations

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_security_group(**attrs)

Creates a brand new security group out of attributes ๐Ÿซถ

Parameters

attrs โ€” keyword arguments that'll be used to create a SecurityGroup <#openstack.network.v2.security_group.SecurityGroup>, made up of the properties on the SecurityGroup class.

Returns

The results of security group creation

delete_security_group(security_group, ignore_missing=True, if_revision=None)

Deletes a security group โœ‚๏ธ

Parameters

  • security_group โ€” the value can be either the ID of a security group or a SecurityGroup <#openstack.network.v2.security_group.SecurityGroup> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the security group doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent security group.
  • if_revision โ€” revision to put in the If-Match header of the update request, to perform a compare-and-swap update.

Returns

None

find_security_group(name_or_id, ignore_missing=True, **query)

Finds one single security group ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a security group.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. When set to True, None gets returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters passed into the underlying methods, such as query filters.

Returns

One SecurityGroup <#openstack.network.v2.security_group.SecurityGroup> or None

get_security_group(security_group, *, fields=None)

Gets one single security group, no cap ๐Ÿ’–

Parameters

  • security_group โ€” the value can be the ID of a security group or a SecurityGroup <#openstack.network.v2.security_group.SecurityGroup> instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One SecurityGroup <#openstack.network.v2.security_group.SecurityGroup>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

security_groups(**query)

Returns a generator of security groups ๐ŸŒˆ

Parameters

query โ€”

optional query parameters sent to limit the resources being returned. Valid parameters are:

  • description: security group description
  • รฌd: the id of a security group, or list of security group ids
  • name: the name of a security group
  • project_id: the ID of the project this security group is associated with.

Returns

A generator of security group objects

update_security_group(security_group, if_revision=None, **attrs)

Updates a security group ๐ŸŒธ

Parameters

  • security_group โ€” either the id of a security group or a SecurityGroup <#openstack.network.v2.security_group.SecurityGroup> instance.
  • if_revision โ€” revision to put in the If-Match header of the update request, to perform a compare-and-swap update.
  • attrs โ€” the attributes to update on the security group represented by security_group.

Returns

The updated security group

create_security_group_rule(**attrs)

Creates a new security group rule from attributes ๐ŸŽ€

Parameters

attrs โ€” keyword arguments used to create a SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule>, made up of the properties on the SecurityGroupRule class.

Returns

The results of security group rule creation

create_security_group_rules(data)

Creates a bunch of new security group rules from a list of attributes โœจ

Parameters

data โ€” list of dicts of attributes used to create a SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule>, made up of the properties on the SecurityGroupRule class.

Returns

A generator of security group rule objects

delete_security_group_rule(security_group_rule, ignore_missing=True, if_revision=None)

Deletes a security group rule ๐Ÿ’…

Parameters

  • security_group_rule โ€” the value can be either the ID of a security group rule or a SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the security group rule doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent security group rule.
  • if_revision โ€” revision to put in the If-Match header of the update request, to perform a compare-and-swap update.

Returns

None

find_security_group_rule(name_or_id, ignore_missing=True, **query)

Finds one single security group rule ๐Ÿ”Ž

Parameters

  • name_or_id โ€” the ID of a security group rule.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource doesn't exist. When set to True, None gets returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters passed into the underlying methods, such as query filters.

Returns

One SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule> or None

get_security_group_rule(security_group_rule, *, fields=None)

okay so this one grabs a single security group rule โ€” one rule, no extras, main-character energy ๐Ÿ‘‘โœจ

Parameters

  • security_group_rule โ€” the value can be the ID of a security group rule or a SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule> instance.
  • fields โ€” limit the resource fields to fetch.

Returns โ€” SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

security_group_rules(**query)

returns a generator of security group rules, like a little parade of them ๐ŸŽ€

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Available parameters include:
    • description: the security group rule description
    • direction: security group rule direction
    • ether_type: must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rule.
    • project_id: the ID of the project this security group rule is associated with.
    • protocol: security group rule protocol
    • remote_group_id: ID of a remote security group
    • security_group_id: ID of security group that owns the rules

Returns โ€” a generator of security group rule objects SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule>


๐ŸŽ€ Address Group Operations ๐ŸŽ€

same Proxy class, still serving network-resource looks ๐Ÿ’…

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_address_group(**attrs)

creates a new address group from attributes โ€” building it from the ground up, slay ๐Ÿงฑโœจ

Parameters

  • attrs โ€” keyword arguments which will be used to create a AddressGroup <#openstack.network.v2.address_group.AddressGroup>, comprised of the properties on the AddressGroup class.

Returns โ€” the results of address group creation

delete_address_group(address_group, ignore_missing=True)

deletes an address group. bye bestie ๐Ÿ‘‹๐Ÿ’€

Parameters

  • address_group โ€” the value can be either the ID of an address group or a AddressGroup <#openstack.network.v2.address_group.AddressGroup> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the address group does not exist. When set to True, no exception will be set when attempting to delete a nonexistent address group.

Returns โ€” None

find_address_group(name_or_id, ignore_missing=True, **query)

finds a single address group. lowkey a scavenger hunt ๐Ÿ”Ž๐Ÿฆ‹

Parameters

  • name_or_id โ€” the name or ID of an address group.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one AddressGroup <#openstack.network.v2.address_group.AddressGroup> or None

get_address_group(address_group, *, fields=None)

gets a single address group, no cap ๐Ÿซถ

Parameters

  • address_group โ€” the value can be the ID of an address group or a AddressGroup <#openstack.network.v2.address_group.AddressGroup> instance.
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one AddressGroup <#openstack.network.v2.address_group.AddressGroup>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

address_groups(**query)

returns a generator of address groups โ€” a whole lil lineup ๐ŸŒˆ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.
    • name: address group name
    • description: address group description
    • project_id: owner project ID

Returns โ€” a generator of address group objects

update_address_group(address_group, **attrs)

updates an address group. glow-up time โœจ๐Ÿ’…

Parameters

  • address_group โ€” either the ID of an address group or a AddressGroup <#openstack.network.v2.address_group.AddressGroup> instance.
  • attrs โ€” the attributes to update on the address group represented by value.

Returns โ€” the updated address group

add_addresses_to_address_group(address_group, addresses)

adds addresses to a address group โ€” more the merrier tbh ๐Ÿ“

Parameters

  • address_group โ€” either the ID of an address group or a AddressGroup <#openstack.network.v2.address_group.AddressGroup> instance.
  • addresses โ€” list of address strings.

Returns โ€” AddressGroup with updated addresses

remove_addresses_from_address_group(address_group, addresses)

removes addresses from a address group โ€” cleaning house, we love to see it ๐Ÿงน๐Ÿ’œ

Parameters

  • address_group โ€” either the ID of an address group or a AddressGroup <#openstack.network.v2.address_group.AddressGroup> instance.
  • addresses โ€” list of address strings.

Returns โ€” AddressGroup with updated addresses


๐ŸŒธ Availability Zone Operations ๐ŸŒธ

class openstack.network.v2._proxy.Proxy(...)

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

availability_zones(**query)

returns a generator of availability zones โ€” collecting them like friendship bracelets ๐Ÿฆ‹

Parameters

  • query โ€” optional query parameters to be set to limit the returned resources. Valid parameters include:
    • name: the name of an availability zone.
    • resource: the type of resource for the availability zone.

Returns โ€” a generator of availability zone objects AvailabilityZone <#openstack.network.v2.availability_zone.AvailabilityZone>


โญ Address Scope Operations โญ

same Proxy class, same long signature, still iconic ๐Ÿ˜Œ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_address_scope(**attrs)

creates a new address scope from attributes โ€” fresh scope, fresh vibes ๐Ÿ”ฅ

Parameters

  • attrs โ€” keyword arguments which will be used to create a AddressScope <#openstack.network.v2.address_scope.AddressScope>, comprised of the properties on the AddressScope class.

Returns โ€” the results of address scope creation

delete_address_scope(address_scope, ignore_missing=True)

deletes an address scope โ€” say bye to the scope ๐Ÿซถ

Parameters

  • address_scope โ€” the value can be either the ID of an address scope or a AddressScope <#openstack.network.v2.address_scope.AddressScope> instance.
  • ignore_missing โ€” when this is False, a NotFoundException (openstack.exceptions.NotFoundException) gets yeeted at you the second the address scope doesn't exist. When it's True, no exception gets set when you're out here attempting to delete a nonexistent address scope. Chill behavior fr.

Returns โ€” None. That's it, that's the whole return.


find_address_scope(name_or_id, ignore_missing=True, **query)

Find a single address scope. One (1) scope, identified, located, done. โœจ

Parameters

  • name_or_id โ€” the name or the ID of an address scope. Either one works, no cap.
  • ignore_missing โ€” set it to False and a NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. Set it to True and you just get None back when you go attempting to find a nonexistent resource. No drama, no stack trace.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters. ๐Ÿ‘€

Returns โ€” one AddressScope (openstack.network.v2.address_scope.AddressScope) or None.


get_address_scope(address_scope, *, fields=None)

Get a single address scope. The main character scope, retrieved. ๐Ÿ’…

Parameters

  • address_scope โ€” the value can be the ID of an address scope or an AddressScope (openstack.network.v2.address_scope.AddressScope) instance.
  • fields โ€” limit the resource fields to fetch. So you're not dragging the entire personality of the resource along with you.

Returns โ€” one AddressScope (openstack.network.v2.address_scope.AddressScope).

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. ๐Ÿ˜ญ


address_scopes(**query)

Return a generator of address scopes. Not a list, bestie โ€” a generator. It gives you scopes one at a time like a little snack dispenser. ๐Ÿ“

Parameters

query โ€” optional query parameters to be sent to limit the resources being returned:

  • name: Address scope name
  • ip_version: Address scope IP address version
  • project_id: Owner project ID
  • shared: Address scope is shared (boolean)

Returns โ€” a generator of address scope objects.


update_address_scope(address_scope, **attrs)

Update an address scope. Glow-up time. ๐Ÿ”ฅ

Parameters

  • address_scope โ€” either the ID of an address scope or an AddressScope (openstack.network.v2.address_scope.AddressScope) instance.
  • attrs โ€” the attributes to update on the address scope represented by value.

Returns โ€” the updated address scope. Look at her now. ๐Ÿ‘‘


๐ŸŒธ Quota Operations ๐ŸŒธ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Yes the signature is long long. That is the whole thing, character for character, do not come for me. ๐Ÿ’€


delete_quota(quota, ignore_missing=True)

Delete a quota (i.e. reset to the default quota). It's not gone-gone, it's back to factory settings. ๐ŸŽ€

Parameters

  • quota โ€” the value can be either the ID of a quota or a Quota (openstack.network.v2.quota.Quota) instance. The ID of a quota is the same as the project ID for the quota. That's just how it is, iykyk.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when quota does not exist. When set to True, no exception will be set when attempting to delete a nonexistent quota.

Returns โ€” None.


get_quota(quota, details=False)

Get a quota. ๐Ÿ’–

Parameters

  • quota โ€” the value can be the ID of a quota or a Quota (openstack.network.v2.quota.Quota) instance. The ID of a quota is the same as the project ID for the quota.
  • details โ€” if set to True, details about quota usage will be returned. Receipts! ๐Ÿ“‹

Returns โ€” one Quota (openstack.network.v2.quota.Quota).

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.


get_quota_default(quota)

Get a default quota. The blueprint version. The "before anyone touched it" version. โœจ

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 NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.


quotas(**query)

Return a generator of quotas. Again: generator energy, not list energy. ๐Ÿฆ‹

Parameters

query โ€” optional query parameters to be sent to limit the resources being returned. Currently no query parameter is supported. Yeah. Zero. None. Empty. ๐Ÿ™ˆ

Returns โ€” a generator of quota objects.


update_quota(quota, **attrs)

Update a quota. โœจ

Parameters

  • quota โ€” either the ID of a quota or a Quota (openstack.network.v2.quota.Quota) instance. The ID of a quota is the same as the project ID for the quota.
  • attrs โ€” the attributes to update on the quota represented by quota.

Returns โ€” the updated quota.


๐Ÿ’… QoS Operations ๐Ÿ’…

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Same absolute unit of a signature, second appearance. She's consistent. ๐ŸŒˆ


create_qos_bandwidth_limit_rule(qos_policy, **attrs)

Create a new bandwidth limit rule. New rule, freshly spawned, slay. ๐Ÿ”ฅ

Parameters

  • attrs โ€” keyword arguments which will be used to create a QoSBandwidthLimitRule (openstack.network.v2.qos_bandwidth_limit_rule.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 (openstack.network.v2.qos_policy.QoSPolicy) instance.

Returns โ€” the results of resource creation.


delete_qos_bandwidth_limit_rule(qos_rule, qos_policy, ignore_missing=True)

Delete a bandwidth limit rule. Bye bestie ๐Ÿ‘‹

Parameters

  • qos_rule โ€” the value can be either the ID of a bandwidth limit rule or a QoSBandwidthLimitRule (openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule) instance.
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, no exception will be set when attempting to delete a nonexistent bandwidth limit rule. Graceful exit, we love to see it.

Returns โ€” None.


find_qos_bandwidth_limit_rule(qos_rule_id, qos_policy, ignore_missing=True, **query)

Find a bandwidth limit rule. Go find her. ๐Ÿ”

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 (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. Vibes: gentle.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one QoSBandwidthLimitRule (openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule) or None.

get_qos_bandwidth_limit_rule(qos_rule, qos_policy)

okay so this one grabs you one single bandwidth limit rule. just the one. your fave. โœจ

Parameters

  • qos_rule โ€” the value can be the ID of a minimum bandwidth rule or a QoSBandwidthLimitRule instance (openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule). either way works bestie ๐Ÿซถ
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).

Returns

one QoSBandwidthLimitRule (openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule) ๐Ÿ’–

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. like, it's just not there. ๐Ÿ˜ญ

qos_bandwidth_limit_rules(qos_policy, **query)

return a generator of bandwidth limit rules โ€” not a list, a generator, the way that it lazily hands you rules one at a time is honestly iconic ๐ŸŒธ

Parameters

  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • query โ€” optional query parameters to be sent to limit the resources being returned. use them to filter, queen ๐Ÿ‘‘

Returns

a generator of bandwidth limit rule objects: QoSBandwidthLimitRule (openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule)

update_qos_bandwidth_limit_rule(qos_rule, qos_policy, **attrs)

update a bandwidth limit rule. glow-up time ๐Ÿ’…

Parameters

  • qos_rule โ€” either the id of a bandwidth limit rule or a QoSBandwidthLimitRule instance (openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule).
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • attrs โ€” the attributes to update on the bandwidth limit rule represented by qos_rule.

Returns

the updated minimum bandwidth rule. (yes, the original says minimum. not me inventing lore, that's literally what it says ๐Ÿ˜ญ)

create_qos_dscp_marking_rule(qos_policy, **attrs)

create a shiny new QoS DSCP marking rule โœจ

Parameters

  • attrs โ€” keyword arguments which will be used to create a QoSDSCPMarkingRule (openstack.network.v2.qos_dscp_marking_rule.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 to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).

Returns

the results of router creation. (again โ€” that's what the page says, fr fr. router. for a DSCP marking rule. we don't question the docs, we just report them ๐Ÿ™ˆ)

delete_qos_dscp_marking_rule(qos_rule, qos_policy, ignore_missing=True)

delete a QoS DSCP marking rule. bye bestie ๐Ÿ‘‹

Parameters

  • qos_rule โ€” the value can be either the ID of a minimum bandwidth rule or a QoSDSCPMarkingRule instance (openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule).
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. when set to True, no exception will be set when attempting to delete a nonexistent minimum bandwidth rule.

Returns

None

find_qos_dscp_marking_rule(qos_rule_id, qos_policy, ignore_missing=True, **query)

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 to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. when set to True, None will be returned when attempting to find a nonexistent resource. so like, no drama. chill. ๐Ÿงš
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns

one QoSDSCPMarkingRule (openstack.network.v2.qos_dscp_marking_rule.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 (openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule).
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).

Returns

one QoSDSCPMarkingRule (openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule)

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. truly tragic ๐Ÿ’€

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 to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

a generator of QoS DSCP marking rule objects: QoSDSCPMarkingRule (openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule)

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 (openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule).
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • attrs โ€” the attributes to update on the QoS DSCP marking rule represented by qos_rule.

Returns

the updated QoS DSCP marking rule ๐Ÿ’–

create_qos_minimum_bandwidth_rule(qos_policy, **attrs)

create a new minimum bandwidth rule. minimum queen energy ๐Ÿ‘‘ (the bare minimum is still a vibe)

Parameters

  • attrs โ€” keyword arguments which will be used to create a QoSMinimumBandwidthRule (openstack.network.v2.qos_minimum_bandwidth_rule.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 to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).

Returns

the results of resource creation ๐Ÿ”ฅ

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 (openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule).
  • qos_policy โ€” the value can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. when set to True, no exception will be set when attempting to delete a nonexistent minimum bandwidth rule.

Returns

None

find_qos_minimum_bandwidth_rule(qos_rule_id, qos_policy, ignore_missing=True, **query)

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 to, or a QoSPolicy instance (openstack.network.v2.qos_policy.QoSPolicy).
  • ignore_missing โ€” bestie, when this is False, a NotFoundException (openstack.exceptions.NotFoundException) gets raised the moment the resource doesn't exist. When it's True, you just get None back when you try to find something that's not there. No drama ๐Ÿ’…
  • query โ€” any extra parameters you wanna pass down into the underlying methods, like query filters. โœจ

Returns

One QoSMinimumBandwidthRule (openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule) or None. ๐ŸŽ€


get_qos_minimum_bandwidth_rule(qos_rule, qos_policy)

Get a single minimum bandwidth rule. One. Just the one. ๐Ÿฆ‹

Parameters

  • qos_rule โ€” can be the ID of a minimum bandwidth rule, or an actual QoSMinimumBandwidthRule (openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule) instance.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.

Returns

One QoSMinimumBandwidthRule (openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule). ๐Ÿ’–

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. Like, it's literally not there, babe ๐Ÿ˜ญ


qos_minimum_bandwidth_rules(qos_policy, **query)

Return a generator of minimum bandwidth rules. A whole generator, so many rules, we love a lazy iterator moment ๐Ÿ‘‘

Parameters

  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • query โ€” optional query parameters sent along to limit the resources being returned.

Returns

A generator of minimum bandwidth rule objects: QoSMinimumBandwidthRule (openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule). ๐ŸŒธ


update_qos_minimum_bandwidth_rule(qos_rule, qos_policy, **attrs)

Update a minimum bandwidth rule. Glow-up time โœจ

Parameters

  • qos_rule โ€” either the id of a minimum bandwidth rule, or a QoSMinimumBandwidthRule (openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule) instance.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • attrs โ€” the attributes to update on the minimum bandwidth rule represented by qos_rule.

Returns

The updated minimum bandwidth rule. Slay ๐Ÿ’…


create_qos_minimum_packet_rate_rule(qos_policy, **attrs)

Create a new minimum packet rate rule. New rule, new me ๐Ÿฆ‹

Parameters

  • attrs โ€” keyword arguments used to create a QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule), comprised of the properties on the QoSMinimumPacketRateRule class.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.

Returns

The results of resource creation. ๐ŸŽ€


delete_qos_minimum_packet_rate_rule(qos_rule, qos_policy, ignore_missing=True)

Delete a minimum packet rate rule. Bye bestie ๐Ÿ‘‹

Parameters

  • qos_rule โ€” can be either the ID of a minimum packet rate rule, or a QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule) instance.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • ignore_missing โ€” when set to False, a NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, no exception will be set when attempting to delete a nonexistent minimum packet rate rule. Lowkey forgiving, and we respect that ๐Ÿ™ˆ

Returns

None. That's it. That's the whole return. ๐Ÿ’€


find_qos_minimum_packet_rate_rule(qos_rule_id, qos_policy, ignore_missing=True, **query)

Find a minimum packet rate rule. Detective mode ๐Ÿ”

Parameters

  • qos_rule_id โ€” the ID of a minimum packet rate rule.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • ignore_missing โ€” when set to False, a NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods, such as query filters.

Returns

One QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule) or None. โœจ


get_qos_minimum_packet_rate_rule(qos_rule, qos_policy)

Get a single minimum packet rate rule. Singular. One single icon ๐Ÿ’–

Parameters

  • qos_rule โ€” can be the ID of a minimum packet rate rule, or a QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule) instance.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.

Returns

One QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule). ๐ŸŒˆ

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. Fr fr, if it's gone it's gone ๐Ÿ˜ญ


qos_minimum_packet_rate_rules(qos_policy, **query)

Return a generator of minimum packet rate rules. Generators are giving main character energy ngl ๐ŸŒŸ

Parameters

  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of minimum packet rate rule objects: QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule). ๐Ÿงš


update_qos_minimum_packet_rate_rule(qos_rule, qos_policy, **attrs)

Update a minimum packet rate rule. A little refresh, a little self-care ๐Ÿ’…

Parameters

  • qos_rule โ€” either the id of a minimum packet rate rule, or a QoSMinimumPacketRateRule (openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule) instance.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.
  • attrs โ€” the attributes to update on the minimum packet rate rule represented by qos_rule.

Returns

The updated minimum packet rate rule. Ate. ๐Ÿ‘‘


create_qos_packet_rate_limit_rule(qos_policy, **attrs)

Create a new packet rate limit rule. Brand new rule just dropped ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a QoSPacketRateLimitRule (openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule), comprised of the properties on the QoSPacketRateLimitRule class.
  • qos_policy โ€” can be the ID of the QoS policy that the rule belongs to, or a QoSPolicy (openstack.network.v2.qos_policy.QoSPolicy) instance.

Returns

The results of resource creation. ๐Ÿฆ‹


delete_qos_packet_rate_limit_rule(qos_rule, qos_policy, ignore_missing=True)

Delete a packet rate limit rule. Sayonara โœŒ๏ธ

Parameters

  • qos_rule โ€” can be either the ID of a packet rate limit rule, or a QoSPacketRateLimitRule (openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule) instance.
  • qos_policy โ€” bestie this one takes either the ID of the QoS policy that the rule belongs to, or an actual QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance, your call ๐Ÿ’…
  • ignore_missing โ€” okay so if you set this to False, a NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the resource does not exist. Set it to True and no exception will be set when attempting to delete a nonexistent minimum packet rate rule. no drama, no crash ๐Ÿ˜Œ

Returns: None

๐Ÿ”Ž find_qos_packet_rate_limit_rule(qos_rule_id, qos_policy, ignore_missing=True, **query)

Find a packet rate limit rule โœจ

Parameters

  • qos_rule_id โ€” The ID of a packet rate limit rule.
  • qos_policy โ€” The value can be the ID of the QoS policy that the rule belongs or a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns: One QoSPacketRateLimitRule <#openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule> or None

๐ŸŽฏ get_qos_packet_rate_limit_rule(qos_rule, qos_policy)

Get a single packet rate limit rule โ€” literally just the one, queen ๐Ÿ‘‘

Parameters

  • qos_rule โ€” The value can be the ID of a packet rate limit rule or a QoSPacketRateLimitRule <#openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule> instance.
  • qos_policy โ€” The value can be the ID of the QoS policy that the rule belongs or a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance.

Returns: One QoSPacketRateLimitRule <#openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ she's not there, bestie.

๐Ÿ”„ update_qos_packet_rate_limit_rule(qos_rule, qos_policy, **attrs)

Update a minimum packet rate rule โ€” glow-up time ๐ŸŒธ

Parameters

  • qos_rule โ€” Either the id of a minimum packet rate rule or a QoSPacketRateLimitRule <#openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule> instance.
  • qos_policy โ€” The value can be the ID of the QoS policy that the rule belongs or a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance.
  • attrs โ€” The attributes to update on the minimum packet rate rule represented by qos_rule.

Returns: The updated minimum packet rate rule

๐Ÿ’ซ create_qos_policy(**attrs)

Create a new QoS policy from attributes โ€” building her from scratch, iconic ๐ŸŽ€

Parameters

  • attrs โ€” Keyword arguments which will be used to create a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy>, comprised of the properties on the QoSPolicy class.

Returns: The results of QoS policy creation

๐Ÿ—‘๏ธ delete_qos_policy(qos_policy, ignore_missing=True)

Delete a QoS policy โ€” say bye bye ๐Ÿ‘‹

Parameters

  • qos_policy โ€” The value can be either the ID of a QoS policy or a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the QoS policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent QoS policy. (yes it really says "no exception will be set", we're quoting the vibes exactly, don't come for me ๐Ÿ™ˆ)

Returns: None

๐Ÿ•ต๏ธ find_qos_policy(name_or_id, ignore_missing=True, **query)

Find a single QoS policy โ€” detective mode fr fr ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of a QoS policy.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns: One QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> or None

๐Ÿ“ฅ get_qos_policy(qos_policy, *, fields=None)

Get a single QoS policy ๐Ÿ’–

Parameters

  • qos_policy โ€” The value can be the ID of a QoS policy or a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance.
  • fields โ€” Limit the resource fields to fetch.

Returns: One QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ค

๐ŸŒŠ qos_policies(**query)

Return a generator of QoS policies โ€” so many of them, a whole vibe ๐ŸŒˆ

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned. Valid parameters are:

  • description: The description of a QoS policy.
  • is_shared: Whether the policy is shared among projects.
  • name: The name of a QoS policy.
  • project_id: The ID of the project who owns the network.

Returns: A generator of QoS policy objects

โœ๏ธ update_qos_policy(qos_policy, **attrs)

Update a QoS policy โ€” she's evolving ๐Ÿ’…

Parameters

  • qos_policy โ€” Either the id of a QoS policy or a QoSPolicy <#openstack.network.v2.qos_policy.QoSPolicy> instance.
  • attrs โ€” The attributes to update on the QoS policy represented by qos_policy.

Returns: The updated QoS policy

๐Ÿงš find_qos_rule_type(rule_type_name, ignore_missing=True)

Find a single QoS rule type details โ€” the lore on one rule type ๐Ÿฆ‹

Parameters

  • rule_type_name โ€” The name of a QoS rule type.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns: One QoSRuleType <#openstack.network.v2.qos_rule_type.QoSRuleType> or None

๐Ÿ“– get_qos_rule_type(qos_rule_type, *, fields=None)

Get details about single QoS rule type โญ

Parameters

  • qos_rule_type โ€” The value can be the name of a QoS policy rule type or a QoSRuleType <#openstack.network.v2.qos_rule_type.QoSRuleType> instance.
  • fields โ€” Limit the resource fields to fetch.

Returns: One QoSRuleType <#openstack.network.v2.qos_rule_type.QoSRuleType>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ’€

๐ŸŽจ qos_rule_types(**query)

Return a generator of QoS rule types ๐Ÿ“

Parameters

query โ€”

Optional query parameters to be sent to limit the resources returned. Valid parameters include:

  • type: The type of the QoS rule type.

Returns: A generator of QoS rule type objects


๐Ÿ›ฐ๏ธ Agent Operations

okay so this next bit has a big ol' constructor signature and bestie I need you to just breathe โ€” you don't have to type this out, it's the proxy class showing you all its little settings ๐Ÿซถ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

๐Ÿค– agents(**query)

Return a generator of network agents โ€” all the little helpers, lowkey obsessed ๐Ÿ

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned.

  • agent_type: Agent type.
  • availability_zone: The availability zone for an agent.
  • binary โ€” the name of the agent's application binary. like, the executable itself ๐Ÿ–ฅ๏ธ
  • description โ€” the description of the agent. the lil blurb bestie ๐Ÿ“
  • host โ€” the host (host name or host address) the agent is running on ๐Ÿ 
  • topic โ€” the message queue topic used ๐Ÿ“จ
  • is_admin_state_up โ€” the administrative state of the agent ๐Ÿ‘‘
  • is_alive โ€” whether the agent is alive. vibe check ๐Ÿ’€

Returns: a generator of agents โœจ


delete_agent(agent, ignore_missing=True)

Delete a network agent ๐Ÿ—‘๏ธ

Parameters:

  • agent โ€” the value can be the ID of a agent or a Agent <#openstack.network.v2.agent.Agent> instance.
  • ignore_missing โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the agent does not exist. When set to True, no exception will be set when attempting to delete a nonexistent agent. (yes, "no exception will be set" โ€” that's the original wording, don't come for me ๐Ÿ˜ญ)

Returns: None


get_agent(agent, *, fields=None)

Get a single network agent ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters:

  • agent โ€” the value can be the ID of a agent or a Agent <#openstack.network.v2.agent.Agent> instance.
  • fields โ€” limit the resource fields to fetch. only grab what u asked for ๐Ÿ’…

Returns: one Agent <#openstack.network.v2.agent.Agent>

Raises NotFoundException <#openstack.exceptions.NotFoundException> 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 <#openstack.network.v2.agent.Agent> instance.
  • attrs โ€” the attributes to update on the agent represented by value.

Returns: one Agent <#openstack.network.v2.agent.Agent>


network_hosting_dhcp_agents(network, **query)

A generator of DHCP agents hosted on a network ๐ŸŒ

Parameters:

  • network โ€” the instance of Network <#openstack.network.v2.network.Network>
  • query โ€” optional query parameters to be sent to limit the resources returned.

Returns: a generator of hosted DHCP agents ๐ŸŽ€


routers_hosting_l3_agents(router, **query)

Return a generator of L3 agent hosting a router ๐Ÿ›ฐ๏ธ

Parameters:

  • router โ€” either the router id or an instance of Router <#openstack.network.v2.router.Router>
  • query โ€” optional query parameters to be sent to limit the resources returned

Returns: a generator of Router L3 Agents


agent_hosted_routers(agent, **query)

Return a generator of routers hosted by a L3 agent ๐Ÿ”ฅ

Parameters:

  • agent โ€” either the agent id of an instance of Agent
  • query โ€” optional query parameters to be sent to limit the resources returned

Returns: a generator of routers


add_router_to_agent(agent, router, *, ha_chassis_priority=None)

Add router to L3 agent โž•

Parameters:

  • agent โ€” either the id of an agent Agent <#openstack.network.v2.agent.Agent> instance
  • router โ€” a router instance
  • ha_chassis_priority โ€” optional HA_Chassis priority, that could be [0, 32767].

Returns: Agent with attached router ๐Ÿซถ


remove_router_from_agent(agent, router)

Remove router from L3 agent โž–

Parameters:

  • agent โ€” either the id of an agent or an Agent <#openstack.network.v2.agent.Agent> instance
  • router โ€” a router instance

Returns: Agent with removed router


๐ŸŽ€ RBAC Operations ๐ŸŽ€

Okay so this is the whole RBAC era of the network proxy, and yes the class signature is a MOOD, it's giving "we accept everything" energy:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_rbac_policy(**attrs)

Create a new RBAC policy from attributes โœจ

Parameters:

  • attrs โ€” keyword arguments which will be used to create a RBACPolicy <#openstack.network.v2.rbac_policy.RBACPolicy>, comprised of the properties on the RBACPolicy class.

Returns: the results of RBAC policy creation ๐Ÿ‘‘


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 <#openstack.network.v2.rbac_policy.RBACPolicy> instance.
  • ignore_missing โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the RBAC policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent RBAC policy.

Returns: None


find_rbac_policy(rbac_policy, ignore_missing=True, **query)

Find a single RBAC policy ๐Ÿ”

Parameters:

  • rbac_policy โ€” the ID of a RBAC policy.
  • ignore_missing โ€” when set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. (so chill of it tbh)
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns: one RBACPolicy <#openstack.network.v2.rbac_policy.RBACPolicy> or None


get_rbac_policy(rbac_policy, *, fields=None)

Get a single RBAC policy ๐Ÿ’–

Parameters:

  • rbac_policy โ€” the value can be the ID of a RBAC policy or a RBACPolicy <#openstack.network.v2.rbac_policy.RBACPolicy> instance.
  • fields โ€” limit the resource fields to fetch.

Returns: one RBACPolicy <#openstack.network.v2.rbac_policy.RBACPolicy>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


rbac_policies(**query)

Return a generator of RBAC policies ๐ŸŒˆ

Parameters:

  • query โ€” optional query parameters to be sent to limit the resources being returned. available parameters include:
    • action โ€” RBAC policy action
    • object_type โ€” type of the object that the RBAC policy affects
    • target_project_id โ€” ID of the project that the RBAC policy affects
    • project_id โ€” owner project ID

Returns: a generator of rbac objects


update_rbac_policy(rbac_policy, **attrs)

Update a RBAC policy ๐Ÿ”ง

Parameters:

  • rbac_policy โ€” either the id of a RBAC policy or a RBACPolicy <#openstack.network.v2.rbac_policy.RBACPolicy> instance.
  • attrs โ€” the attributes to update on the RBAC policy represented by rbac_policy.

Returns: the updated RBAC policy โœจ


๐Ÿ’… Listener Operations ๐Ÿ’…

And here's the listener era โ€” same proxy, same giant signature, no we're not retyping it differently bestie, it's literally identical:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_listener(**attrs)

Create a new listener from attributes ๐ŸŽง

Parameters:

  • attrs โ€” keyword arguments which will be used to create a Listener <#openstack.network.v2.listener.Listener>, comprised of the properties on the Listener class.

Returns: the results of listener creation ๐Ÿฆ‹


delete_listener(listener, ignore_missing=True)

Delete a listener ๐Ÿ—‘๏ธ

  • listener โ€” bestie, this is either the ID of a listner or a Listener instance (openstack.network.v2.listener.Listener), your call ๐Ÿ’…
  • ignore_missing โ€” set it to False and NotFoundException (openstack.exceptions.NotFoundException) gets thrown the moment the listner doesn't exist. Set it to True and nothing happens when you try to delete a listener that was never there. no drama, no exception ๐Ÿซถ

Returns None

โœจ find_listener(name_or_id, ignore_missing=True, **query) โœจ

Find a single listener ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a listener. that's it, that's the whole vibe.
  • ignore_missing โ€” False means NotFoundException (openstack.exceptions.NotFoundException) goes off when the resource doesn't exist. True means you just get None back when you go looking for a resource that isn't there. gentle rejection, honestly ๐Ÿ’”
  • query โ€” any extra params you wanna pass down into the underlying methods. like query filters and stuff โœจ

Returns One Listener (openstack.network.v2.listener.Listener) or None

๐ŸŒธ get_listener(listener) ๐ŸŒธ

Get a single listener, just the one, main character energy ๐Ÿ‘‘

Parameters listener โ€” the value can be the ID of a listener or a Listener (openstack.network.v2.listener.Listener) instance.

Returns One Listener (openstack.network.v2.listener.Listener)

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found. like, it's simply not there bestie ๐Ÿ˜ญ

๐Ÿฆ‹ listeners(**query) ๐Ÿฆ‹

Return a generator of listeners โ€” a whole lil stream of them, iconic ๐ŸŽ€

Parameters query โ€”

Optional query parameters you send to limit the resources being returned. Valid parameters are:

  • connection_limit: The maximum number of connections permitted for the load-balancer.
  • default_pool_id: The ID of the default pool.
  • default_tls_container_ref: A reference to a container of TLS secret.
  • description: The description of a listener.
  • is_admin_state_up: The administrative state of the listener.
  • name: The name of a listener.
  • project_id: The ID of the project associated with a listener.
  • protocol: The protocol of the listener.
  • protocol_port: Port the listener will listen to.

Returns A generator of listener objects

๐Ÿ’œ update_listener(listener, **attrs) ๐Ÿ’œ

Update a listener. glow-up time โœจ

Parameters

  • listener โ€” either the id of a listener or a Listener (openstack.network.v2.listener.Listener) instance.
  • attrs โ€” the attributes to update on the listener represented by listener.

Returns The updated listener


๐ŸŒˆ Subnet Operations ๐ŸŒˆ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

โญ create_subnet(**attrs) โญ

Create a new subnet from attributes. brand new subnet, freshly served ๐Ÿ“

Parameters attrs โ€” keyword arguments which will be used to create a Subnet (openstack.network.v2.subnet.Subnet), comprised of the properties on the Subnet class.

Returns The results of subnet creation

๐ŸŽ€ delete_subnet(subnet, ignore_missing=True, if_revision=None) ๐ŸŽ€

Delete a subnet. bye bestie ๐Ÿ‘‹

Parameters

  • subnet โ€” the value can be either the ID of a subnet or a Subnet (openstack.network.v2.subnet.Subnet) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the subnet does not exist. When set to True, no exception will be set when attempting to delete a nonexistent subnet. so chill.
  • if_revision โ€” revision to put in If-Match header of update request to perform compare-and-swap update.

Returns None

๐Ÿ”ฅ find_subnet(name_or_id, ignore_missing=True, **query) ๐Ÿ”ฅ

Find a single subnet

Parameters

  • name_or_id โ€” the name or ID of a subnet.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns One Subnet (openstack.network.v2.subnet.Subnet) or None

๐Ÿงš get_subnet(subnet, *, fields=None) ๐Ÿงš

Get a single subnet

Parameters

  • subnet โ€” the value can be the ID of a subnet or a Subnet (openstack.network.v2.subnet.Subnet) instance.
  • fields โ€” limit the resource fields to fetch. picky, and honestly? valid ๐Ÿ’…

Returns One Subnet (openstack.network.v2.subnet.Subnet)

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

๐ŸŒŸ subnets(**query) ๐ŸŒŸ

Return a generator of subnets

Parameters query โ€”

Optional query parameters to be sent to limit the resources being returned. Available parameters include:

  • cidr: Subnet CIDR
  • description: The subnet description
  • gateway_ip: Subnet gateway IP address
  • ip_version: Subnet IP address version
  • ipv6_address_mode: The IPv6 address mode
  • ipv6_ra_mode: The IPv6 router advertisement mode
  • is_dhcp_enabled: Subnet has DHCP enabled (boolean)
  • name: Subnet name
  • network_id: ID of network that owns the subnets
  • project_id: Owner project ID
  • subnet_pool_id: The subnet pool ID from which to obtain a CIDR.

Returns A generator of subnet objects

๐ŸŽ€ update_subnet(subnet, if_revision=None, **attrs) ๐ŸŽ€

Update a subnet

Parameters

  • subnet โ€” either the id of a subnet or a Subnet (openstack.network.v2.subnet.Subnet) instance.
  • if_revision โ€” revision to put in If-Match header of update request to perform compare-and-swap update.
  • attrs โ€” the attributes to update on the subnet represented by subnet.

Returns The updated subnet

๐Ÿ’– create_subnet_pool(**attrs) ๐Ÿ’–

Create a new subnet pool from attributes

Parameters attrs โ€” keyword arguments which will be used to create a SubnetPool (openstack.network.v2.subnet_pool.SubnetPool), comprised of the properties on the SubnetPool class.

Returns The results of subnet pool creation

๐Ÿฆ‹ 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 (openstack.network.v2.subnet_pool.SubnetPool) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the subnet pool does not exist. When set to True, no exception will be set when attempting to delete a nonexistent subnet pool.

Returns None

๐ŸŒธ find_subnet_pool(name_or_id, ignore_missing=True, **query) ๐ŸŒธ

Find a single subnet pool

Parameters

  • name_or_id โ€” the name or ID of a subnet pool.
  • ignore_missing โ€” when itโ€™s set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the resource doesnโ€™t exist. When itโ€™s True, you just get None back when the thing youโ€™re looking for isnโ€™t there. chill find behavior, no cap โœจ
  • query โ€” any extra parameters passed into the underlying methods. such as query filters. iykyk ๐Ÿซถ

Returns: One SubnetPool <#openstack.network.v2.subnet_pool.SubnetPool> or None

๐ŸŒธ get_subnet_pool(subnet_pool, *, fields=None)

Get a single subnet pool. one pool, coming right up ๐Ÿ’…

Parameters:

  • subnet_pool โ€” the value can be the ID of a subnet pool or a SubnetPool <#openstack.network.v2.subnet_pool.SubnetPool> instance.
  • fields โ€” limit the resource fields to fetch.

Returns: One SubnetPool <#openstack.network.v2.subnet_pool.SubnetPool>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. so if itโ€™s not there, it will absolutely let you know ๐Ÿ˜ญ

๐Ÿฆ‹ subnet_pools(**query)

Return a generator of subnet pools. generator girlie behavior ๐ŸŽ€

Parameters:

  • query โ€” optional query parameters to be sent to limit the resources being returned. Available parameters include:
    • address_scope_id: Subnet pool address scope ID
    • description: The subnet pool description
    • ip_version: The IP address family
    • is_default: Subnet pool is the default (boolean)
    • is_shared: Subnet pool is shared (boolean)
    • name: Subnet pool name
    • project_id: Owner project ID

Returns: A generator of subnet pool objects

๐Ÿ’œ update_subnet_pool(subnet_pool, **attrs)

Update a subnet pool. glow-up time โœจ

Parameters:

  • subnet_pool โ€” either the ID of a subnet pool or a SubnetPool <#openstack.network.v2.subnet_pool.SubnetPool> instance.
  • attrs โ€” the attributes to update on the subnet pool represented by subnet_pool.

Returns: The updated subnet pool


๐ŸŽ€ Load Balancer Operations ๐ŸŽ€

       class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

๐Ÿ‘‘ create_load_balancer(**attrs)

Create a new load balancer from attributes. main character resource creation ๐Ÿ’…

Parameters:

  • attrs โ€” keyword arguments which will be used to create a LoadBalancer <#openstack.network.v2.load_balancer.LoadBalancer>, comprised of the properties on the LoadBalancer class.

Returns: The results of load balancer creation

๐ŸŒˆ delete_load_balancer(load_balancer, ignore_missing=True)

Delete a load balancer. bye bestie ๐Ÿซถ

Parameters:

  • load_balancer โ€” the value can be the ID of a load balancer or a LoadBalancer <#openstack.network.v2.load_balancer.LoadBalancer> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the load balancer does not exist. When set to True, no exception will be set when attempting to delete a nonexistent load balancer.

Returns: None

โญ find_load_balancer(name_or_id, ignore_missing=True, **query)

Find a single load balancer. scavenger hunt but make it cloud ๐Ÿ”ฅ

Parameters:

  • name_or_id โ€” the name or ID of a load balancer.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns: One LoadBalancer <#openstack.network.v2.load_balancer.LoadBalancer> or None

๐Ÿ’– get_load_balancer(load_balancer)

Get a single load balancer. just the one, iconic ๐Ÿฆ‹

Parameters:

  • load_balancer โ€” the value can be the ID of a load balancer or a LoadBalancer <#openstack.network.v2.load_balancer.LoadBalancer> instance.

Returns: One LoadBalancer <#openstack.network.v2.load_balancer.LoadBalancer>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. no resource, no vibes ๐Ÿ’€

๐ŸŒธ load_balancers(**query)

Return a generator of load balancers. a whole little lineup โœจ

Parameters:

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns: A generator of load balancer objects

๐ŸŽ€ update_load_balancer(load_balancer, **attrs)

Update a load balancer. little refresh, little slay ๐Ÿ’…

Parameters:

  • load_balancer โ€” either the id of a load balancer or a LoadBalancer <#openstack.network.v2.load_balancer.LoadBalancer> instance.
  • attrs โ€” the attributes to update on the load balancer represented by load_balancer.

Returns: The updated load balancer


๐ŸŒธ Health Monitor Operations ๐ŸŒธ

       class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

๐Ÿซถ create_health_monitor(**attrs)

Create a new health monitor from attributes. keeping an eye on things, respectfully ๐Ÿ‘€

Parameters:

  • attrs โ€” keyword arguments which will be used to create a HealthMonitor <#openstack.network.v2.health_monitor.HealthMonitor>, comprised of the properties on the HealthMonitor class.

Returns: The results of health monitor creation

๐Ÿฆ‹ delete_health_monitor(health_monitor, ignore_missing=True)

Delete a health monitor. removing the watcher, dramatic but valid ๐Ÿ˜ญ

Parameters:

  • health_monitor โ€” the value can be either the ID of a health monitor or a HealthMonitor <#openstack.network.v2.health_monitor.HealthMonitor> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the health monitor does not exist. When set to True, no exception will be set when attempting to delete a nonexistent health monitor.

Returns: None

๐Ÿ’œ find_health_monitor(name_or_id, ignore_missing=True, **query)

Find a single health monitor. finding your fave monitor ๐Ÿ”

Parameters:

  • name_or_id โ€” the name or ID of a health monitor.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns: One HealthMonitor <#openstack.network.v2.health_monitor.HealthMonitor> or None

๐ŸŒˆ get_health_monitor(health_monitor)

Get a single health monitor. one monitor, fully fetched โœจ

Parameters:

  • health_monitor โ€” the value can be the ID of a health monitor or a HealthMonitor <#openstack.network.v2.health_monitor.HealthMonitor> instance.

Returns: One HealthMonitor <#openstack.network.v2.health_monitor.HealthMonitor>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. if itโ€™s missing, itโ€™s missing ๐Ÿ’€

โญ health_monitors(**query)

Return a generator of health monitors. monitor generator era ๐ŸŽ€

Parameters:

  • query โ€”

Optional query parameters to be sent to limit the resources being returned, bestie โ€” valid ones are:

  • delay โ€” the time in milliseconds between sending probes. โฑ๏ธ
  • expected_codes โ€” the expected HTTP codes for a pssing HTTP(S) monitor. ๐Ÿ’…
  • http_method โ€” the HTTP method a monitor uses for requests.
  • is_admin_state_up โ€” the administrative state of a health monitor.
  • max_retries โ€” the maximum consecutive health probe attempts.
  • project_id โ€” the ID of the project this health monitor is associated with.
  • timeout โ€” the maximum number of milliseconds for a monitor to wait for a connection to be established before it times out.
  • type โ€” the type of probe sent by the load balancer for health check, which can be PING, TCP, HTTP or HTTPS.
  • url_path โ€” the path portion of a URI that will be probed.

Returns โ€” a generator of health monitor objects. โœจ

update_health_monitor(health_monitor, **attrs)

Update a health monitor. ๐Ÿซถ

Parameters

  • health_monitor โ€” either the id of a health monitor or a HealthMonitor <#openstack.network.v2.health_monitor.HealthMonitor> instance.
  • attrs โ€” the attributes to update on the health monitor represented by value.

Returns โ€” the updated health monitor. ๐Ÿ’–


๐ŸŽ€ Metering Label Operations ๐ŸŽ€

Okay so this is the proxy class signature, and it is long โ€” do not panic, just copy/paste energy:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_metering_label(**attrs)

Create a new metering label from attributes. ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a MeteringLabel <#openstack.network.v2.metering_label.MeteringLabel>, comprised of the properties on the MeteringLabel class.

Returns โ€” the results of metering label creation. ๐ŸŒธ

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 <#openstack.network.v2.metering_label.MeteringLabel> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the metering label does not exist. When set to True, no exception will be set when attempting to delete a nonexistent metering label. ๐Ÿ˜ญ

Returns โ€” None.

find_metering_label(name_or_id, ignore_missing=True, **query)

Find a single metering label. ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a metering label.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one MeteringLabel <#openstack.network.v2.metering_label.MeteringLabel> or None. ๐Ÿ’œ

get_metering_label(metering_label, *, fields=None)

Get a single metering label. โœจ

Parameters

  • metering_label โ€” the value can be the ID of a metering label or a MeteringLabel <#openstack.network.v2.metering_label.MeteringLabel> instance.
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one MeteringLabel <#openstack.network.v2.metering_label.MeteringLabel>. ๐ŸŒˆ

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

metering_labels(**query)

Return a generator of metering labels. ๐Ÿฆ‹

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Valid parameters are:
    • description โ€” description of a metering label.
    • name โ€” name of a metering label.
    • is_shared โ€” boolean indicating whether a metering label is shared.
    • project_id โ€” the ID of the project a metering label is associated with.

Returns โ€” a generator of metering label objects. โญ

update_metering_label(metering_label, **attrs)

Update a metering label. ๐Ÿ’…

Parameters

  • metering_label โ€” either the id of a metering label or a MeteringLabel <#openstack.network.v2.metering_label.MeteringLabel> instance.
  • attrs โ€” the attributes to update on the metering label represented by metering_label.

Returns โ€” the updated metering label. ๐Ÿ’–

create_metering_label_rule(**attrs)

Create a new metering label rule from attributes. ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a MeteringLabelRule <#openstack.network.v2.metering_label_rule.MeteringLabelRule>, comprised of the properties on the MeteringLabelRule class.

Returns โ€” the results of metering label rule creation. ๐ŸŒธ

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 <#openstack.network.v2.metering_label_rule.MeteringLabelRule> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the metering label rule does not exist. When set to True, no exception will be set when attempting to delete a nonexistent metering label rule. ๐Ÿ˜ญ

Returns โ€” None.

find_metering_label_rule(name_or_id, ignore_missing=True, **query)

Find a single metering label rule. ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a metering label rule.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one MeteringLabelRule <#openstack.network.v2.metering_label_rule.MeteringLabelRule> or None. ๐Ÿ’œ

get_metering_label_rule(metering_label_rule, *, fields=None)

Get a single metering label rule. โœจ

Parameters

  • metering_label_rule โ€” the value can be the ID of a metering label rule or a MeteringLabelRule <#openstack.network.v2.metering_label_rule.MeteringLabelRule> instance.
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one MeteringLabelRule <#openstack.network.v2.metering_label_rule.MeteringLabelRule>. ๐ŸŒˆ

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

metering_label_rules(**query)

Return a generator of metering label rules. ๐Ÿฆ‹

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Valid parameters are:
    • direction โ€” the direction in which metering label rule is applied.
    • metering_label_id โ€” the ID of a metering label this rule is associated with.
    • project_id โ€” the ID of the project the metering label rule is associated with.

๐ŸŽ€ Segment Operations ๐ŸŽ€

Bestie, we're in segment territory now, and the proxy class is the exact same absolute unit as before โ€” like, literally identical signature, no cap, so imma paste it verbatim because I refuse to let a single character slip:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Okay so the segment methods themselves are these cuties ๐Ÿ‘‡


create_segment(**attrs)

Make a brand new segment out of attributes. Manifesting a segment rn โœจ

Parameters

  • attrs โ€” keyword arguments that get used to create a Segment <#openstack.network.v2.segment.Segment>, all made up of the properties on the Segment class.

Returns

The results of segment creation ๐ŸŒฑ


delete_segment(segment, ignore_missing=True)

Yeet a segment. Bye bestie ๐Ÿ’…

Parameters

  • segment โ€” the value can be either the ID of a segment or a Segment <#openstack.network.v2.segment.Segment> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the segment does not exist. When set to True, no exception will be set when attempting to delete a nonexistent segment.

Returns

None (the void, the emptiness, the peace ๐Ÿซถ)


find_segment(name_or_id, ignore_missing=True, **query)

Find one single segment. Detective mode activated ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a segment.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns

One Segment <#openstack.network.v2.segment.Segment> or None


get_segment(segment, *, fields=None)

Grab a single segment โ€” like, just the one, very demure ๐ŸŽ€

Parameters

  • segment โ€” the value can be the ID of a segment or a Segment <#openstack.network.v2.segment.Segment> instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One Segment <#openstack.network.v2.segment.Segment>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ


segments(**query)

Return a generator of segments โ€” an infinite scroll but make it networking ๐ŸŒ€

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned. Available parameters include:

  • description: the segment description
  • name: name of the segments
  • network_id: ID of the network that owns the segments
  • network_type: network type for the segments
  • physical_network: physical network name for the segments
  • segmentation_id: segmentation ID for the segments

Returns

A generator of segment objects


update_segment(segment, **attrs)

Update a segment. Glow-up arc, but for data ๐Ÿฆ‹

Parameters

  • segment โ€” either the id of a segment or a Segment <#openstack.network.v2.segment.Segment> instance.
  • attrs โ€” the attributes to update on the segment represented by segment.

Returns

The update segment (that's the original wording, do not @ me ๐Ÿ’€)


๐ŸŒˆ Flavor Operations ๐ŸŒˆ

And now for flavors โ€” no, not the eating kind, bestie, these are network service flavors. The proxy signature? Same iconic specimen, same energy:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_flavor(**attrs)

Create a new network service flavor from attributes. Chef's kiss ๐Ÿ‘จโ€๐Ÿณ๐Ÿ’‹

Parameters

  • attrs โ€” keyword arguments which will be used to create a Flavor <#openstack.network.v2.flavor.Flavor>, comprised of the properties on the Flavor class.

Returns

The results of flavor creation โœจ


delete_flavor(flavor, ignore_missing=True)

Delete a network service flavor. It's giving departure ๐Ÿ’”

Parameters

  • flavor โ€” the value can be either the ID of a flavor or a Flavor <#openstack.network.v2.flavor.Flavor> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the flavor does not exist. When set to True, no exception will be set when attempting to delete a nonexistent flavor.

Returns

None


find_flavor(name_or_id, ignore_missing=True, **query)

Find a single network service flavor. Highkey a scavenger hunt ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • name_or_id โ€” the name or ID of a flavor.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns

One Flavor <#openstack.network.v2.flavor.Flavor> or None


get_flavor(flavor, *, fields=None)

Get a single network service flavor. Just the one, thank you ๐Ÿ’…

Parameters

  • flavor โ€” the value can be the ID of a flavor or a Flavor <#openstack.network.v2.flavor.Flavor> instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One Flavor <#openstack.network.v2.flavor.Flavor>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ™ˆ


update_flavor(flavor, **attrs)

Update a network service flavor โ€” transformation era ๐Ÿ”ฅ

Parameters

  • flavor โ€” either the id of a flavor or a Flavor <#openstack.network.v2.flavor.Flavor> instance.
  • attrs โ€” the attributes to update on the flavor represented by flavor.

Returns

The updated flavor


flavors(**query)

Return a generator of network service flavors. Collect them all, Pokรฉmon style ๐Ÿ“

Parameters

query โ€”

Optional query parameters to be sent to limit the resources being returned. Valid parameters include:

  • description: the description of a flavor.
  • is_enabled: whether a flavor is enabled.
  • name: the name of a flavor.
  • service_type: the service type to which a falvor applies.
Okay so that last one says falvor in the source and I am keeping it, typo and all, because the docs said it and I don't make the rules. We love a quirky original ๐Ÿ’€๐Ÿ’–

Returns

A generator of flavor objects

๐Ÿ’– Service Profile Operations

okay so this chunk is all about service flavor profiles โ€” the matchmaking between flavors and service profiles, basically. The constructor is the same big Proxy signature every time, so here it is exactly:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

associate_flavor_with_service_profile(flavor, service_profile)

Associate network flavor with service profile. Bestie, this is the โ€œtheyโ€™re together nowโ€ method. โœจ

Parameters

  • flavor โ€” Either the id of a flavor or a Flavor <#openstack.network.v2.flavor.Flavor> instance.
  • service_profile โ€” The value can be either the ID of a service profile or a ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile> instance.

Returns โ€”

disassociate_flavor_from_service_profile(flavor, service_profile)

Disassociate network flavor from service profile. The โ€œwe need to talkโ€ method, lowkey. ๐Ÿ’”

Parameters

  • flavor โ€” Either the id of a flavor or a Flavor <#openstack.network.v2.flavor.Flavor> instance.
  • service_profile โ€” The value can be either the ID of a service profile or a ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile> instance.

Returns โ€”

create_service_profile(**attrs)

Create a new network service flavor profile from attributes. Itโ€™s giving โ€œmake a whole new profile from vibes and kwargs.โ€ ๐ŸŽ€

Parameters

  • attrs โ€” Keyword arguments which will be used to create a ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile>, comprised of the properties on the ServiceProfile class.

Returns โ€” The results of service profile creation

delete_service_profile(service_profile, ignore_missing=True)

Delete a network service flavor profile. Poof, gone, no cap. ๐Ÿซง

Parameters

  • service_profile โ€” The value can be either the ID of a service profile or a ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile> instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the service profile does not exist. When set to True, no exception will be set when attempting to delete a nonexistent service profile.

Returns โ€” None

find_service_profile(name_or_id, ignore_missing=True, **query)

Find a single network service flavor profile. Detective mode: on. ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of a service profile.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” One ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile> or None

get_service_profile(service_profile, *, fields=None)

Get a single network service flavor profile. This one pulls up the whole profile card. ๐Ÿ’…

Parameters

  • service_profile โ€” The value can be the ID of a service_profile or a ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile> instance.
  • fields โ€” Limit the resource fields to fetch.

Returns โ€” One ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

service_profiles(**query)

Return a generator of network service flavor profiles. Itโ€™s a whole scrollable feed of service profiles, fr fr. ๐ŸŒธ

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources returned. Available parameters inclue:
    • description: The description of the service flavor profile
    • driver: Provider driver for the service flavor profile
    • is_enabled: Whether the profile is enabled
    • project_id: The owner project ID

Returns โ€” A generator of service profile objects

update_service_profile(service_profile, **attrs)

Update a network flavor service profile. Glow-up time. โœจ

Parameters

  • service_profile โ€” Either the id of a service profile or a ServiceProfile <#openstack.network.v2.service_profile.ServiceProfile> instance.
  • attrs โ€” The attributes to update on the service profile represented by service_profile.

Returns โ€” The updated service profile


๐Ÿท๏ธ Tag Operations

Same Proxy constructor, same exact signature. Weโ€™re not retyping it in a different font, bestie โ€” here it is:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

set_tags(resource, tags)

Replace tags of a specified resource with specified tags. Out with the old tag vibes, in with the new. ๐ŸŽ€

Parameters

  • resource โ€” Resource <#openstack.resource.Resource> instance.
  • tags ("list") โ€” New tags to be set.

Returns โ€” The updated resource


๐Ÿฆ‹ VPNaaS Operations

Another Proxy constructor moment, same exact parameters. Iconic copy-paste behavior, honestly:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_vpn_endpoint_group(**attrs)

Create a new vpn endpoint group from attributes. New group, new VPN era. ๐Ÿ”ฅ

Parameters

  • attrs โ€” Keyword arguments which will be used to create a VpnEndpointGroup <#openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup>, comprised of the properties on the VpnEndpointGroup class.

Returns โ€” The results of vpn endpoint group creation.

delete_vpn_endpoint_group(vpn_endpoint_group, ignore_missing=True)

Delete a vpn service. (Yes, thatโ€™s the wording, bestie โ€” keep it exactly as it is. ๐Ÿ’€)

Parameters

  • vpn_endpoint_group โ€” The value can be either the ID of a vpn service or a VpnEndpointGroup <#openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup> instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the vpn service does not exist. When set to True, no exception will be set when attempting to delete a nonexistent vpn service.

Returns โ€” None

find_vpn_endpoint_group(name_or_id, ignore_missing=True, **query)

Find a single vpn service. Searching high and low. ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of a vpn service.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” One VpnEndpointGroup <#openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup> or None

get_vpn_endpoint_group(vpn_endpoint_group, *, fields=None)

Get a single vpn service. Pulling up the endpoint groupโ€™s whole profile. ๐Ÿ’…

Parameters

  • vpn_endpoint_group โ€” The value can be the ID of a vpn service or a VpnEndpointGroup <#openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup> instance.
  • fields โ€” limits which resource fields get fetched โœจ (yes, this is the tail of the previous one, we're rolling straight in, no awkward pause ๐Ÿซถ)

๐ŸŒธ vpn_endpoint_groups(**query)

Returns a generator of vpn services, bestie โ€” a whole stream of them, one at a time ๐Ÿ’ซ

Parameters

  • query โ€” optional query parameters that get sent along to limit the resources being returned.

Returns

A generator of vpn service objects โ€” VpnEndpointGroup (openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup) ๐Ÿ‘‘

๐Ÿฆ‹ update_vpn_endpoint_group(vpn_endpoint_group, **attrs)

Updates a vpn service. Glow-up time ๐Ÿ’…

Parameters

  • vpn_endpoint_group โ€” either the id of a vpn service or a VpnEndpointGroup (openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup) instance.
  • attrs โ€” the attributes to update on the VPN service represented by vpn_endpoint_group.

Returns

The updated vpnservice โœจ

๐ŸŽ€ create_vpn_ipsec_site_connection(**attrs)

Creates a brand new IPsec site connection from attributes. New connection just dropped ๐Ÿ“ฅ

Parameters

  • attrs โ€” keyword arguments which will be used to create a VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection), comprised of the properties on the IPSecSiteConnection class.

Returns

The results of IPsec site connection creation ๐ŸŒŸ

๐Ÿ’œ find_vpn_ipsec_site_connection(name_or_id, ignore_missing=True, **query)

Finds a single IPsec site connection. Scavenger hunt but make it cloud โ˜๏ธ

Parameters

  • name_or_id โ€” the name or ID of an IPsec site connection.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. (Default is True, iykyk ๐Ÿ’ซ)
  • query โ€” any additional parameters to be passed into underlying methods such as query filters.

Returns

One VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection) or None

๐Ÿงš get_vpn_ipsec_site_connection(ipsec_site_connection, *, fields=None)

Gets a single IPsec site connection. Just the one, thanks ๐Ÿซถ

Parameters

  • ipsec_site_connection โ€” the value can be the ID of an IPsec site connection or a VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection) instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection)

Raises

NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found ๐Ÿ˜ญ

๐ŸŒˆ vpn_ipsec_site_connections(**query)

Returns a generator of IPsec site connections โ€” the whole squad, delivered lazily ๐Ÿ’ซ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of IPsec site connection objects โ€” VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection)

๐Ÿ”ฅ update_vpn_ipsec_site_connection(ipsec_site_connection, **attrs)

Updates a IPsec site connection. It's giving main character energy โœจ

ipsec_site_connection

Either the id of an IPsec site connection or a VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection) instance.

Parameters

  • attrs โ€” the attributes to update on the IPsec site connection represented by ipsec_site_connection.

Returns

The updated IPsec site connection ๐Ÿ’…

๐Ÿ’€ delete_vpn_ipsec_site_connection(ipsec_site_connection, ignore_missing=True)

Deletes a IPsec site connection. Gone, gone, gone ๐Ÿซก

Parameters

  • ipsec_site_connection โ€” the value can be either the ID of an IPsec site connection, or a VpnIPSecSiteConnection (openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the IPsec site connection does not exist. When set to True, no exception will be set when attempting to delete a nonexistent IPsec site connection.

Returns

None

๐Ÿ“ create_vpn_ike_policy(**attrs)

Creates a new ike policy from attributes. Fresh policy, fresh vibes ๐Ÿ“

Parameters

  • attrs โ€” keyword arguments which will be used to create a VpnIkePolicy (openstack.network.v2.vpn_ike_policy.VpnIkePolicy), comprised of the properties on the VpnIkePolicy class.

Returns

The results of ike policy creation โœจ

๐ŸŒธ find_vpn_ike_policy(name_or_id, ignore_missing=True, **query)

Finds a single ike policy. Detective era ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • name_or_id โ€” the name or ID of an IKE policy.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods such as query filters.

Returns

One VpnIkePolicy (openstack.network.v2.vpn_ike_policy.VpnIkePolicy) or None.

๐Ÿฆ‹ get_vpn_ike_policy(ike_policy, *, fields=None)

Gets a single ike policy. One (1) policy, served fresh ๐ŸŽ€

Parameters

  • ike_policy โ€” the value can be the ID of an IKE policy or a VpnIkePolicy (openstack.network.v2.vpn_ike_policy.VpnIkePolicy) instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One VpnIkePolicy (openstack.network.v2.vpn_ike_policy.VpnIkePolicy)

Raises

NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found ๐Ÿ˜ญ

โญ vpn_ike_policies(**query)

Returns a generator of IKE policies โ€” plural, plentiful, powerful ๐Ÿ’ซ

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of ike policy objects

๐Ÿ‘‘ update_vpn_ike_policy(ike_policy, **attrs)

Updates an IKE policy. She's evolving ๐Ÿ’…

ike_policy

Either the ID of an IKE policy or a VpnIkePolicy (openstack.network.v2.vpn_ike_policy.VpnIkePolicy) instance.

Parameters

  • attrs โ€” the attributes to update on the ike policy represented by ike_policy.

Returns

The updated ike policy โœจ

๐Ÿ™ˆ delete_vpn_ike_policy(ike_policy, ignore_missing=True)

Deletes an IKE policy. Byeee, no notes ๐Ÿซถ

Parameters

  • ike_policy โ€” the value can be either the ID of an ike policy, or a VpnIkePolicy (openstack.network.v2.vpn_ike_policy.VpnIkePolicy) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the ike policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent ike policy.

Returns

None

๐Ÿงš create_vpn_ipsec_policy(**attrs)

Creates a new IPsec policy from attributes. Building it from scratch, obsessed ๐Ÿ”จ

Parameters

  • attrs โ€” keyword arguments which will be used to create a VpnIpsecPolicy (openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy), comprised of the properties on the VpnIpsecPolicy class.

Returns

The results of IPsec policy creation ๐ŸŒŸ

๐Ÿ’ซ find_vpn_ipsec_policy(name_or_id, ignore_missing=True, **query)

Finds a single IPsec policy. One singular icon ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of an IPsec policy.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any extra parameters you want passed down into the underlying methods, like query filters.

Returns โ€” one VpnIpsecPolicy (openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy) or None.

get_vpn_ipsec_policy(ipsec_policy, *, fields=None) โ€” grab a single IPsec policy, no cap.

Parameters

  • ipsec_policy โ€” this can be the ID of an IPcec policy or a VpnIpsecPolicy (openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy) instance. (yes bestie, the original really says IPcec โ€” we keep it exactly as-is ๐Ÿ’…)
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one VpnIpsecPolicy (openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy).

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

vpn_ipsec_policies(**query) โ€” return a generator of IPsec policies. Itโ€™s giving โ€œall the policies, please.โ€ โœจ

Parameters

  • query โ€” optional query parameters sent along to limit the resources being returned.

Returns โ€” a generator of IPsec policy objects.

update_vpn_ipsec_policy(ipsec_policy, **attrs) โ€” update an IPsec policy.

Ipsec_policy โ€” either the id of an IPsec policy or a VpnIpsecPolicy (openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy) instance.

Parameters

  • attrs โ€” the attributes to update on the IPsec policy represented by ipsec_policy.

Returns โ€” the updated IPsec policy.

delete_vpn_ipsec_policy(ipsec_policy, ignore_missing=True) โ€” delete an IPsec policy. Bye bestie ๐Ÿ‘‹

Parameters

  • ipsec_policy โ€” the value can be either the ID of an IPsec policy, or a VpnIpsecPolicy (openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the IPsec policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent IPsec policy.

Returns โ€” None.

create_vpn_service(**attrs) โ€” create a new vpn service from attributes. Main character creation energy ๐Ÿ”ฅ

Parameters

  • attrs โ€” keyword arguments which will be used to create a VpnService (openstack.network.v2.vpn_service.VpnService), comprised of the properties on the VpnService class.

Returns โ€” the results of vpn service creation.

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 (openstack.network.v2.vpn_service.VpnService) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the vpn service does not exist. When set to True, no exception will be set when attempting to delete a nonexistent vpn service.

Returns โ€” None.

find_vpn_service(name_or_id, ignore_missing=True, **query) โ€” find a single vpn service. Lowkey a scavenger hunt ๐Ÿ•ต๏ธโ€โ™€๏ธ

Parameters

  • name_or_id โ€” the name or ID of a vpn service.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one VpnService (openstack.network.v2.vpn_service.VpnService) or None.

get_vpn_service(vpn_service, *, fields=None) โ€” get a single vpn service.

Parameters

  • vpn_service โ€” the value can be the ID of a vpn service or a VpnService (openstack.network.v2.vpn_service.VpnService) instance.
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one VpnService (openstack.network.v2.vpn_service.VpnService).

Raises โ€” NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

vpn_services(**query) โ€” return a generator of vpn services.

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of vpn service objects.

update_vpn_service(vpn_service, **attrs) โ€” update a vpn service.

Parameters

  • vpn_service โ€” either the id of a vpn service or a VpnService (openstack.network.v2.vpn_service.VpnService) instance.
  • attrs โ€” the attributes to update on the VPN service represented by vpn_service.

Returns โ€” the updated vpnservice.


๐ŸŒธ Extension Operations

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

find_extension(name_or_id, ignore_missing=True, **query) โ€” find a single extension. Obsessed with finding things โœจ

Parameters

  • name_or_id โ€” the name or ID of an extension.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one Extension (openstack.network.v2.extension.Extension) or None.

extensions(**query) โ€” return a generator of extensions.

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned. Currently no parameter is supported.

Returns โ€” a generator of extension objects.


๐Ÿฆ‹ Service Provider Operations

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

service_providers(**query) โ€” return a generator of service providers. Itโ€™s giving โ€œprovider paradeโ€ ๐ŸŽ€

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of service provider objects.


๐ŸŒˆ Local IP Operations

class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_local_ip(**attrs) โ€” create a new local ip from attributes. Slay ๐Ÿ’…

Parameters

  • attrs โ€” keyword arguments which will be used to create a LocalIP (openstack.network.v2.local_ip.LocalIP), comprised of the properties on the LocalIP class.

Returns โ€” the results of local ip creation.

delete_local_ip(local_ip, ignore_missing=True, if_revision=None) โ€” delete a local ip.

Parameters

  • local_ip โ€” bestie this one's flexible: either the ID of a local ip or an actual LocalIP instance.
    • ignore_missing โ€” set it to False and you get a NotFoundException when the local ip doesn't exist, no cap. Set it to True and nothing blows up when you try to delete a nonexistent ip, it justโ€ฆ doesn't.
    • if_revision โ€” the revision that goes into the If-Match header of the update request, so you can do a compare-and-swap update. fancy โœจ

Returns

None โ€” that's it, that's the whole vibe.

find_local_ip(name_or_id, ignore_missing=True, **query)

Find a local IP ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of an local IP. (yes, "an local IP", we don't gatekeep grammar here ๐Ÿ’…)
  • ignore_missing โ€” False means a NotFoundException gets raised when the resource doesn't exist. True means you get None back when you try to find a nonexistent resource. choose your fighter.
  • query โ€” any extra params passed into the underlying methods, like query filters.

Returns

One LocalIP or None ๐Ÿซถ

get_local_ip(local_ip, *, fields=None)

Get a single local ip ๐Ÿ‘‘

Parameters

  • local_ip โ€” either the ID of a local ip or a LocalIP instance.
  • fields โ€” limit the resource fields you fetch. less is more, lowkey.

Returns

One LocalIP ๐Ÿ’–

Raises NotFoundException when no resource can be found. ๐Ÿ˜ญ

local_ips(**query)

Return a generator of local ips ๐ŸŒˆ

Parameters

query โ€” optional query parameters sent along to limit the resources being returned:

  • name: Local IP name
  • description: Local IP description
  • project_id: Owner project ID
  • network_id: Local IP network
  • local_port_id: Local port ID
  • local_ip_address: The IP address of a Local IP
  • ip_mode: The Local IP mode

Returns

A generator of local ip objects.

update_local_ip(local_ip, if_revision=None, **attrs)

Update a local ip โœจ

Parameters

  • local_ip โ€” either the id of a local ip or a LocalIP instance.
  • if_revision โ€” revision to put in the If-Match header of the update request, for that compare-and-swap update energy.
  • attrs โ€” the attributes to update on the ip represented by value.

Returns

The updated ip ๐Ÿ”ฅ

create_local_ip_association(local_ip, **attrs)

Create a new local ip association from attributes ๐ŸŽ€

Parameters

  • local_ip โ€” the value can be the ID of a Local IP or a LocalIP instance.
  • attrs โ€” keyword arguments used to create a LocalIPAssociation, comprised of the properties on the LocalIP class.

Returns

The results of local ip association creation. it's giving new resource ๐Ÿฆ‹

delete_local_ip_association(local_ip, fixed_port_id, ignore_missing=True, if_revision=None)

Delete a local ip association ๐Ÿ’€

Parameters

  • local_ip โ€” the value can be the ID of a Local IP or a LocalIP instance.
  • fixed_port_id โ€” either the fixed port ID or a LocalIPAssociation instance (the docs literally say :class:~openstack.network.v2.local_ip_association.LocalIPAssociation and we respect it).
  • ignore_missing โ€” set to False and a NotFoundException gets raised when the local ip association doesn't exist. set to True and no exception gets set when you attempt to delete a nonexistent ip.
  • if_revision โ€” revision to put in the If-Match header of the update request, for the compare-and-swap update.

Returns

None ๐Ÿ™ˆ

find_local_ip_association(name_or_id, local_ip, ignore_missing=True, **query)

Find a local ip association ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of local ip association. (two spaces in the original, iconic)
  • local_ip โ€” the ID of a Local IP or a LocalIP instance.
  • ignore_missing โ€” False raises NotFoundException when the resource doesn't exist. True returns None when you're hunting a nonexistent resource.
  • query โ€” any additional parameters passed into underlying methods, such as query filters.

Returns

One LocalIPAssociation or None. ๐Ÿ’–

get_local_ip_association(local_ip_association, local_ip, *, fields=None)

Get a single local ip association ๐Ÿ‘‘

Parameters

  • local_ip โ€” the ID of a Local IP or a LocalIP instance.
  • local_ip_association โ€” the ID of a local ip association or a LocalIPAssociation instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One LocalIPAssociation โœจ

Raises NotFoundException when no resource can be found. ๐Ÿ˜ญ

local_ip_associations(local_ip, **query)

Return a generator of local ip associations ๐ŸŒˆ

Parameters

  • local_ip โ€” the ID of a Local IP or a LocalIP instance.
  • query โ€” optional query parameters sent to limit the resources being returned:
    • fixed_port_id: The ID of the port to which a local IP is associated
    • fixed_ip: The fixed ip address associated with a a Local IP (the double "a a" is canon, we stan)
    • host: Host where local ip is associated

Returns

A generator of local ip association objects LocalIPAssociation. ๐Ÿซถ


๐ŸŒธ Ndp Proxy Operations ๐ŸŒธ

okay so this whole section is the proxy class, and it's a lot. here's the signature in full, exactly as it appears, do not come for me:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

like, look at all those kwargs. main character energy fr fr ๐Ÿ‘‘

create_ndp_proxy(**attrs)

Create a new ndp proxy from attributes ๐Ÿฆ‹

Parameters

  • attrs โ€” keyword arguments which will be used to create a NDPProxxy, comprised of the properties on the NDPProxy class. (yes, NDPProxxy with two x's โ€” that's what the page says, and we do not edit the source, bestie ๐Ÿ’…)

Returns

The results of ndp proxy creation. ๐Ÿ”ฅ

get_ndp_proxy(ndp_proxy, *, fields=None)

Get a single ndp proxy ๐Ÿ‘‘

Parameters

  • ndp_proxy โ€” the value can be the ID of a ndp proxy or a NDPProxy instance.
  • fields โ€” limit the resource fields to fetch.

Returns

One NDPProxy โœจ

Raises NotFoundException when no resource can be found. ๐Ÿ˜ญ

find_ndp_proxy(ndp_proxy_id, ignore_missing=True, **query)

Find a single ndp proxy ๐Ÿ”

Parameters

  • ndp_proxy_id โ€” the ID of a ndp proxy.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) gets raised if the resource doesnโ€™t exist. When itโ€™s True, you get None back when you try to find a nonexistent resource. Bestie, itโ€™s the chill setting ๐Ÿ’…
    • query โ€” any extra parameters passed into the underlying methods, like query filters.
    • Returns: One NDPProxy (openstack.network.v2.ndp_proxy.NDPProxy) or None
  • delete_ndp_proxy(ndp_proxy, ignore_missing=True) โ€” delete a ndp proxy โœจ
    • ndp_proxy โ€” the value can be the ID of a ndp proxy or an NDPProxy (openstack.network.v2.ndp_proxy.NDPProxy) instance.
    • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the router does not exist. When set to True, no exception will be set when attempting to delete a nonexistent ndp proxy.
    • Returns: None
  • ndp_proxies(**query) โ€” return a generator of ndp proxies ๐Ÿฆ‹
    • query โ€” optional query parameters sent to limit the resources being returned. Valid parameters are:
      • router_id โ€” the ID of the router
      • port_id โ€” the ID of internal port.
      • ip_address โ€” the internal IP address
    • Returns: A generator of port forwarding objects
  • update_ndp_proxy(ndp_proxy, **attrs) โ€” update a ndp proxy ๐ŸŽ€
    • ndp_proxy โ€” the value can be the ID of a ndp proxy or an NDPProxy (openstack.network.v2.ndp_proxy.NDPProxy) instance.
    • attrs โ€” the attributes to update on the ip represented by value.
    • Returns: The updated ndp_proxy

๐Ÿฆ‹ BGP Operations ๐Ÿฆ‹

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • create_bgp_peer(**attrs) โ€” create a new BGP Peer from attributes โœจ
  • delete_bgp_peer(peer, ignore_missing=True) โ€” delete a BGP Peer
  • find_bgp_peer(name_or_id, ignore_missing=True, **query) โ€” find a single BGP Peer
  • get_bgp_peer(peer) โ€” get a single BGP Peer
  • update_bgp_peer(peer, **attrs) โ€” update a BGP Peer
  • bgp_peers(**query) โ€” return a generator of BGP Peers
  • create_bgp_speaker(**attrs) โ€” create a new BGP Speaker ๐Ÿ’–
  • delete_bgp_speaker(speaker, ignore_missing=True) โ€” delete a BGP Speaker
  • find_bgp_speaker(name_or_id, ignore_missing=True, **query) โ€” find a single BGP Peer (yes, the source says Peer here, not Speaker โ€” not me, bestie ๐Ÿ™ˆ)
  • get_bgp_speaker(speaker) โ€” get a single BGP Speaker
  • update_bgp_speaker(speaker, **attrs) โ€” update a BGP Speaker
  • bgp_speakers(**query) โ€” return a generator of BGP Peers (source wording again ๐Ÿ‘€)
  • add_bgp_peer_to_speaker(speaker, peer) โ€” bind the BGP peer to the specified BGP Speaker.
  • remove_bgp_peer_from_speaker(speaker, peer) โ€” unbind the BGP peer from a BGP Speaker.
  • add_gateway_network_to_speaker(speaker, network) โ€” add a network to the specified BGP speaker.
  • remove_gateway_network_from_speaker(speaker, network) โ€” remove a network from the specified BGP speaker.
  • get_advertised_routes_of_speaker(speaker) โ€” list all routes advertised by the specified BGP Speaker.
  • get_bgp_dragents_hosting_speaker(speaker) โ€” list all BGP dynamic agents which are hosting the specified BGP Speaker.
  • add_bgp_speaker_to_dragent(bgp_agent, bgp_speaker) โ€” add a BGP Speaker to the specified dynamic routing agent.
  • get_bgp_speakers_hosted_by_dragent(bgp_agent) โ€” list all BGP Speakers hosted on the specified dynamic routing agent.
  • remove_bgp_speaker_from_dragent(bgp_agent, bgp_speaker) โ€” delete the BGP Speaker hosted by the specified dynamic routing agent.

๐ŸŒธ Tap As A Service Operations ๐ŸŒธ

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • create_tap_flow(**attrs) โ€” create a new Tap Flow from attributes โœจ
  • delete_tap_flow(tap_flow, ignore_missing=True) โ€” delete a Tap Flow
  • find_tap_flow(name_or_id, ignore_missing=True, **query) โ€” find a single Tap Service (source says Service for the flow finder, iconic ๐Ÿ’€)
  • get_tap_flow(tap_flow, *, fields=None) โ€” get a single Tap Flow ๐Ÿซถ
    • tap_flow โ€” the value can be the ID of a tap flow or a TapFlow (openstack.network.v2.tap_flow.TapFlow) instance.
    • fields โ€” limit the resource fields to fetch.
    • Returns: One TapFlow (openstack.network.v2.tap_flow.TapFlow)
    • Raises: NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.
  • update_tap_flow(tap_flow, **attrs) โ€” update a Tap Flow
  • tap_flows(**query) โ€” return a generator of Tap Flows
  • create_tap_service(**attrs) โ€” create a new Tap Service from attributes ๐Ÿ’–
  • delete_tap_service(tap_service, ignore_missing=True) โ€” delete a Tap Service
  • find_tap_service(name_or_id, ignore_missing=True, **query) โ€” find a single Tap Service
  • update_tap_service(tap_service, **attrs) โ€” update a Tap Service
  • tap_services(**query) โ€” return a generator of Tap Services

๐Ÿ’… BGPVPN operations ๐Ÿ’…

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • create_bgpvpn(**attrs) โ€” create a new BGPVPN ๐ŸŒˆ
    • attrs โ€” keyword arguments which will be used to create a BgpVpn (openstack.network.v2.bgpvpn.BgpVpn), comprised of the properties on the BGPVPN class. For details, see the Neutron api-ref.
    • Returns: The result of BGPVPN creation
  • delete_bgpvpn(bgpvpn, ignore_missing=True) โ€” delete a BGPVPN
    • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn (openstack.network.v2.bgpvpn.BgpVpn) instance.
    • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the BGPVPN does not exist. When set to True, no exception will be set when attempting to delete a nonexistent BGPVPN.
    • Returns: None
  • find_bgpvpn(name_or_id, ignore_missing=True, **query) โ€” find a single BGPVPN ๐Ÿ”
    • name_or_id โ€” the name or ID of a BGPVPN.
    • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
    • query โ€” any additional parameters to be passed into underlying methods, such as query filters.
    • Returns: One BGPVPN or None
  • get_bgpvpn(bgpvpn, *, fields=None) โ€” get a single BGPVPN ๐Ÿ‘‘
    • bgpvpn โ€” the value can be the ID of a BGPVPN or a BgpVpn (openstack.network.v2.bgpvpn.BgpVpn) instance.
    • fields โ€” limit the resource fields to fetch.

Returns โ€” one BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> object, bestie. โœจ

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. Like, if it's not there, it's not there. ๐Ÿ’€


update_bgpvpn(bgpvpn, **attrs)

Update a BGPVPN. Glow-up szn. ๐Ÿ’…

Parameters

  • bgpvpn โ€” either the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • attrs โ€” the attributes to update on the BGPVPN represented by value.

Returns โ€” the updated BGPVPN. ๐Ÿ‘‘

bgpvpns(**query)

Return a generator of BGP VPNs. Not a list, a generator, okay? she yields.

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of BgpVpn objects.

create_bgpvpn_network_association(bgpvpn, **attrs)

Create a new BGPVPN Network Association. new friend unlocked ๐Ÿซถ

Parameters

  • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • attrs โ€” keyword arguments which will be used to create a BgpVpnNetworkAssociation, comprised of the properties on the BgpVpnNetworkAssociation class.

Returns โ€” the results of BgpVpnNetworkAssociation creation.

delete_bgpvpn_network_association(bgpvpn, net_association, ignore_missing=True)

Delete a BGPVPN Network Association. it's giving closure ๐ŸŒธ

Parameters

  • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • net_association โ€” the value can be either the ID of a bgpvpn_network_association or a BgpVpnNetworkAssociation instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the BgpVpnNetworkAssociation does not exist. When set to True, no exception will be set when attempting to delete a nonexistent BgpVpnNetworkAssociation.

Returns โ€” None.

get_bgpvpn_network_association(bgpvpn, net_association, *, fields=None)

Get a signle BGPVPN Network Association. (yes, "signle", the docs said what they said, we respect the typo ๐Ÿ˜ญ)

Parameters

  • bgpvpn โ€” the value can be the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • net_association โ€” the value can be the ID of a BgpVpnNetworkAssociation or a BgpVpnNetworkAssociation instance.
  • fields โ€” limit the resource fields to fetch. only the cute parts โœจ

Returns โ€” one BgpVpnNetworkAssociation.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

bgpvpn_network_associations(bgpvpn, **query)

Return a generator of BGP VPN Network Associations.

Param bgpvpn: the value can be the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of BgpVpnNetworkAssociation objects.

create_bgpvpn_port_association(bgpvpn, **attrs)

Create a new BGPVPN Port Association. another one, we love to see it ๐ŸŽ€

Parameters

  • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • attrs โ€” keyword arguments which will be used to create a BgpVpnPortAssociation, comprised of the properties on the BgpVpnPortAssociation class.

Returns โ€” the results of BgpVpnPortAssociation creation.

delete_bgpvpn_port_association(bgpvpn, port_association, ignore_missing=True)

Delete a BGPVPN Port Association. bye bestie ๐Ÿ‘‹

Parameters

  • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • port_association โ€” the value can be either the ID of a bgpvpn_port_association or a BgpVpnPortAssociation instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the BgpVpnPortAssociation does not exist. When set to True, no exception will be set when attempting to delete a nonexistent BgpVpnPortAssociation.

Returns โ€” None.

find_bgpvpn_port_association(name_or_id, bgpvpn_id, ignore_missing=True, **query)

Find a single BGPVPN Port Association. detective mode ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of a BgpVpnNetworkAssociation.
  • bgpvpn_id โ€” the value can be the ID of a BGPVPN.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns โ€” one BGPVPN or None.

get_bgpvpn_port_association(bgpvpn, port_association, *, fields=None)

Get a signle BGPVPN Port Association. (again with the "signle" โ€” iconic typo, no notes ๐Ÿ’€)

Parameters

  • bgpvpn โ€” the value can be the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • port_association โ€” the value can be the ID of a BgpVpnPortAssociation or a BgpVpnPortAssociation instance.
  • fields โ€” limit the resource fields to fetch.

Returns โ€” one BgpVpnPortAssociation.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

update_bgpvpn_port_association(bgpvpn, port_association, **attrs)

Update a BPGPN Port Association. (yes, "BPGPN" โ€” original spelling, we keep it fr fr ๐Ÿ™ˆ)

Parameters

  • bgpvpn โ€” either the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • port_association โ€” the value can be the ID of a BgpVpnPortAssociation or a BgpVpnPortAssociation instance.
  • attrs โ€” the attributes to update on the BGPVPN represented by value.

Returns โ€” the updated BgpVpnPortAssociation.

bgpvpn_port_associations(bgpvpn, **query)

Return a generator of BGP VPN Port Associations.

Param bgpvpn: the value can be the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns โ€” a generator of BgpVpnNetworkAssociation objects. (yes it says BgpVpnNetworkAssociation in the Port one too โ€” that's what the page says, so that's what you get ๐Ÿซถ)

create_bgpvpn_router_association(bgpvpn, **attrs)

Create a new BGPVPN Router Association. routers need love too ๐ŸŒˆ

Parameters

  • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • attrs โ€” keyword arguments which will be used to create a BgpVpnRouterAssociation, comprised of the properties on the BgpVpnRouterAssociation class.

Returns โ€” the results of BgpVpnRouterAssociation creation.

delete_bgpvpn_router_association(bgpvpn, router_association, ignore_missing=True)

Delete a BGPVPN Router Association. closing the group chat ๐Ÿ’…

Parameters

  • bgpvpn โ€” the value can be either the ID of a bgpvpn or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • router_association โ€” the value can be either the ID of a bgpvpn_router_association or a BgpVpnRouterAssociation instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the BgpVpnRouterAssociation does not exist. When set to True, no exception will be set when attempting to delete a nonexistent BgpVpnRouterAsociation. (yup, BgpVpnRouterAsociation โ€” one "s", lowercase "soc"... we're just quoting the source, don't come for me ๐Ÿ˜ญ)

Returns โ€” None.

get_bgpvpn_router_association(bgpvpn, router_association, *, fields=None)

Get a signle BGPVPN Router Association. third "signle" of the day, it's a tradition at this point โœจ

Parameters

  • bgpvpn โ€” the value can be the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.
  • router_association โ€” the value can be the ID of a BgpVpnRouterAssociation or a BgpVpnRouterAssociation instance. ๐Ÿซถ
    • fields โ€” limit the resource fields to fetch. Only grab what you asked for, no extra luggage bestie.

Returns โ€” one BgpVpnRouterAssociation. Just the one. A single.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ’€


update_bgpvpn_router_association(bgpvpn, router_association, **attrs)

Update a BPGPN Router Association. (Yes, we know โ€” the docstring says "BPGPN". We're not fixing it, we're respecting it. Character for character, bestie. ๐Ÿ’…)

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of BgpVpnNetworkAssociation objects.

Okay so yes, this Returns line says Network Association for a method about Router Associations, and it says "generator" for a method that updates. That's what the page says, so that's what you get. Do not come for me, come for the docstring. ๐Ÿ™ˆ Not my words, not my problem.

bgpvpn_router_associations(bgpvpn, **query)

Return a generator of BGP VPN router Associations. All of them. A whole little stream of them, served up fresh. โœจ

Param bgpvpn: The value can be the ID of a BGPVPN or a BgpVpn <#openstack.network.v2.bgpvpn.BgpVpn> instance.

Parameters

  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of BgpVpnRouterAssociation objects.


๐Ÿฆ‹ SFC operations ๐Ÿฆ‹


class openstack.network.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

ik that signature is giving "final boss of keyword arguments" ๐Ÿ˜ญ but here she is, all of it, no cap. The Proxy class lives at openstack.network.v2._proxy.Proxy and she takes a session plus that whole buffet of keyword-only config. Go off, honestly. ๐Ÿ‘‘


create_sfc_flow_classifier(**attrs)

Create a new Flow Classifier from attributes. Fresh out the box, custom-built, your very own. ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments which will be used to create a SfcFlowClassifier <#openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier>, comprised of the properties on the SfcFlowClassifier class.

Returns

The results of SFC Flow Classifier creation.


delete_sfc_flow_classifier(flow_classifier, ignore_missing=True)

Delete a Flow Classifier. Gone. Poof. ๐Ÿ’จ

Parameters

  • flow_classifier โ€” the value can be either the ID of a flow classifier or a SfcFlowClassifier <#openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the flow classifier does not exist. When set to True, no exception will be set when attempting to delete a nonexistent flow classifier.
Note the double space in "when the flow classifier does not exist" โ€” that's the original's double space, preserved with love. ๐Ÿซถ

Returns

None. Nothing. That's the whole vibe.


find_sfc_flow_classifier(name_or_id, ignore_missing=True, **query)

Find a single Flow Classifier. Detective mode: activated. ๐Ÿ”Ž

Parameters

  • name_or_id โ€” the name or ID of an SFC flow classifier.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns

One SfcFlowClassifier or None. Found it or didn't, no drama either way. ๐Ÿฆ‹


get_sfc_flow_classifier(flow_classifier)

Get a single Flow Classifier. Just the one, hand-delivered. ๐Ÿ’–

Parameters

  • flow_classifier โ€” the value can be the ID of an SFC flow classifier or a SfcFlowClassifier <#openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier> instance.

Returns

SfcFlowClassifier <#openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


update_sfc_flow_classifier(flow_classifier, **attrs)

Update a Flow Classifier. Glow-up time. โœจ

Parameters

  • flow_classifier โ€” the value can be the ID of a Flow Classifier SfcFlowClassifier <#openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier>, instance.
  • attrs โ€” the attributes to update on the Flow Classifier.

Returns

The updated Flow Classifier.


create_sfc_port_chain(**attrs)

Create a new Port Chain from attributes. Link by link, bestie. โ›“๏ธ

Parameters

  • attrs โ€” keyword arguments which will be used to create a SfcPortChain <#openstack.network.v2.sfc_port_chain.SfcPortChain>, comprised of the properties on the SfcPortchain class.

Returns

The results of SFC Port Chain creation.


delete_sfc_port_chain(port_chain, ignore_missing=True)

Delete a Port Chain. Breaking the chain, respectfully. ๐Ÿ’€

Parameters

  • port_chain โ€” the value can be either the ID of a port chain or a SfcPortChain <#openstack.network.v2.sfc_port_chain.SfcPortChain> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the port chain does not exist. When set to True, no exception will be set when attempting to delete a nonexistent port chain.

Returns

None


find_sfc_port_chain(name_or_id, ignore_missing=True, **query)

Find a single Port Chain.

Parameters

  • name_or_id โ€” the name or ID of an SFC port chain.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.

Returns

One SfcPortChain or None. ๐ŸŒธ


get_sfc_port_chain(port_chain)

Get a signle Port Chain.

"signle" โ€” nope, that's not a typo I made, that's the page's own spelling and I'm keeping it fr fr. ๐Ÿ˜ญ Original text is sacred. ๐Ÿซถ

Parameters

  • port_chain โ€” the value can be the ID of an SFC port chain or a SfcPortChain <#openstack.network.v2.sfc_port_chain.SfcPortChain> instance.

Returns

SfcPortchain

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.


update_sfc_port_chain(port_chain, **attrs)

Update a Port Chain. New chain, who dis. ๐Ÿ”ฅ

Parameters

  • port_chain โ€” the value can be the ID of a Port Chain SfcPortChain <#openstack.network.v2.sfc_port_chain.SfcPortChain>, instance.
  • attrs โ€” the attributes to update on the Port Chain.

Returns

The updated Port Chain.


create_sfc_port_pair(**attrs)

Create a new Port Pair from attributes. Two ports, one pair, iconic duo energy. ๐Ÿ‘ฏ

Parameters

  • attrs โ€” keyword arguments which will be used to create a SfcPortPair <#openstack.network.v2.sfc_port_pair.SfcPortPair>, comprised of the properties on the SfcPortPair class.

Returns

The results of SFC Port Pair creation.


delete_sfc_port_pair(port_pair, ignore_missing=True)

Delete a Port Pair. Separating the duo. Sad but necessary. ๐Ÿ˜ญ

Parameters

  • port_pair โ€” the value can be either the ID of a port pair or a SfcPortPair <#openstack.network.v2.sfc_port_pair.SfcPortPair> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the port pair does not exist. When set to True, no exception will be set when attempting to delete a nonexistent port pair.

Returns

None


find_sfc_port_pair(name_or_id, ignore_missing=True, **query)

Find a single Port Pair. ๐Ÿ“

Parameters

  • name_or_id โ€” the name or ID of an SFC port pair.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” any additional parameters to be passed into underlying methods. such as query filters.
  • get_sfc_port_pair(port_pair) โ€” Get a signle Port Pair ๐Ÿ’…

Parameters

  • port_pair โ€” The value can be the ID of an SFC port pair or a SfcPortPair <#openstack.network.v2.sfc_port_pair.SfcPortPair> instance.

Returns

SfcPortPair <#openstack.network.v2.sfc_port_pair.SfcPortPair>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

  • update_sfc_port_pair(port_pair, **attrs) โ€” Update a Port Pair โœจ

Parameters

  • port_pair โ€” The value can be the ID of a Port Pair SfcPortPair <#openstack.network.v2.sfc_port_pair.SfcPortPair>, instance.
  • attrs โ€” The attributes to update on the Port Pair

Returns

The updated Port Pair. ๐Ÿซถ

  • create_sfc_port_pair_group(**attrs) โ€” Create a new Port Pair Group from attributes ๐ŸŒธ

Parameters

  • attrs โ€” Keyword arguments which will be used to create a SfcPortPairGroup <#openstack.network.v2.sfc_port_pair_group.SfcPortPairGroup>, comprised of the properties on the SfcPortPairGroup class.

Returns

The results of SFC Port Pair Group creation ๐ŸŽ€

  • delete_sfc_port_pair_group(port_pair_group, ignore_missing=True) โ€” Delete a Port Pair Group ๐Ÿ’€

Parameters

  • port_pair_group โ€” The value can be either the ID of a port pair group or a SfcPortPairGroup instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the port pair group does not exist. When set to True, no exception will be set when attempting to delete a nonexistent port pair group.

Returns

None

  • find_sfc_port_pair_group(name_or_id, ignore_missing=True, **query) โ€” Find a single Port Pair Group ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of an SFC port pair group.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns

One SfcPortPairGroup or None

  • get_sfc_port_pair_group(port_pair_group) โ€” Get a signle Port Pair Group ๐Ÿ’…

Parameters

  • port_pair_group โ€” The value can be the ID of an SFC port pair group or a SfcPortPairGroup <#openstack.network.v2.sfc_port_pair_group.SfcPortPairGroup> instance.

Returns

SfcPortPairGroup <#openstack.network.v2.sfc_port_pair_group.SfcPortPairGroup>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

  • update_sfc_port_pair_group(port_pair_group, **attrs) โ€” Update a Port Pair Group โœจ

Parameters

  • port_pair_group โ€” The value can be the ID of a Port Pair Group SfcPortPairGroup <#openstack.network.v2.sfc_port_pair_group.SfcPortPairGroup>, instance.
  • attrs โ€” The attributes to update on the Port Pair Group

Returns

The updated Port Pair Group. ๐Ÿซถ

  • create_sfc_service_graph(**attrs) โ€” Create a new Service Graph from attributes ๐ŸŒˆ

Parameters

  • attrs โ€” Keyword arguments which will be used to create a SfcServiceGraph <#openstack.network.v2.sfc_service_graph.SfcServiceGraph>, comprised of the properties on the SfcServiceGraph class.

Returns

The results of SFC Service Graph creation ๐ŸŽ€

  • delete_sfc_service_graph(service_graph, ignore_missing=True) โ€” Delete a Service Graph ๐Ÿ’€

Parameters

  • service_graph โ€” The value can be either the ID of a service graph or a SfcServiceGraph <#openstack.network.v2.sfc_service_graph.SfcServiceGraph> instance.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the service graph does not exist. When set to True, no exception will be set when attempting to delete a nonexistent service graph.

Returns

None

  • find_sfc_service_graph(name_or_id, ignore_missing=True, **query) โ€” Find a single Service Graph ๐Ÿ”

Parameters

  • name_or_id โ€” The name or ID of an SFC service graph.
  • ignore_missing โ€” When set to False NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns

One SfcServiceGraph or None

  • get_sfc_service_graph(service_graph) โ€” Get a signle Service Graph ๐Ÿ’…

Parameters

  • service_graph โ€” The value can be the ID of an SFC service graph or a SfcServiceGraph <#openstack.network.v2.sfc_service_graph.SfcServiceGraph> instance.

Returns

SfcServiceGraph <#openstack.network.v2.sfc_service_graph.SfcServiceGraph>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

  • update_sfc_service_graph(service_graph, **attrs) โ€” Update a Service Graph โœจ

Parameters

  • service_graph โ€” The value can be the ID of a Service Graph SfcServiceGraph <#openstack.network.v2.sfc_service_graph.SfcServiceGraph>, instance.
  • attrs โ€” The attributes to update on the Service Graph

Returns

The updated Service Graph. ๐Ÿซถ


๐Ÿฆ‹ Tap Mirror operations

okay so the whole tap mirror situation lives on this proxy class, and here's literally the entire signature bestie, don't skip a single keyword-only arg, iykyk:

class openstack.network.v2._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)
  • create_tap_mirror(**attrs) โ€” Create a new Tap Mirror from attributes โœจ
  • delete_tap_mirror(tap_mirror, ignore_missing=True) โ€” Delete a Tap Mirror ๐Ÿ’€
  • find_tap_mirror(name_or_id, ignore_missing=True, **query) โ€” Find a single Tap Mirror ๐Ÿ”
  • get_tap_mirror(tap_mirror, *, fields=None) โ€” Get a signle Tap Mirror ๐Ÿ’…

Parameters

  • tap_mirror โ€” The value can be the ID of a tap mirror or a TapMirror <#openstack.network.v2.tap_mirror.TapMirror> instance.
  • fields โ€” Limit the resource fields to fetch.

Returns

One TapMirror <#openstack.network.v2.tap_mirror.TapMirror>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found. ๐Ÿ˜ญ

  • update_tap_mirror(tap_mirror, **attrs) โ€” Update a Tap Mirror โœจ
  • tap_mirrors(**query) โ€” Return a generator of Tap Mirrors ๐ŸŒˆ

๐Ÿ›’ Object Store API

For details on how to use this API, see Using OpenStack Object Store <>

๐ŸŽ€ The Object Store Class

The Object Store high-level interface is exposed as the object_store object on Connection <#openstack.connection.Connection> objects. literally so convenient, you just reach for it and it's there ๐Ÿ’–

๐Ÿ“ Account Operations

here's the class for the account ops, full signature, no cap:

class openstack.object_store.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_account_metadata()

Get the metadata for this account. That's it, that's the vibe โœจ

set_account_metadata(**metadata)

Set metadata for this account. ๐ŸŽ€

Parameters

  • metadata โ€” Key/value pairs to be set as metadata on the container. Custom metadata can be set. Custom metadata are keys and values defined by the user.

delete_account_metadata(keys)

Delete metadata for this account. Bye-bye ๐Ÿ‘‹

Parameters

  • keys โ€” The keys of metadata to be deleted.

๐Ÿงบ Container Operations ๐Ÿงบ

Okay bestie, this is where it gets good. Same Proxy class, same energy:

class openstack.object_store.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

containers(**query)

Obtain Container objects for this account. Like, all of them. ๐Ÿ’…

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

create_container(name, **attrs)

Create a new container from attributes ๐ŸŒธ

Parameters

  • container โ€” Name of the container to create.
  • attrs โ€” Keyword arguments which will be used to create a Container <#openstack.object_store.v1.container.Container>, comprised of the properties on the Container class.

Returns

The results of container creation.

delete_container(container, ignore_missing=True)

Delete a container. Gone. Reduced to atoms ๐Ÿ’€

Parameters

  • container โ€” The value can be either the name of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the container does not exist. When set to True, no exception will be set when attempting to delete a nonexistent server.

Returns

None

get_container_metadata(container)

Get metadata for a container ๐Ÿ”

Parameters

  • container โ€” The value can be the name of a container or a Container <#openstack.object_store.v1.container.Container> instance.

Returns

One Container <#openstack.object_store.v1.container.Container>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

set_container_metadata(container, refresh=True, **metadata)

Set metadata for a container. Iconic behaviour honestly ๐Ÿ‘‘

Parameters

  • container โ€” The value can be the name of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • refresh โ€” Flag to trigger refresh of container object re-fetch.
  • metadata โ€” Key/value pairs to be set as metadata on the container. Both custom and system metadata can be set. Custom metadata are keys and values defined by the user. System metadata are keys defined by the Object Store and values defined by the user. The system metadata keys are:
    • content_type
    • is_content_type_detected
    • versions_location
    • read_ACL
    • write_ACL
    • sync_to
    • sync_key

delete_container_metadata(container, keys)

Delete metadata for a container. Clearing out the vibes ๐Ÿงน

Parameters

  • container โ€” The value can be the ID of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • keys โ€” The keys of metadata to be deleted.

๐Ÿฆ‹ Object Operations ๐Ÿฆ‹

Bestie we are so close. Same class, third time's the charm:

class openstack.object_store.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

objects(container, **query)

Return a generator that yields the Container's objects. It's giving "infinite scroll but make it cloud storage" ๐Ÿ˜Œ

Parameters

  • container โ€” A container object or the name of a container that you want to retrieve objects from.
  • query โ€” Optional query parameters to be sent to limit the resources being returned.

get_object(obj, container=None, resp_chunk_size=1024, outfile=None, remember_content=False)

Get the data associated with an object. The main character of this whole section, lowkey ๐Ÿซถ

Parameters

  • obj โ€” The value can be the name of an object or a Object <#openstack.object_store.v1.obj.Object> instance.
  • container โ€” The value can be the name of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • resp_chunk_size โ€” chunk size of data to read. Only used if the results are being written to a file or stream is True. (optional, defaults to 1k)
  • outfile โ€” Write the object to a file instead of returning the contents. If this option is given, body in the return tuple will be None. outfile can either be a file path given as a string, or a File like object.
  • remember_content โ€” Flag whether object data should be saved as data property of the Object. When left as false and outfile is not defined data will not be saved and need to be fetched separately.

Returns

Instance of the Object <#openstack.object_store.v1.obj.Object> objects.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

download_object(obj, container=None, **attrs)

Download the data contained inside an object. Snatch it, bestie ๐Ÿ’–

Parameters

  • obj โ€” The value can be the name of an object or a Object <#openstack.object_store.v1.obj.Object> instance.
  • container โ€” The value can be the name of a container or a Container <#openstack.object_store.v1.container.Container> instance.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

upload_object(container, name, filename=None, md5=None, sha256=None, segment_size=None, use_slo=True, metadata=None, generate_checksums=None, data=None, **headers)

Create a file object. Automatically uses large-object segments if needed โ€” like she does the most, effortlessly โœจ

Parameters

  • container โ€” The name of the container to store the file in. This container will be created if it does not exist already.
  • name โ€” Name for the object within the container.
  • filename โ€” The path to the local file whose contents will be uploaded. Mutually exclusive with data.
  • data โ€” The content to upload to the object. Mutually exclusive with filename.
  • md5 โ€” A hexadecimal md5 of the file. (Optional), if it is known and can be passed here, it will save repeating the expensive md5 process. It is assumed to be accurate.
  • sha256 โ€” A hexadecimal sha256 of the file. (Optional) See md5.
  • segment_size โ€” Break the uploaded object into segments of this many bytes. (Optional) SDK will attempt to discover the maximum value for this from the server if it is not specified, or will use a reasonable default.
  • headers โ€” These will be passed through to the object creation API as HTTP Headers.
  • use_slo โ€” If the object is large enough to need to be a Large Object, use a static rather than dynamic object. Static Objects will delete segment objects when the manifest object is deleted. (optional, defaults to True)
heads up fr: filename and data are mutually exclusive โ€” pick one, don't do both ๐Ÿ™ˆ
  • generate_checksums โ€” Whether to generate checksums on the client side that get added to headers for later prevention of double uploads of identical data. (optional, defaults to True)
  • metadata โ€” This dict will get changed into headers that set metadata of the object

Raises SDKException (openstack.exceptions.SDKException) on operation error.

copy_object()

Copy an object. Literally just copy it, bestie. Slay.

delete_object(obj, ignore_missing=True, container=None)

Delete an object. Yeet.

  • obj โ€” The value can be either the name of an object or a Container <#openstack.object_store.v1.container.Container> instance.
  • container โ€” The value can be the ID of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the object does not exist. When set to True, no exception will be set when attempting to delete a nonexistent server. (Yes, it says server โ€” that's the original wording, no cap ๐Ÿ˜ญ)

Returns None

get_object_metadata(obj, container=None)

Get metadata for an object.

  • obj โ€” The value can be the name of an object or a Object <#openstack.object_store.v1.obj.Object> instance.
  • container โ€” The value can be the ID of a container or a Container <#openstack.object_store.v1.container.Container> instance.

Returns One Object <#openstack.object_store.v1.obj.Object>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

set_object_metadata(obj, container=None, **metadata)

Set metadata for an object.

Note: This method will do an extra HEAD call.
  • obj โ€” The value can be the name of an object or a Object <#openstack.object_store.v1.obj.Object> instance.
  • container โ€” The value can be the name of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • metadata โ€” Key/value pairs to be set as metadata on the container. Both custom and system metadata can be set. Custom metadata are keys and values defined by the user. System metadata are keys defined by the Object Store and values defined by the user. The system metadata keys are:
    • content_type
    • content_encoding
    • content_disposition
    • delete_after
    • delete_at
    • is_content_type_detected

delete_object_metadata(obj, container=None, keys=None)

Delete metadata for an object.

  • obj โ€” The value can be the name of an object or a Object <#openstack.object_store.v1.obj.Object> instance.
  • container โ€” The value can be the ID of a container or a Container <#openstack.object_store.v1.container.Container> instance.
  • keys โ€” The keys of metadata to be deleted.

๐ŸŽผ Orchestration API ๐ŸŽผ

For details on how to use orchestration, see Using OpenStack Orchestration <>.

The Orchestration Class

The orchestration high-level interface is available through the orchestration member of a Connection <#openstack.connection.Connection> object. The orchestration member will only be added if the service is detected.

Stack Operations

class openstack.orchestration.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_stack(preview=False, **attrs)

Create a new stack from attributes.

  • preview โ€” When True, a preview endpoint will be used to verify the template. Default: False
  • attrs โ€” Keyword arguments which will be used to create a Stack <#openstack.orchestration.v1.stack.Stack>, comprised of the properties on the Stack class.

Returns The results of stack creation

find_stack(name_or_id, ignore_missing=True, resolve_outputs=True)

Find a single stack.

  • name_or_id โ€” The name or ID of a stack.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns One Stack <#openstack.orchestration.v1.stack.Stack> or None

stacks(**query)

Return a generator of stacks.

  • query โ€” Optional query parameters to be sent to limit the resources being returned.

Returns A generator of stack objects

get_stack(stack, resolve_outputs=True)

Get a single stack.

  • stack โ€” The value can be the ID of a stack or a Stack <#openstack.orchestration.v1.stack.Stack> instance.
  • resolve_outputs โ€” Whether stack should contain outputs resolved.

Returns One Stack <#openstack.orchestration.v1.stack.Stack>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

update_stack(stack, *, preview=False, **attrs)

Update a stack.

  • stack โ€” The value can be the ID of a stack or a Stack <#openstack.orchestration.v1.stack.Stack> instance.
  • attrs โ€” The attributes to update on the stack represented by value.

Returns The updated stack

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

delete_stack(stack, ignore_missing=True)

Delete a stack.

  • stack โ€” The value can be either the ID of a stack or a Stack <#openstack.orchestration.v1.stack.Stack> instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the stack does not exist. When set to True, no exception will be set when attempting to delete a nonexistent stack.

Returns None

export_stack(stack)

Get the stack data in JSON format.

  • stack โ€” The value can be the ID or a name or an instance of Stack <#openstack.orchestration.v1.stack.Stack>

Returns A dictionary containing the stack data.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

get_stack_template(stack)

Get template used by a stack.

  • stack โ€” The value can be the ID of a stack or an instance of Stack <#openstack.orchestration.v1.stack.Stack>

Returns One object of StackTemplate <#openstack.orchestration.v1.stack_template.StackTemplate>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

get_stack_environment(stack)

Get environment used by a stack.

  • stack โ€” The value can be the ID of a stack or an instance of Stack <#openstack.orchestration.v1.stack.Stack>

Returns One object of StackEnvironment <#openstack.orchestration.v1.stack_environment.StackEnvironment>

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no resource can be found.

๐Ÿ’– Stack Resource Operations

Okay bestie, real talk โ€” every single one of these sections is literally the same Proxy class, so I'm not gonna make you sit through the whole constructor signature a million times. But the first time? We're doing it properly, 'cause that's the icon we're dealing with ๐Ÿ‘‘

class openstack.orchestration.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

Like, that's the whole glow-up list. Every kwarg. We're not skipping a single one, periodt.

resources(stack, **query)

โœจ Returns you a generator of resources โœจ โ€” a whole lil stream of them, one at a time, like scrolling your fyp.

Parameters:

  • stack โ€” ngl this one's flexible: it can be an actual stack object, OR just the name of a stack whose resources you wanna list ๐Ÿซถ
  • query โ€” optional query params you send along to limit which resources come back (a little filter, a little curation, we love to see it)

Returns: a generator of resource objects โ€” but only if the stack actually exists AND has resources in it. If the stack can't be found? Exception. Immediately. No vibes. ๐Ÿ’€

The resource objects it hands you are Resource (#openstack.orchestration.v1.resource.Resource) โ€” that's the type, bestie.

Raises: NotFoundException (#openstack.exceptions.NotFoundException) when the stack cannot be found. Like, it's gone gone.


๐Ÿ’… Stack Action Operations

Same Proxy class, same constructor signature, same energy:

class openstack.orchestration.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

check_stack(stack)

Checks a stack's status. ๐Ÿ‘€

And here's the thing โ€” this is an asynchronous action, so there's literally no other way to check the result than to track the stack's status yourself. No instant answer, no shortcut, that's just the deal. ๐ŸŒ€

Parameters:

  • stack โ€” either the ID of a stack, or an actual instance of Stack (#openstack.orchestration.v1.stack.Stack)

Returns: None. That's it. That's the whole return. ๐Ÿ™ˆ

suspend_stack(stack)

Suspends a stack's status. Putting it on pause, putting it in airplane mode โœˆ๏ธ

Parameters:

  • stack โ€” again, either the ID of a stack or an instance of Stack (#openstack.orchestration.v1.stack.Stack)

Returns: None

resume_stack(stack)

Resumes a stack's status โ€” un-pausing it, bringing it back online, the comeback era ๐ŸŒˆ

Parameters:

  • stack โ€” either the ID of a stack or an instance of Stack (#openstack.orchestration.v1.stack.Stack)

Returns: None


๐Ÿฆ‹ Stack Event Operations

You guessed it โ€” same Proxy class, same giant signature, here it is once more in all its glory:

class openstack.orchestration.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

stack_events(stack, resource_name=None, **attr)

Gets you stack events โ€” the receipts, the timeline, the lore ๐Ÿ“œ

Parameters:

  • stack โ€” the value can be the ID of a stack or an instance of Stack (#openstack.orchestration.v1.stack.Stack)
  • resource_name โ€” the name of the resource. And here's the tea: if resource_name is not None, the base_path changes. Yes, it literally switches up the path on you. Lowkey important ๐Ÿšจ

Returns: a generator of stack_events objects. A whole stream of them, bestie ๐ŸŽ€


๐ŸŒธ Stack Template Operations

Same Proxy class, same constructor, same everything โ€” one more time for the people in the back:

class openstack.orchestration.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

validate_template(template, environment=None, template_url=None, ignore_errors=None)

Validates a template. A whole vibe check for your template, fr fr โœ…

Parameters:

  • template โ€” the stack template that the validation is performed on
  • environment โ€” a JSON environment for the stack, if you've got one to provide
  • template_url โ€” a URI to the location containing the stack template for validation. This one's only required if the template parameter is None. And heads up: this parameter gets ignored if template is specified. Pick a lane, you know? ๐Ÿ’…
  • ignore_errors โ€” a string containing comma separated error codes to ignore. Currently the only valid error code is '99001' โ€” that's the one and only, don't try to sneak others in ๐Ÿ™ˆ

Returns: the result of template validation

Raises:

  • InvalidRequest (#openstack.exceptions.InvalidRequest) if neither template nor template_url is provided โ€” like, you gotta give it something
  • HttpException (#openstack.exceptions.HttpException) if the template fails the validation โ€” the template did not slay, and it will be told ๐Ÿ˜ญ

๐ŸŽ€ Software Configuration Operations

Last Proxy class of this part, same iconic signature, here we go:

class openstack.orchestration.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_software_config(**attrs)

Creates a brand new software config out of attributes ๐ŸŒฑ

Parameters:

  • attrs โ€” keyword arguments that'll be used to create a SoftwareConfig (#openstack.orchestration.v1.software_config.SoftwareConfig), made up of the properties on the SoftwareConfig class

Returns: the results of software config creation, as a SoftwareConfig (#openstack.orchestration.v1.software_config.SoftwareConfig)

software_configs(**query)

Returns a generator of software configs ๐Ÿงš โ€” a lil stream of them

Parameters:

  • query โ€” optional query parameters sent along to limit the software configs returned

Returns: a generator of software config objects, SoftwareConfig (#openstack.orchestration.v1.software_config.SoftwareConfig)

get_software_config(software_config)

Gets you all the details about one specific software config ๐Ÿ”

Parameters:

  • software_config โ€” the value can be the ID of a software config, or an instace of SoftwareConfig (#openstack.orchestration.v1.software_config.SoftwareConfig) โ€” yes, that's how the original spells it, "instace", we're keeping it, character for character bestie ๐Ÿซถ

Returns: an object of type SoftwareConfig (#openstack.orchestration.v1.software_config.SoftwareConfig)

delete_software_config(software_config, ignore_missing=True)

Deletes a software config. Gone. Poof. ๐Ÿฆ‹

Parameters:

  • software_config โ€” either the ID of a software config or an instance of SoftwareConfig (#openstack.orchestration.v1.software_config.SoftwareConfig)
  • ignore_missing โ€” when set to False, NotFoundException (#openstack.exceptions.NotFoundException) gets raised when the software config doesn't exist. When set to True, no exception will be set when attempting to delete a nonexistent software config. (That's literally what the original says โ€” "no exception will be set" โ€” so we're keeping it exactly as-is, no editing โœจ)

Returns: None

๐Ÿ› ๏ธ Software Deployment Operations

okay bestie, buckle up โ€” here's the proxy object for software deployments, and yes I'm giving you the entire constructor signature because we don't gatekeep parameters in this house ๐Ÿ’…

class openstack.orchestration.v1._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

every single one of those kwargs is right there โ€” service_type, service_name, interface, region_name, endpoint_override, version, auth, user_agent, connect_retries, logger, allow, additional_headers, client_name, client_version, allow_version_hack, global_request_id, min_version, max_version, default_microversion, status_code_retries, retriable_status_codes, raise_exc, rate_limit, concurrency, connect_retry_delay, status_code_retry_delay, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client. iconic. no notes. โœจ


๐ŸŒธ create_software_deployment(**attrs)

make a whole new software deployment out of attributes, slay.

  • Parameters
    • attrs โ€” keyword arguments that get used to create a SoftwareDeployment <#openstack.orchestration.v1.software_deployment.SoftwareDeployment>, made up of the properties on the SoftwareDeployment class.
  • Returns โ€” the results of software deployment creation ๐Ÿซถ

๐ŸŒธ software_deployments(**query)

hands you a generator of software deployments. very demure, very lazy-evaluated.

  • Parameters
    • query โ€” optional query parameters that get sent along to limit the software deployments returned.
  • Returns โ€” a generator of software deployment objects: SoftwareDeployment <#openstack.orchestration.v1.software_deployment.SoftwareDeployment>

๐ŸŒธ get_software_deployment(software_deployment)

grab the deets on one specific software deployment resource ๐Ÿ”

  • Parameters
    • software_deployment โ€” the value can be the ID of a software deployment, or an instance of SoftwareDeployment <#openstack.orchestration.v1.software_deployment.SoftwareDeployment>,
  • Returns โ€” an object of type SoftwareDeployment <#openstack.orchestration.v1.software_deployment.SoftwareDeployment>

๐ŸŒธ delete_software_deployment(software_deployment, ignore_missing=True)

bye bye software deployment ๐Ÿ‘‹

  • Parameters
    • software_deployment โ€” the value can be either the ID of a software deployment or an instance of SoftwareDeployment <#openstack.orchestration.v1.software_deployment.SoftwareDeployment>
    • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the software deployment does not exist. When set to True, no exception will be set when attempting to delete a nonexistent software deployment.
  • Returns โ€” None

๐ŸŒธ update_software_deployment(software_deployment, **attrs)

update a software deployment, glow-up edition โœจ

  • Parameters
    • server โ€” either the ID of a software deployment or an instance of SoftwareDeployment <#openstack.orchestration.v1.software_deployment.SoftwareDeployment>. (yes, the docs literally label this bullet server here even though the parameter in the signature is software_deployment โ€” just reporting what's written, don't come for me ๐Ÿ™ˆ)
    • attrs โ€” the attributes to update on the software deployment represented by software_deployment.
  • Returns โ€” the updated software deployment

๐Ÿ’ซ Placement API

The Placement Class

the placement high-level interface is available through the placement member of a Connection <#openstack.connection.Connection> object. heads up though: the placement member will only be added if the service is detected ๐Ÿ‘‘

Allocation Candidates

class openstack.placement.v1._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

same full signature, every kwarg, absolutely no crumbs left behind ๐Ÿ“

allocation_candidates(**query) โ€” retrieve a generator of allocation candidates. each yielded AllocationCandidate <#openstack.placement.v1.allocation_candidate.AllocationCandidate> represents one candidate set of allocations, and contains:

  • allocations โ€” a dict mapping resource provider UUID to the resources to request from that provider.
  • mappings โ€” a dict mapping request-group suffixes to provider UUIDs (available from microversion 1.34).
  • provider_summaries โ€” a dict keyed by resource provider UUID with capacity and trait information for providers in this candidate.

Parameters

  • query โ€” Query parameters forwarded directly to placement. common parameters include:
    • resources โ€” a comma-separated CLASS:AMOUNT string, e.g. VCPU:1,DISK_GB:10,MEMORY_MB:512
    • required โ€” comma-separated required (or !-prefixed forbidden) traits
    • member_of โ€” aggregate UUID filter
    • in_tree โ€” restrict to a resource provider subtree
    • limit โ€” maximum number of candidates to return
    • group_policy โ€” isolate or none
    • root_required โ€” traits required on the root provider
    • same_subtree โ€” request-group suffixes that must share a tree

numbered variants (resources1, required1, member_of1, in_tree1, โ€ฆ) are accepted for granular request groups. iykyk ๐Ÿงš

Returns โ€” a generator of AllocationCandidate <#openstack.placement.v1.allocation_candidate.AllocationCandidate> instances.

Allocations

class openstack.placement.v1._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

third time's the charm, same signature, still every single kwarg ๐Ÿ’œ

get_allocation(consumer) โ€” get allocations for a consumer.

  • Parameters
    • consumer โ€” the UUID of the consumer, or an Allocation <#openstack.placement.v1.allocation.Allocation> instance.
  • Returns โ€” an instance of Allocation <#openstack.placement.v1.allocation.Allocation> with all allocations for the given consumer.
  • Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no allocations for the consumer could be found. ๐Ÿ˜ญ

update_allocation(consumer, **attrs) โ€” set or update allocations for a consumer.

creates or replaces all allocation records for the consumer identified by consumer. and fr fr, if allocations already exist for this consumer they are replaced โ€” not merged, not patched, replaced. ๐Ÿ‘€

  • Parameters
    • consumer โ€” the UUID of the consumer, or an Allocation <#openstack.placement.v1.allocation.Allocation> instance.
    • attrs โ€” keyword arguments which will be used to update the Allocation <#openstack.placement.v1.allocation.Allocation>, comprised of the properties on the Allocation class. at a minimum, allocations, project_id, and user_id must be provided when creating new allocations.
  • Returns โ€” the updated Allocation <#openstack.placement.v1.allocation.Allocation>.

create_allocations(allocations) โ€” create or update allocations for multiple consumers. multitasking queen ๐ŸŒˆ

  • Parameters
    • allocations โ€” a dict keyed by consumer UUID. each value must contain allocations, project_id, user_id, and consumer_generation; from microversion 1.38 consumer_type is also required. pass an empty allocations value for a consumer to remove all of their allocations.
  • Returns โ€” None
  • Raises โ€” ConflictException <#openstack.exceptions.ConflictException> if any resource provider or consumer generation does not match, or if there is insufficient inventory. ๐Ÿ’€

delete_allocation(consumer, ignore_missing=True) โ€” delete all allocations for a consumer.

  • Parameters
    • consumer โ€” the UUID of the consumer, or an Allocation <#openstack.placement.v1.allocation.Allocation> instance.
  • ignore_missing โ€” set it to False and a NotFoundException <#openstack.exceptions.NotFoundException> gets raised when there are literally no allocations for the consumer. Set it to True and no exception gets raised when you try to delete allocations for a consumer that has none. ๐Ÿซถ

Returns โ€” None

โœจ Usages โœจ

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

usages(project_id, user_id=None, consumer_type=None) โ€” gives you a generator of resource usages for a project. Each yielded Usage <#openstack.placement.v1.usage.Usage> is one consumer type and contains the total resource consumption by consumers of that type inside the given project. ๐Ÿ’–

Parameters

  • project_id โ€” the UUID of the project you're reporting usage for.
  • user_id โ€” the UUID of the user to filter by even more. Optional.
  • consumer_type โ€” the consumer type to filter by. Optional; requires placement microversion 1.38 or later.

Returns โ€” a generator of Usage <#openstack.placement.v1.usage.Usage> instances.

๐ŸŽ€ Resource Classes ๐ŸŽ€

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

create_resource_class(**attrs) โ€” creates a brand-new resource class from attributes. โœจ

Parameters

  • attrs โ€” keyword arguments used to create a ResourceClass <#openstack.placement.v1.resource_class.ResourceClass>, made up of the properties on the ResourceClass class.

Returns โ€” the results of resource class creation.


delete_resource_class(resource_class, ignore_missing=True) โ€” deletes a resource class. ๐Ÿ’…

Parameters

  • resource_class โ€” the value can be either the ID of a resource class or an ResourceClass <#openstack.placement.v1.resource_class.ResourceClass> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource class does not exist. When set to True, no exception will be set when attempting to delete a nonexistent resource class.

Returns โ€” None


update_resource_class(resource_class, **attrs) โ€” updates a resource class. ๐Ÿฆ‹

Parameters

  • resource_class โ€” the value can be either the ID of a resource class or an ResourceClass <#openstack.placement.v1.resource_class.ResourceClass> instance.
  • attrs โ€” the attributes to update on the resource class represented by resource_class.

Returns โ€” the updated resource class.


get_resource_class(resource_class) โ€” gets a single resource_class. ๐Ÿ”ฅ

Parameters

  • resource_class โ€” the value can be either the ID of a resource class or an ResourceClass <#openstack.placement.v1.resource_class.ResourceClass> instance.

Returns โ€” an instance of ResourceClass <#openstack.placement.v1.resource_class.ResourceClass>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource class matching the criteria could be found.


resource_classes(**query) โ€” retrieves a generator of resource classs. Yes, that's the word in the docs โ€” we're keeping it, bestie ๐Ÿ˜ญ

Parameters

  • query โ€” optional query parameters sent to restrict the resource classs to be returned.

Returns โ€” a generator of resource class instances.

๐Ÿ’… Resource Providers ๐Ÿ’…

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None,
       service_name=None, interface=None, region_name=None,
       endpoint_override=None, version=None, auth=None, user_agent=None,
       connect_retries=None, logger=None, allow=None, additional_headers=None,
       client_name=None, client_version=None, allow_version_hack=None,
       global_request_id=None, min_version=None, max_version=None,
       default_microversion=None, status_code_retries=None,
       retriable_status_codes=None, raise_exc=None, rate_limit=None,
       concurrency=None, connect_retry_delay=None,
       status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
       prometheus_counter=None, prometheus_histogram=None,
       influxdb_config=None, influxdb_client=None)

create_resource_provider(**attrs) โ€” creates a new resource provider from attributes. ๐ŸŽ€

Parameters

  • attrs โ€” keyword arguments used to create a ResourceProvider <#openstack.placement.v1.resource_provider.ResourceProvider>, made up of the properties on the ResourceProvider class.

Returns โ€” the results of resource provider creation.


delete_resource_provider(resource_provider, ignore_missing=True) โ€” deletes a resource provider. โญ

Parameters

  • resource_provider โ€” the value can be either the ID of a resource provider or an ResourceProvider <#openstack.placement.v1.resource_provider.ResourceProvider> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource provider does not exist. When set to True, no exception will be set when attempting to delete a nonexistent resource provider.

Returns โ€” None


update_resource_provider(resource_provider, **attrs) โ€” updates a resource provider. ๐ŸŒธ

Parameters

  • resource_provider โ€” the value can be either the ID of a resource provider or an ResourceProvider <#openstack.placement.v1.resource_provider.ResourceProvider> instance.
  • attrs โ€” the attributes to update on the resource provider represented by resource_provider.

Returns โ€” the updated resource provider.


get_resource_provider(resource_provider) โ€” gets a single resource_provider. ๐Ÿ”ฅ

Parameters

  • resource_provider โ€” the value can be either the ID of a resource provider or an ResourceProvider <#openstack.placement.v1.resource_provider.ResourceProvider> instance.

Returns โ€” an instance of ResourceProvider <#openstack.placement.v1.resource_provider.ResourceProvider>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource provider matching the criteria could be found.


find_resource_provider(name_or_id, ignore_missing=True) โ€” finds a single resource_provider. ๐Ÿซถ

Parameters

  • name_or_id โ€” the name or ID of a resource provider.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns โ€” an instance of ResourceProvider <#openstack.placement.v1.resource_provider.ResourceProvider>

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when no resource provider matching the criteria could be found.


resource_providers(**query) โ€” retrieves a generator of resource providers. ๐Ÿ’œ

Parameters

  • query โ€” optional query parameters sent to restrict the resource providers to be returned.

Returns โ€” a generator of resource provider instances.


get_resource_provider_aggregates(resource_provider) โ€” gets a list of aggregates for a resource provider. ๐ŸŒˆ

โš ๏ธ Deprecated since version 4.14.0: use fetch_resource_provider_aggregates() instead. ๐Ÿ’…

Okay so set_resource_provider_aggregates(resource_provider, *aggregates) is the one that updates aggregates for a resource provider. Very โ€œnew phone who disโ€ energy for aggregates.

Parameters

  • resource_provider โ€” the value can be either the ID of a resource provider or an ResourceProvider instance (openstack.placement.v1.resource_provider.ResourceProvider). ๐Ÿซถ
  • aggregates โ€” a list of aggregates. Heads up bestie: these aggregates will replace all aggregates currently present. Itโ€™s a full reset, not a little touch-up. โœจ

Returns

An instance of ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) with the aggregates attribute populated with the updated value. Obsessed, honestly. ๐Ÿ’–

Raises

NotFoundException (openstack.exceptions.NotFoundException) when no resource provider matching the criteria could be found. Rude but fair. ๐Ÿ˜ญ


fetch_resource_provider_usages(resource_provider)

Fetch usages for a specific resource provider. Itโ€™s giving โ€œso how much are you actually using, bestie?โ€ ๐Ÿ”

Parameters

resource_provider โ€” the value can be either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance.

Returns

An instance of ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) with the usages attribute populated. Slay. โœจ

Raises

NotFoundException (openstack.exceptions.NotFoundException) when no resource provider matching the criteria could be found. ๐Ÿ’€


๐Ÿ’– Resource Provider Allocations ๐Ÿ’–

The proxy class is literally this whole mood:

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

resource_provider_allocations(resource_provider, **query)

Retrieve a generator of resource provider allocations. Generator, not a list โ€” keep that in mind, bestie. ๐ŸŒ€

Parameters

  • resource_provider โ€” either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of resource provider inventory allocations. ๐Ÿ’ซ


๐ŸŽ€ Resource Provider Inventories ๐ŸŽ€

Same proxy class, same big signature, still iconic:

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

create_resource_provider_inventory(resource_provider, resource_class, *, total, **attrs)

Create a new resource provider inventory from attributes. New inventory just dropped. ๐Ÿ›๏ธ

Parameters

  • resource_provider โ€” either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance.
  • resource_class โ€” the value can be either the ID of a resource class or an ResourceClass (openstack.placement.v1.resource_class.ResourceClass) instance.
  • total โ€” the actual amount of the resource that the provider can accommodate. The real number, no cap. ๐Ÿ”ข
  • attrs โ€” keyword arguments which will be used to create a ResourceProviderInventory (openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory), comprised of the properties on the ResourceProviderInventory class.

Returns

The results of resource provider inventory creation. ๐Ÿ’…

delete_resource_provider_inventory(resource_provider_inventory, resource_provider=None, ignore_missing=True)

Delete a resource provider inventory. Bye-bye, inventory bestie. ๐Ÿ‘‹

Parameters

  • resource_provider_inventory โ€” the value can be either the ID of a resource provider or an ResourceProviderInventory (openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory) instance.
  • resource_provider โ€” either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance. This value must be specified when resource_provider_inventory is an ID.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource provider inventory does not exist. When set to True, no exception will be set when attempting to delete a nonexistent resource provider inventory. ๐Ÿซถ

Returns

None.

update_resource_provider_inventory(resource_provider_inventory, resource_provider=None, *, resource_provider_generation=None, **attrs)

Update a resource providerโ€™s inventory. Little refresh, but make it API. โœจ

Parameters

  • resource_provider_inventory โ€” the value can be either the ID of a resource provider inventory or an ResourceProviderInventory (openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory) instance.
  • resource_provider โ€” either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance. This value must be specified when resource_provider_inventory is an ID.

Attrs kwargs

The attributes to update on the resource provider inventory represented by resource_provider_inventory. ๐ŸŽ€

Returns

The updated resource provider inventory.

get_resource_provider_inventory(resource_provider_inventory, resource_provider=None)

Get a single resource_provider_inventory. One inventory, no group chat. ๐Ÿ’…

Parameters

  • resource_provider_inventory โ€” the value can be either the ID of a resource provider inventory or an ResourceProviderInventory (openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory) instance.
  • resource_provider โ€” either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance. This value must be specified when resource_provider_inventory is an ID.

Returns

An instance of ResourceProviderInventory (openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory).

Raises

NotFoundException (openstack.exceptions.NotFoundException) when no resource provider inventory matching the criteria could be found. ๐Ÿ˜ญ

resource_provider_inventories(resource_provider, **query)

Retrieve a generator of resource provider inventories. Again: generator, not a list. ๐ŸŒ€

Parameters

  • resource_provider โ€” either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance.
  • query โ€” optional query parameters to be sent to limit the resources being returned.

Returns

A generator of resource provider inventory instances. ๐Ÿ’–

set_resource_provider_inventories(resource_provider, inventories, resource_provider_generation)

Replace all inventories for a resource provider in a single request. Big main character move: one request, all the inventories. ๐Ÿ‘‘

Parameters

  • resource_provider โ€” the value can be either the ID of a resource provider or a ResourceProvider (openstack.placement.v1.resource_provider.ResourceProvider) instance.
  • inventories โ€” A dict mapping resource class names to inventory configuration dicts (keys: total, and optionally allocation_ratio, max_unit, min_unit, reserved, step_size). Pass an empty dict to remove all inventories. ๐Ÿ—‚๏ธ
  • resource_provider_generation โ€” The current generation of the resource provider, used to detect concurrent updates. ๐Ÿ”„

Returns โ€” The resource provider with its generation updated to reflect the new state. โœจ

Raises โ€” ConflictException if the generation does not match or allocations prevent removal. ๐Ÿ’ฅ

  • delete_resource_provider_inventories(resource_provider) โ€” Delete all inventory records for a resource provider. ๐Ÿงน
    • Parameters
      • resource_provider โ€” The value can be either the ID of a resource provider or a ResourceProvider instance.
    • Returns โ€” None
    • Raises โ€” ConflictException if there are active allocations against the resource provider. ๐Ÿ˜ฌ

โœจ Traits โœจ

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • create_trait(name) โ€” Create a new trait. ๐ŸŒฑ
    • Parameters
      • name โ€” The name of the new trait.
    • Returns โ€” The results of trait creation.
  • delete_trait(trait, ignore_missing=True) โ€” Delete a trait. ๐Ÿซก
    • Parameters
      • trait โ€” The value can be either the ID of a trait or a Trait instance.
      • ignore_missing โ€” When set to False, NotFoundException will be raised when the resource provider inventory does not exist. When set to True, no exception will be set when attempting to delete a nonexistent resource provider inventory.
    • Returns โ€” None
  • get_trait(trait) โ€” Get a single trait. ๐Ÿ”
    • Parameters
      • trait โ€” The value can be either the ID of a trait or a Trait instance.
    • Returns โ€” An instance of ResourceProviderInventory
    • Raises โ€” NotFoundException when no trait matching the criteria could be found.
  • traits(**query) โ€” Retrieve a generator of traits. ๐ŸŽ
    • Parameters
      • query โ€” Optional query parameters to be sent to limit the resources being returned.
    • Returns โ€” A generator of trait objects.

๐Ÿ’œ Resource Provider Trait ๐Ÿ’œ

class openstack.placement.v1._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_resource_provider_trait(resource_provider) โ€” Get a resource providerโ€™s trait. ๐Ÿงš
    • Parameters
      • resource_provider โ€” The value can be either the ID of a resource provider or an instance of ResourceProviderTrait.
    • Returns โ€” An instance of ResourceProviderTrait.
  • set_resource_provider_trait(resource_provider_trait, **attrs) โ€” Update a resource providerโ€™s trait. ๐Ÿ› ๏ธ
    • Parameters
      • resource_provider_trait โ€” An instance of ResourceProviderTrait.
    • Attrs kwargs โ€” The attributes to update on the resource provider trait represented by resource_provider_trait.
    • Returns โ€” The updated resource provider trait.
  • delete_resource_provider_trait(resource_provider, ignore_missing=True) โ€” Dissociate all traits from a resource provider. โœ‚๏ธ
    • Parameters
      • resource_provider โ€” The value can be either the ID of a resource provider or a ResourceProvider instance.
      • ignore_missing โ€” When set to False, NotFoundException will be raised when the resource provider does not exist. When set to True, no exception will be raised when attempting to delete traits for a nonexistent resource provider.
    • Returns โ€” None

๐Ÿฆ‹ Shared File System API ๐Ÿฆ‹

๐ŸŽ€ The Shared File System Class ๐ŸŽ€

The high-level interface for accessing the shared file systems service API is available through the shared_file_system member of a Connection object. The shared_file_system member will only be added if the service is detected. share is an alias of the shared_file_system member. ๐Ÿ’–


๐ŸŒˆ Availability Zone Operation ๐ŸŒˆ

Interact with Availability Zones supported by the Shared File Systems service. ๐ŸŒ

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • availability_zones() โ€” Retrieve shared file system availability zones. ๐Ÿ—บ๏ธ
    • Returns โ€” A generator of availability zone resources.

๐ŸŒธ Limit Operations ๐ŸŒธ

Get absolute limits of resources supported by the Shared File Systems service. ๐Ÿ“

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • limits(**query) โ€” Lists all share limits. ๐Ÿ“‹
    • Parameters
      • query โ€” Optional query parameters to be sent to limit the share limits being returned.
    • Returns โ€” A generator of manila share limits resources.

โญ Quota Class Set Operations โญ

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  • get_quota_class_set(quota_class_set) โ€” Get quota class set. ๐ŸŽŸ๏ธ
    • Parameters
      • quota_class_set โ€” The name of the quota class or a QuotaClassSet instance.
    • Returns โ€” A QuotaClassSet.

update_quota_class_set(quota_class_set, **attrs)

okay so this one updates a quota class set. Parameters:

  • quota_class_set โ€” The name of the quota class ๐Ÿ’…
  • attrs โ€” The attributes to update on the quota class set โœจ

Returns: the updated quota class set ๐Ÿซถ


๐Ÿ’– Quota Set Operations ๐Ÿ’–

bestie, this is the quota-set corner of the proxy. same iconic class signature, no cap:

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

get_quota_set(project, **query)

Retrieves a specific metadata item for the Quota Set. yes that is literally what it says, and we respect it ๐Ÿ’ซ

Returns: A QuotaSets ๐ŸŒธ

update_quota_set(project, **attrs)

Updates details of a quota set. slay, let's edit.

Parameters:

  • project โ€” ID or instance of Project <#openstack.identity.v3.project.Project> of the project for which the quota should be updated. ๐Ÿ‘‘
  • attrs โ€” The attributes to update on the quota set. โœจ

Returns: The updated quota set ๐Ÿ’–

revert_quota_set(project)

Reset quota set for a project. it's giving "undo button" energy.

Parameters:

  • project โ€” ID or instance of Project <#openstack.identity.v3.project.Project> of the project for which the quota should be reset. ๐ŸŒ€

Returns: None ๐Ÿซถ


๐ŸŒˆ Service Operations ๐ŸŒˆ

Interact with services supported by the Shared File Systems service. main character service-management moment.

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

services(**query)

Lists all services. cute. let's see what's running.

Parameters:

  • query โ€” Optional query parameters to be sent to limit the services being returned. Available parameters include:
    • host: The service host name.
    • binary: The service binary name.
    • zone: The availability zone.
    • state: The current state of the service. A valid value is up or down.
    • status: The service status, which is enabled or disabled.

Returns: A generator of manila service resources. ๐Ÿฆ‹

disable_service(service, host, binary, *, disable_reason=None)

Disable a service. not me hitting the off switch ๐Ÿ’€

Parameters:

  • service โ€” Either the ID of a service or a Service <#openstack.shared_file_system.v2.service.Service> instance.
  • host โ€” The host where service runs.
  • binary โ€” The name of service.
  • disable_reason โ€” The reason for disabling the service.

Returns: Updated service instance ๐ŸŒธ

enable_service(service, host, binary)

Enable a service. and we're back on, periodt โœจ

Parameters:

  • service โ€” Either the ID of a service or a Service <#openstack.shared_file_system.v2.service.Service> instance.
  • host โ€” The host where service runs.
  • binary โ€” The name of service.

Returns: Updated service instance ๐Ÿ’–

ensure_shares_service(host)

Run ensure shares on a back end. very "go check on the shares" of it all.

Parameters:

  • host โ€” The host to run ensure shares on.

๐ŸŽ€ Share Operations ๐ŸŽ€

Interact with Shares supported by the Shared File Systems service. this is the share girlie section fr fr.

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

shares(details=True, **query)

Lists all shares with details. obsessed with a detailed list ๐Ÿ’…

Parameters:

  • query โ€” Optional query parameters to be sent to limit the shares being returned. Available parameters include:
    • status: Filters by a share status
    • share_server_id: The UUID of the share server.
    • metadata: One or more metadata key and value pairs as a url encoded dictionary of strings.
    • extra_specs: The extra specifications as a set of one or more key-value pairs.
    • share_type_id: The UUID of a share type to query resources by.
    • name: The user defined name of the resource to filter resources by.
    • snapshot_id: The UUID of the share's base snapshot to filter the request based on.
    • host: The host name of the resource to query with.
    • share_network_id: The UUID of the share network to filter resources by.
    • project_id: The ID of the project that owns the resource.
    • is_public: A boolean query parameter that, when set to true, allows retrieving public resources that belong to all projects.
    • share_group_id: The UUID of a share group to filter resource.
    • export_location_id: The export location UUID that can be used to filter shares or share instances.
    • export_location_path: The export location path that can be used to filter shares or share instances.
    • name~: The name pattern that can be used to filter shares, share snapshots, share networks or share groups.
    • description~: The description pattern that can be used to filter shares, share snapshots, share networks or share groups.
    • with_count: Whether to show count in API response or not, default is False.
    • limit: The maximum number of shares to return.
    • offset: The offset to define start point of share or share group listing.
    • sort_key: The key to sort a list of shares.
    • sort_dir: The direction to sort a list of shares. A valid value is asc, or desc.

Returns: Details of shares resources ๐ŸŒŸ

find_share(name_or_id, ignore_missing=True, **query)

Find a single share. detective mode: activated ๐Ÿ”

Parameters:

  • name_or_id โ€” The name or ID of a share.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. ๐Ÿซถ
  • query โ€” Any additional parameters to be passed into underlying methods. such as query filters.

Returns: One Share <#openstack.shared_file_system.v2.share.Share> or None ๐Ÿฆ‹

get_share(share)

Lists details of a single share. just one little share, as a treat.

Parameters:

  • share โ€” The value can be the ID of a share or a Share <#openstack.shared_file_system.v2.share.Share> instance.

Returns: Details of the identified share ๐Ÿ’–

delete_share(share, ignore_missing=True, *, force=False)

Deletes a single share. okay bye bestie ๐Ÿ‘‹

Parameters:

  • share โ€” The value can be either the ID of a share or a Share <#openstack.shared_file_system.v2.share.Share> instance.
  • ignore_missing โ€” set this to False and you'll get a NotFoundException <#openstack.exceptions.NotFoundException> thrown at you whenever the share doesn't exist. Set it to True and it justโ€ฆ doesn't care. No exception when you try to delete a share that isn't there. Honestly? Self-care. ๐Ÿ’…
    • force โ€” set to True and the share deletion gets forced immediately. No waiting around, no queuing, just yeet. ๐Ÿ”ฅ

Returns โ€” None

update_share(share, **attrs)

Updates the details of a single share. Glow-up time โœจ

Parameters

  • share โ€” the ID of the share you're updating
  • attrs โ€” the attributes you want to update on that share

Returns โ€” the updated share, looking all fresh ๐ŸŽ€

create_share(**attrs)

Makes a brand new share out of attributes. Baby's first share, so proud ๐Ÿฅน

Parameters

  • attrs โ€” the attributes used to create a Shares, made up of the properties on the Shares class. Important one, bestie: size and share are required to create a share. No cap.

Returns โ€” the details of the new share ๐Ÿ’–

revert_share_to_snapshot(share, snapshot)

Reverts a share back to the snapshot you specify โ€” and heads up, it has to be the most recent snapshot known to manila. The way it's gotta be the latest one, no exceptions ๐Ÿ‘‘

Parameters

  • share โ€” the ID of the share to revert
  • snapshot โ€” the ID of the snapshot to revert to

Returns โ€” the result of the revert

manage_share(protocol, export_path, service_host, **params)

Manages a share. Very "adopting a stray" energy ๐Ÿพ

Parameters

  • protocol โ€” the shared file systems protocol of this share
  • export_path โ€” the export path, formatted according to the protocol
  • service_host โ€” the manage-share service host
  • params โ€” optional parameters to be sent. The available ones are:
    • name: the user defined name of the resource.
    • share_type: the name or ID of the share type to be used to create the resource.
    • driver_options: a set of one or more key and value pairs, as a dictionary of strings, that describe driver options.
    • is_public: the level of visibility for the share.
    • description: the user defiend description of the resource. (yes that typo is theirs, we keep it ๐Ÿ’€)
    • share_server_id: the UUID of the share server.

Returns โ€” the share that was managed ๐Ÿซถ

unmanage_share(share)

Unmanages the share with the given share ID. Letting it go, it's not you it's me ๐Ÿ˜ญ

Parameters

  • share โ€” the ID of the share to unmanage

Returns โ€” None

resize_share(share, new_size, no_shrink=False, no_extend=False, force=False)

Resizes a share, extending or shrinking it as needed. Growth arc, or shrinkage arc, either way ๐ŸŒธ

Parameters

  • share โ€” the ID of the share to resize
  • new_size โ€” the new size of the share, in GiBs. If new_size is the same as the current size, then literally nothing happens. Nothing. Zip.
  • no_shrink โ€” if set to True, the given share is not shrunk, even if shrinking is required to get it to the given size. Useful for extending shares up to a minimum size while not shrinking shares down to the given size. Defaults to False.
  • no_extend โ€” if set to True, the given share is not extended, even if extending is required to get it to the given size. Useful for shrinking shares down to a maximum size while not extending smaller shares up to that maximum. Defaults to False.
  • force โ€” whether or not force should be used, in the case where the share should be extended.

Returns โ€” None

soft_delete_share(share)

Soft deletes a share. Gentle deletion. Soft launch into the void ๐Ÿฆ‹

Parameters

  • share โ€” the value can be either the ID of a share or a Share <#openstack.shared_file_system.v2.share.Share> instance.

Returns โ€” None

restore_share(share)

Restores the share with the given share ID. Bringing it back, main character return arc ๐Ÿ‘‘

Parameters

  • share โ€” the value can be either the ID of a share or a Share <#openstack.shared_file_system.v2.share.Share> instance.

Returns โ€” None

reset_share_status(share, status)

Resets a share to the status you specify. Factory reset but make it cloud โ˜๏ธ

Parameters

  • share โ€” the ID of the share or the share object to reset
  • status โ€” the status to reset the share to. Possible values include: available, error, and invalid.

Returns โ€” None


๐Ÿ” Share Access Rule Operations ๐Ÿ”

Create, View, and Delete access rules for shares from the Shared File Systems service. Access rules can also have their deletion and visibility restricted during creation. A lock reason can also be specified. And the deletion restriction can be removed during the access removal. So many little knobs, we love a configurable queen ๐ŸŽ€

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

access_rules(share, **query)

Lists the access rules on a share. Read the room, read the rules ๐Ÿ“‹

Returns โ€” a generator of the share access rules

get_access_rule(access_rule)

Lists details of an access rule. Getting the full dossier ๐Ÿ”

Parameters

  • access_rule โ€” the value can be the ID of an access rule or a ShareAccessRule <#openstack.shared_file_system.v2.share_access_rule.ShareAccessRule> instance.

Returns โ€” the details of the identified access rule

create_access_rule(share, **attrs)

Creates an access rule from attributes. New rule just dropped โœจ

Parameters

  • share โ€” the ID of the share
  • attrs โ€” the attributes used to create a ShareAccessRules, made up of the properties on the ShareAccessRules class.

Returns โ€” the details of the new access rule

delete_access_rule(access_rule, share, ignore_missing=True, *, unrestrict=False)

Deletes an access rule. Bye bestie ๐Ÿ‘‹

Parameters

  • access_rule โ€” the value can be either the ID of an access rule or a ShareAccessRule <#openstack.shared_file_system.v2.share_access_rule.ShareAccessRule> instance.
  • share โ€” the ID of the share.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the access rule does not exist. When set to True, no exception will be set when attempting to delete a nonexistent access rule. (Default is True, so it's forgiving by default, love that for you ๐Ÿ’œ)
  • unrestrict โ€” if Manila must attempt removing locks while deleting.

Returns โ€” requests.models.Response HTTP response from the internal requests client


๐Ÿ‘ฏ Share Group Operations ๐Ÿ‘ฏ

Interact with Share groups supported by the Shared File Systems service. Squad goals, but storage โ˜๏ธ๐Ÿ’–

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

share_groups(**query)

Lists all share groups. Roll call! ๐Ÿ—ฃ๏ธ

Parameters

  • query โ€” optional query parameters to send along to limit the share groups being returned. The available ones are:
    • status: filters by a share group status.
    • name: the user defined name of the resource to filter resources by.
    • description: the user defined description text that can be used to filter resources.
    • project_id: the project ID of the user or service.
  • share_server_id โ€” the UUID of the share server ๐Ÿ–ฅ๏ธ
    • snapshot_id โ€” the UUID of the share's base snapshot, so you can filter the request based on it ๐Ÿ“ธ
    • host โ€” the host name for the back end ๐Ÿ 
    • share_network_id โ€” the UUID of the share network you wanna filter resources by ๐ŸŒ
    • share_group_type_id โ€” the share group type ID, used to filter share groups ๐Ÿ—‚๏ธ
    • share_group_snapshot_id โ€” the source share group snapshot ID, for listing the share group ๐Ÿ’ซ
    • share_types โ€” a list of one or more share type IDs. Lets you filter share groups โœจ
    • limit โ€” the max number of share groups members to return ๐Ÿ”ข
    • offset โ€” the offset that defines the start point of the share or share group listing ๐Ÿ“
    • sort_key โ€” the key to sort a list of shares ๐Ÿ”‘
    • sort_dir โ€” the direction to sort a list of shares โ†•๏ธ
    • name~ โ€” the name pattern you can use to filter shares, share snapshots, share networks or share groups ๐Ÿ”
    • description~ โ€” the description pattern you can use to filter shares, share snapshots, share networks or share groups ๐Ÿ“

Returns

A generator of manila share group resources ๐Ÿ’–


get_share_group(share_group)

Lists details for a share group. Like, the full tea ๐Ÿ‘€

Parameters

  • share_group โ€” the value can be the ID of a share group or a ShareGroup <#openstack.shared_file_system.v2.share_group.ShareGroup> instance.

Returns

Details of the identified share group โœจ


find_share_group(name_or_id, ignore_missing=True)

Finds a single share group. Just the one. No cap ๐ŸŽฏ

Parameters

  • name_or_id โ€” the name or ID of a share group.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised if the resource doesn't exist. When it's True, None gets returned instead when you try to find a resource that isn't there ๐Ÿ™ˆ

Returns

One ShareGroup <#openstack.shared_file_system.v2.share_group.ShareGroup> or None


create_share_group(**attrs)

Creates a share group from attributes. Build-a-group workshop ๐Ÿ› ๏ธ

Returns

Details of the new share group ๐ŸŽ€


update_share_group(share_group, **attrs)

Updates details of a single share group. Glow-up time ๐Ÿ’…

Parameters

  • share_group โ€” the ID of the share group

Returns

Updated details of the identified share group โœจ


delete_share_group(share_group, ignore_missing=True)

Deletes a single share group. Gone, bye ๐Ÿ‘‹

Parameters

  • share_group โ€” the value can be either the ID of a share group or a ShareGroup <#openstack.shared_file_system.v2.share_group.ShareGroup> instance.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the share group doesn't exist. When it's True, no exception gets set when you try to delete a share group that isn't there ๐Ÿ’€

Returns

The deleted share group.


๐Ÿฆ‹ Share Group Snapshot Operations ๐Ÿฆ‹

Interact with Share Group Snapshots by the Shared File Systems service. Literally its whole job ๐Ÿ’œ

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

share_group_snapshots(details=True, **query)

Lists all share group snapshots. The whole collection, bestie ๐Ÿ—ƒ๏ธ

Parameters

query โ€”

Optional query parameters that get sent along to limit the share group snapshots being returned. The available parameters include:

  • project_id โ€” the ID of the project that owns the resource ๐Ÿท๏ธ
  • name โ€” the user defined name of the resource, for filtering resources ๐Ÿ”
  • description โ€” the user defined description text that can be used to filter resources ๐Ÿ“
  • status โ€” filters by a share status ๐Ÿšฆ
  • share_group_id โ€” the UUID of a share group to filter resource ๐Ÿ†”
  • limit โ€” the max number of share group snapshot members to return ๐Ÿ”ข
  • offset โ€” the offset that defines the start point of the share or share group listing ๐Ÿ“
  • sort_key โ€” the key to sort a list of shares ๐Ÿ”‘
  • sort_dir โ€” the direction to sort a list of shares. A valid value is asc, or desc โ†•๏ธ

Returns

Details of share group snapshots resources โœจ


get_share_group_snapshot(group_snapshot)

Show share group snapshot details. Spill the details, honestly ๐Ÿ‘€

Parameters

  • group_snapshot โ€” the value can be the ID of a share group snapshot or a ShareGroupSnapshot <#openstack.shared_file_system.v2.share_group_snapshot.ShareGroupSnapshot> instance.

Returns

Details of the group snapshot ๐Ÿ’–


create_share_group_snapshot(share_group, **attrs)

Creates a point-in-time snapshot copy of a share group. Freeze frame, but make it storage ๐Ÿ“ธ

Parameters

  • share_group โ€” ID of the share group to have the snapshot taken.
  • attrs โ€” attributes which will be used to create a ShareGroupSnapshots,

Returns

Details of the new snapshot ๐ŸŽ€


reset_share_group_snapshot_status(group_snapshot, status)

Reset share group snapshot state. Ctrl+Z for the state machine, kinda ๐Ÿ”„

Parameters

  • group_snapshot โ€” the ID of the share group snapshot to reset
  • status โ€” the state of the share group snapshot to be set, a valid value is "creating", "error", "available", "deleting", "error_deleting".

update_share_group_snapshot(group_snapshot, **attrs)

Updates a share group snapshot โœจ

Parameters

  • group_snapshot โ€” the ID of the share group snapshot to update
  • attrs โ€” the attributes to update on the share group snapshot

Returns

the updated share group snapshot ๐Ÿ’…


delete_share_group_snapshot(group_snapshot, ignore_missing=True)

Deletes a share group snapshot. Yeet ๐Ÿ—‘๏ธ

Parameters

  • group_snapshot โ€” the value can be either the ID of a share group snapshot or a ShareGroupSnapshot <#openstack.shared_file_system.v2.share_group_snapshot.ShareGroupSnapshot> instance.
  • ignore_missing โ€” when it's set to False, NotFoundException <#openstack.exceptions.NotFoundException> gets raised when the share group snapshot doesn't exist. When it's True, no exception gets set when you try to delete a share group snapshot that isn't there ๐Ÿ’€

Returns

None


๐Ÿ‘‘ Share Instance Operations ๐Ÿ‘‘

Admins can list, show information for, explicitly set the state of, and force-delete share instances within the Shared File Systems Service. Admin business only, fr fr ๐Ÿ”

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

share_instances(**query)

Lists all share instances ๐Ÿ“‹

Parameters

query โ€”

Optional query parameters that get sent along to limit the share instances being returned. The available parameters include:

  • export_location_id โ€” the export location UUID that can be used to filter share instances ๐Ÿ†”
  • export_location_path โ€” the export location path that can be used to filter share instances ๐Ÿ›ค๏ธ

Returns

Details of share instances resources โœจ


get_share_instance(share_instance)

Shows details for a single share instance ๐Ÿ‘€

Parameters

  • share_instance โ€” the value can be the UUID of a share instance or a ShareInstance instance. ๐Ÿฆ‹

Returns โ€” Details of the identified share instance

reset_share_instance_status(share_instance, status)

Explicitly updates the state of a share instance. ๐Ÿ’…

Parameters

  • share_instance โ€” The UUID of the share instance to reset.
  • status โ€” The share or share instance status to be set.

Returns โ€” None

delete_share_instance(share_instance, ignore_missing=True)

Force-deletes a share instance ๐Ÿ˜ญ๐Ÿ’ฅ

Parameters

  • share_instance โ€” The value can be either the ID of a share instance or a ShareInstance instance.
  • ignore_missing โ€” When set to False NotFoundException will be raised when the share instance does not exist. When set to True, no exception will be set when attempting to delete a nonexistent share instance.

Returns โ€” None


๐ŸŒธ Share Metadata Operations โœจ

List, Get, Create, Update, and Delete metadata for shares from the Shared File Systems service. ๐ŸŽ€

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

get_share_metadata(share)

Lists all metadata for a share. ๐Ÿงš

๐Ÿšจ Deprecated since version 4.14.0: Use fetch_share_metadata() instead.

get_share_metadata_item(share, key)

Retrieves a specific metadata item from a share by its key. ๐Ÿ”‘

๐Ÿšจ Deprecated since version 4.14.0: Use fetch_share_metadata_item() instead.

create_share_metadata(share, **metadata)

Creates share metadata as key-value pairs. ๐Ÿ’–

๐Ÿšจ Deprecated since version 4.14.0: Use set_share_metadata() instead.

update_share_metadata(share, metadata, replace=False)

Updates metadata of given share. โœจ

๐Ÿšจ Deprecated since version 4.14.0: Use set_share_metadata() instead.

delete_share_metadata(share, keys, ignore_missing=True)

Deletes metadata for a share. ๐Ÿซถ

Parameters

  • share โ€” The value can be either the ID of a share or a Share instance.
  • keys โ€” The list of share metadata keys to be deleted.
  • ignore_missing โ€” When set to True, missing keys will be logged but not cause a failure. When set to False, missing keys will be included in the failure list.

Returns โ€” None


๐Ÿ’œ Share Network Operations ๐ŸŒˆ

Create and manipulate Share Networks with the Shared File Systems service. ๐Ÿ‘‘

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

share_networks(details=True, **query)

Lists all share networks with details. ๐Ÿฆ‹

Parameters

  • query โ€” Optional query parameters to be sent to limit the resources being returned. Available parameters include:
    • name~: The user defined name of the resource to filter resources by.
    • project_id: The ID of the user or service making the request.
    • description~: The description pattern that can be used to filter shares, share snapshots, share networks or share groups.
    • all_projects: (Admin only). Defines whether to list the requested resources for all projects.

Returns โ€” Details of shares networks

get_share_network(share_network)

Lists details of a single share network. ๐ŸŒธ

Parameters

  • share_network โ€” The value can be the ID of a share network or a ShareNetwork instance.

Returns โ€” Details of the identified share network

delete_share_network(share_network, ignore_missing=True)

Deletes a single share network. ๐Ÿ’€

Parameters

  • share_network โ€” The value can be either the ID of a share network or a ShareNetwork instance.
  • ignore_missing โ€” When set to False NotFoundException will be raised when the share network does not exist. When set to True, no exception will be set when attempting to delete a nonexistent share network.

Returns โ€” None

update_share_network(share_network, **attrs)

Updates details of a single share network. โœจ

Parameters

  • share_network โ€” The ID of the share network to update.
  • attrs โ€” The attributes to update on the share network.

Returns โ€” the updated share network

create_share_network(**attrs)

Creates a share network from attributes. ๐ŸŽ€

Returns โ€” Details of the new share network

Parameters

  • attrs โ€” Attributes which will be used to create a ShareNetwork,comprised of the properties on the ShareNetwork class.

๐Ÿฆ‹ Share Network Subnet Operations ๐Ÿ’…

Create and manipulate Share Network Subnets with the Shared File Systems service. โญ

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

share_network_subnets(share_network)

Lists all share network subnets with details. ๐ŸŒˆ

Parameters

  • share_network โ€” The id of the share network for which Share Network Subnets should be listed.

Returns โ€” A generator of manila share network subnets

get_share_network_subnet(share_network, share_network_subnet)

Lists details of a single share network subnet. ๐Ÿ”ฅ

Parameters

  • share_network โ€” The value can be the ID of a share network or a ShareNetwork instance.
  • share_network_subnet โ€” The value can be the ID of a share network subnet or a ShareNetworkSubnet instance.

Returns โ€” Details of the identified share network subnet

create_share_network_subnet(share_network, **attrs)

Creates a share network subnet from attributes. ๐Ÿงš

Parameters

  • share_network โ€” The id of the share network wthin which the the Share Network Subnet should be created.
  • attrs โ€” Attributes which will be used to create a share network subnet.

Returns โ€” Details of the new share network subnet.

delete_share_network_subnet(share_network, share_network_subnet, ignore_missing=True)

Deletes a share network subnet. ๐Ÿ’ฅ

Parameters

โ€ฆand the params it takes:

  • share_network โ€” ngl you can pass either the ID of a share network or an actual ShareNetwork instance, whichever you have lying around ๐Ÿ’…
  • share_network_subnet โ€” same energy: either the ID of a share network subnet or a ShareNetworkSubnet instance.
  • ignore_missing โ€” set this to False and boom, NotFoundException gets raised when the share network subnet doesn't exist. Set it to True and literally nothing happens when you try to delete a nonexistent share network subnet โ€” no exception, no drama, no cap.

Returns

None โ€” that's it, that's the whole return value, bestie ๐Ÿ’€


fetch_share_network_subnet_metadata(share_network, share_network_subnet)

Lists, like, all the metadata of a given share network subnet. Every last crumb ๐Ÿ“

Parameters

  • share_network โ€” the ID of a share network or a ShareNetwork instance.
  • share_network_subnet โ€” the ID of a share network subnet or a ShareNetworkSubnet instance.

Returns

Details of the identified share network subnet, including its metadata. Iconic.


fetch_share_network_subnet_metadata_item(share_network, share_network_subnet, key)

Retrieve one specific subnet metadata item, by key. Very "I know exactly what I'm looking for" of you โœจ

Parameters

  • share_network โ€” the ID of a share network or a ShareNetwork instance.
  • share_network_subnet โ€” the ID of a share network subnet or a ShareNetworkSubnet instance.
  • key โ€” the key of the Share Network Subnet Metadata.

Returns

A single metadata key and value pair. One (1) little guy ๐ŸŽ€


set_share_network_subnet_metadata(share_network, share_network_subnet, *, replace=False, **metadata)

Updates metadata of given share network subnet. Glow-up time ๐ŸŒธ

Parameters

  • share_network โ€” the ID of a share network or a ShareNetwork instance.
  • share_network_subnet โ€” the ID of a share network subnet or a ShareNetworkSubnet instance.
  • metadata โ€” the metadata to be created.

Returns

Details of the identified share network subnet.


delete_share_network_subnet_metadata(share_network, share_network_subnet, keys, ignore_missing=True)

Deletes one or more subnet metadata items, identified by their keys. Bye bestie ๐Ÿ‘‹

Parameters

  • share_network โ€” the ID of a share network or a ShareNetwork instance.
  • share_network_subnet โ€” the ID of a share network subnet or a ShareNetworkSubnet instance.
  • keys โ€” the keys of the metadata items to be deleted.

Returns

None โ€” nothing back, just vibes ๐Ÿซถ


๐ŸŒˆ Share Replica Operations ๐ŸŒˆ

Interact with share replicas, which the Shared File Systems service supports. Copies upon copies, we love redundancy ๐Ÿ’œ

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐Ÿ’ซ create_share_replica(share, **attrs)

Creates a share replica from attributes. New replica just dropped ๐Ÿ”ฅ

Parameters

  • share โ€” Id of the share for which share replica is to be created.
  • attrs โ€” optional attributes which will be used to create. Available parameters include:
    • availability_zone: availability zone in which replica should be created.

Returns

Details of the new share replica.


๐Ÿ’ซ share_replicas(**attrs)

List all share replicas with all details. The full tea โ˜•

Parameters

  • attrs โ€” optional parameters to limit the share replicas being returned. Available parameters include:
    • share_id: id of the share for which share replicas are wanted
    • columns: list of columns to be displayed in the returned list

Returns

A generator of share replicas.


๐Ÿ’ซ get_share_replica(share_replica)

List details of a single share replica. Just the one, main character style ๐Ÿ‘‘

Parameters

  • share_replica โ€” Id of the share replica.

Returns

Details of the identified share replica.


๐Ÿ’ซ delete_share_replica(share_replica, ignore_missing=True, force=False)

Delete a share replica. Gone, reduced to atoms ๐Ÿ’€

Parameters

  • share_replica โ€” Id of the share replica.

Returns

Result of delete on share replica.


๐Ÿ’ซ reset_share_replica_status(share_replica, status)

Reset status of the share replica. Factory reset but make it storage ๐Ÿงš

Parameters

  • share_replica โ€” Id of the share replica.
  • status โ€” set the status to the share replica. Possible values include: available, error, creating, deleting, or error_deleting.

Returns

None.


๐Ÿ’ซ reset_share_replica_state(share_replica, replica_state)

Reset replica_state of the share replica. Different reset, same energy โœจ

Parameters

  • share_replica โ€” Id of the share replica.
  • replica_state โ€” the replica state of a share replica. Possible values include: active, in_sync, out_of_sync, and error.

Returns

None.


๐Ÿ’ซ promote_share_replica(share_replica)

Promote share replica. Give it a lil promotion, it earned it ๐ŸŽ€

Parameters

  • share_replica โ€” Id of the share replica.

Returns

None.


๐Ÿ’ซ resync_share_replica(share_replica)

Resync share replica. Get it back in sync with the group chat ๐Ÿซถ

Parameters

  • share_replica โ€” Id of the share replica.

Returns

None.


๐Ÿฆ‹ Share Snapshot Operations ๐Ÿฆ‹

Interact with Share Snapshots, which the Shared File Systems service supports. Freeze frame, but for storage ๐Ÿ“ธ

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

๐ŸŒธ share_snapshots(details=True, **query)

Lists all share snapshots with details. All of them. Every single one ๐Ÿ’…

Parameters

  • query โ€” optional query parameters to be sent to limit the snapshots being returned. Available parameters include:
    • project_id: the ID of the user or service making the API request.

Returns

A generator of manila share snapshot resources.


๐ŸŒธ get_share_snapshot(snapshot)

Lists details of a single share snapshot. Spotlight on one ๐ŸŽค

Parameters

  • snapshot โ€” the value can be the ID of a share snapshot or a ShareSnapshot instance.

Returns

Details of the identified share snapshot.


๐ŸŒธ create_share_snapshot(**attrs)

Creates a share snapshot from attributes. New snapshot, who dis ๐Ÿ’–

Returns

Details of the new share snapshot.

update_share_snapshot(snapshot, **attrs)

Okay bestie, this is the little glow-up button for one share โœจ

Parameters

  • snapshot โ€” The ID of the snapshot to update
  • attrs โ€” The attributes to update on the snapshot

Returns: the updated share snapshot โ€” iconic ๐Ÿ’…


delete_share_snapshot(snapshot, ignore_missing=True, *, force=False)

Deletes a single share snapshot. Bye-bye, snapshot ๐Ÿซถ

Parameters

  • snapshot โ€” The value can be either the ID of a share snapshot or a ShareSnapshot instance (class path openstack.shared_file_system.v2.share_snapshot.ShareSnapshot).
  • ignore_missing โ€” When set to False, NotFoundException (class path openstack.exceptions.NotFoundException) will be raised when the share snapshot does not exist. When set to True, no exception will be set when attempting to delete a nonexistent share snapshot.
  • force โ€” When set to True, the share snapshot deletion will be forced immediately.

Returns: None

๐Ÿšจ Heads up: force=True means the deletion is forced immediately. No chill, no waiting around.

reset_share_snapshot_status(snapshot, status)

Reset status of share snapshot. A little reset era for your snapshot ๐ŸŒธ

Parameters

  • snapshot โ€” The ID of the snapshot or the snapshot object to reset
  • status โ€” The status of the snapshot to reset to.

Returns: None


manage_share_snapshot(share, provider_location, **params)

Manage a share snapshot. Bringing it under your wing ๐Ÿ’–

Parameters

  • share โ€” The ID of the share that has snapshot which should be managed.
  • provider_location โ€” Provider location of the snapshot on the backend.
  • params โ€” Optional parameters to be sent. Available parameters include:
    • name: The user defined name of the resource.
    • display_name: The user defined name of the resource. This field sets the name parameter.
    • description: The user defined description of the resource.
    • display_description: The user defined description of the resource. This field sets the description parameter.
    • driver_options: A set of one or more key and value pairs, as a dictionary of strings, that describe driver options.

Returns: The share snapshot that was managed.


unmanage_share_snapshot(snapshot)

Unmanage the share snapshot with the given snapshot ID. Letting it go, lowkey ๐Ÿฆ‹

Parameters

  • snapshot โ€” The ID of the share snapshot to unmanage.

Returns: None


fetch_share_snapshot_metadata(snapshot)

Lists all metadata for a given snapshot. Metadata scavenger hunt ๐Ÿ”ฅ

Parameters

  • snapshot โ€” The value can be the ID of a share snapshot or a ShareSnapshot instance (class path openstack.shared_file_system.v2.share_snapshot.ShareSnapshot).

Returns: One or more metadata key and value pairs as a dictionary of strings.


fetch_share_snapshot_metadata_item(snapshot, key)

Retrieves a specific metadata item from a snapshot's metadata by its key. One little metadata gem at a time ๐ŸŽ€

Parameters

  • snapshot โ€” The value can be the ID of a share snapshot or a ShareSnapshot instance (class path openstack.shared_file_system.v2.share_snapshot.ShareSnapshot).
  • key โ€” The key of the snapshot metadata.

Returns: A single metadata key and value pair.


set_share_snapshot_metadata(snapshot, *, replace=False, **metadata)

Updates metadata of given share snapshot. Metadata makeover time โœจ

Parameters

  • snapshot โ€” The value can be the ID of a share snapshot or a ShareSnapshot instance (class path openstack.shared_file_system.v2.share_snapshot.ShareSnapshot).
  • replace โ€” Boolean for whether the preexisting metadata should be replaced
  • metadata โ€” The metadata to be created.

Returns: One or more metadata key and value pairs as a dictionary of strings.


delete_share_snapshot_metadata(snapshot, keys)

Deletes metadata for a snapshot. Clean sweep ๐Ÿงš

Parameters

  • snapshot โ€” The value can be the ID of a share snapshot or a ShareSnapshot instance (class path openstack.shared_file_system.v2.share_snapshot.ShareSnapshot).
  • keys โ€” The keys of the metadata items to be deleted.

Returns: None


๐Ÿฆ‹ Share Snapshot Instance Operations ๐Ÿฆ‹

Interact with Share Snapshot Instances supported by the Shared File Systems service.

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
share_snapshot_instances(details=True, **query)

Lists all share snapshot instances with details. It's giving inventory energy ๐Ÿ’œ

Parameters

  • details โ€” Whether to fetch detailed resource descriptions. Defaults to True.
  • query โ€” Optional query parameters to be sent to limit the share snapshot instance being returned. Available parameters include:
    • snapshot_id: The UUID of the share's base snapshot to filter the request based on.
    • project_id: The project ID of the user or service making the request.

Returns: A generator of share snapshot instance resources


get_share_snapshot_instance(share_snapshot_instance)

Lists details of a single share snapshot instance. One snapshot instance, main character spotlight ๐Ÿ‘‘

Parameters

  • share_snapshot_instance โ€” The value can be the ID of a share snapshot instance or a ShareSnapshotInstance instance (class path openstack.shared_file_system.v2.share_snapshot_instance.ShareSnapshotInstance).

Returns: Details of the identified snapshot instance


๐ŸŒˆ Share Type Operations ๐ŸŒˆ

Interact with Share Types supported by the Shared File Systems service.

class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
share_types(**query)

List shared file system share types. Share type catalog vibes ๐Ÿ›๏ธ

Parameters

  • query โ€” Optional query parameters to be sent to limit the share types being returned. Available parameters include:
    • extra_specs: The extra specifications as a set of one or more key-value pairs.
    • is_public: A boolean query parameter that, when set to true, allows retrieving public resources that belong to all projects.

Returns: A generator of share type resources


get_share_type(share_type)

List details of a single share type. Peeking at one share type's whole deal ๐Ÿ”

Parameters

  • share_type โ€” The ID of the share type

Returns: Details of identified share type


create_share_type(name, **attrs)

Creates a share from attributes. New share type just dropped ๐Ÿ’–

Returns: Details of the new share type

Parameters

  • name โ€” Name of the new share type
  • attrs โ€” Attributes which will be used to create a ShareType (class path openstack.shared_file_system.v2.share_type.ShareType), comprised of the properties on the ShareType class. Currently "description" and "extra_specs" are allowed attributes.

delete_share_type(share_type, ignore_missing=True)

Deletes a single share type. Another one bites the dust ๐Ÿ’€

Parameters

  • share_type โ€” the ID of the share type ๐Ÿ’–

Returns None โ€” that's it, nothing comes back, periodt.

update_share_type(share_type, **attrs)

Updates details of one single share type, lowkey precise.

Parameters

  • share_type โ€” the ID of the share type to update.
  • attrs โ€” the attributes to update on the share type.

Returns Updated details of the identified share type โœจ

update_share_type_extra_specs(share_type, **attrs)

Updates the extra_specs for a type. Yes bestie, the signature says **attrs and the parameter is extra_specs โ€” that's just how it is.

Parameters

  • share_type โ€” The ID of the share type.
  • extra_specs โ€” The extra specs to update on the share type.

Returns The updated share type.

delete_share_type_extra_spec_property(share_type, prop, ignore_missing=False)

Deletes the extra_specs for a share type. Cleanup era ๐Ÿงน

Parameters

  • share_type_id โ€” The ID of the share type.
  • prop โ€” The extra spec to delete.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the flavor or extra spec does not exist. When set to True, no exception will be set when attempting to delete a nonexistent flavor extra spec.

Returns None

๐Ÿซง Storage Pool Operations ๐Ÿซง

Interact with the storage pool statistics exposed by the Shared File Systems Service. Pool stats, but make it a vibe.

Same Proxy constructor signature, still iconic:

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

storage_pools(details=True, **query)

Lists all back-end storage pools with details. We love a detailed pool moment ๐Ÿซถ

Parameters

  • query โ€” Optional query parameters to be sent to limit the storage pools being returned. Available parameters include:
    • pool_name: The pool name for the back end.
    • host_name: The host name for the back end.
    • backend_name: The name of the back end.
    • capabilities: The capabilities for the storage back end.
    • share_type: The share type name or UUID.

Returns A generator of manila storage pool resources ๐ŸŒˆ

๐Ÿ” Resource Lock Operations ๐Ÿ”

Create, list, update and delete locks for resources. When a resource is locked, it means that it can be deleted only by services, admins or the user that created the lock. So yes, the lock is the main character.

Same Proxy constructor signature, again, because consistency ate:

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

resource_locks(**query)

Lists all resource locks. Lock listing, but make it filtered ๐Ÿ’…

Parameters

  • query โ€” Optional query parameters to be sent to limit the resource locks being returned. Available parameters include:
    • project_id: The project ID of the user that the lock is created for.
    • user_id: The ID of a user to filter resource locks by.
    • all_projects: list locks from all projects (Admin Only)
    • resource_id: The ID of the resource that the locks pertain to filter resource locks by.
    • resource_action: The action prevented by the filtered resource locks.
    • resource_type: The type of the resource that the locks pertain to filter resource locks by.
    • lock_context: The lock creator's context to filter locks by.
    • lock_reason: The lock reason that can be used to filter resource locks. (Inexact search is also available with lock_reason~)
    • created_since: Search for the list of resources that were created after the specified date. The date is in 'yyyy-mm-dd' format.
    • created_before: Search for the list of resources that were created prior to the specified date. The date is in 'yyyy-mm-dd' format.
    • limit: The maximum number of resource locks to return.
    • offset: The offset to define start point of resource lock listing.
    • sort_key: The key to sort a list of shares.
    • sort_dir: The direction to sort a list of shares
    • with_count: Whether to show count in API response or not, default is False. This query parameter is useful with pagination.

Returns A generator of manila resource locks ๐Ÿ”ฅ

get_resource_lock(resource_lock)

Shows details of a resource lock. Gimme the lore ๐Ÿ‘‘

Parameters

  • resource_lock โ€” The ID of a resource lock or a ResourceLock instance.

Returns Details of the identified resource lock.

update_resource_lock(resource_lock, **attrs)

Updates details of a single resource lock. Glow-up service, but for locks.

Parameters

  • resource_lock โ€” The ID of a resource lock or a ResourceLock instance.
  • attrs โ€” The attributes to update on the resource lock.

Returns the updated resource lock

delete_resource_lock(resource_lock, ignore_missing=True)

Deletes a single resource lock. Bye bestie ๐Ÿฆ‹

Parameters

  • resource_lock โ€” The ID of a resource lock or a ResourceLock instance.
  • ignore_missing โ€” When set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource lock does not exist. When set to True, no exception will be set when attempting to delete a nonexistent resource lock.

Returns The deleted resource lock.

create_resource_lock(**attrs)

Locks a resource. Lock it down, respectfully ๐Ÿ”’

Parameters

  • attrs โ€” Attributes which will be used to create a ResourceLock, comprised of the properties on the ResourceLock class. Available parameters include:
    • resource_id: ID of the resource to be locked.
    • resource_type: type of the resource (share, access_rule).
    • resource_action: action to be locked (delete, show).
    • lock_reason: reason why you're locking the resource (Optional).

Returns Details of the lock

๐Ÿ’Œ User Message Operations ๐Ÿ’Œ

View and manipulate asynchronous user messages emitted by the Shared File Systems service. Messages, but they're asynchronous and a little mysterious.

Same Proxy constructor signature one more time, because it's literally the same class:

class openstack.shared_file_system.v2._proxy.Proxy(session, *,
service_type=None, service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

user_messages(**query)

Lists shared file system user messages ๐Ÿ“ฌ

Parameters

  • query โ€” Optional query parameters to be sent to limit the messages being returned. Available parameters include:
  • action_id โ€” the ID of the action during which the message was created. ๐Ÿ•ต๏ธโ€โ™€๏ธ
    • detail_id โ€” the ID of the message detail.
    • limit โ€” the maximum number of shares to return. (yes, shares โ€” that's literally what it says ๐Ÿ’€)
    • message_level โ€” the message level.
    • offset โ€” the offset that defines the start point of share or share group listing.
    • sort_key โ€” the key to sort a list of messages by.
    • sort_dir โ€” the direction to sort a list of shares.
    • project_id โ€” the ID of the project for which the message was created.
    • request_id โ€” the ID of the request during which the message was created.
    • resource_id โ€” the UUID of the resource for which the message was created.
    • resource_type โ€” the type of the resource for which the message was created.

Returns โ€” a generator of user message resources.


get_user_message(message) โ€” lists the deets of a single user message ๐Ÿ’Œ

Parameters

  • message โ€” the value can be the ID of a user message or a UserMessage <#openstack.shared_file_system.v2.user_message.UserMessage> instance.

Returns โ€” details of the identified user message.


delete_user_message(message, ignore_missing=True) โ€” deletes a single user message ๐Ÿ—‘๏ธ

Parameters

  • message โ€” the value can be either the ID of a user message or a UserMessage <#openstack.shared_file_system.v2.user_message.UserMessage> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the user message does not exist. When set to True, no exception will be set when attempting to delete a nonexistent user message.

Returns โ€” the deleted user message.


๐Ÿฆ‹ Workflow API ๐Ÿฆ‹

โœจ The Workflow Class โœจ

The workflow high-level interface is available through the workflow member of a Connection <#openstack.connection.Connection> object. The workflow member will only be added if the service is detected. ๐Ÿ‘‘

๐ŸŒธ Workflow Operations ๐ŸŒธ

class openstack.workflow.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_workflow(**attrs)

Creates a new workflow from attributes. โœจ

Parameters

  • attrs โ€” keyword arguments which will be used to create a Workflow <#openstack.workflow.v2.workflow.Workflow>, comprised of the properties on the Workflow class.

Returns โ€” the results of workflow creation.


update_workflow(workflow, **attrs)

Updates a workflow from attributes. ๐Ÿ› ๏ธ

Parameters

  • workflow โ€” the value can be either the name of a workflow or a Workflow <#openstack.workflow.v2.workflow.Workflow> instance.
  • attrs โ€” keyword arguments which will be used to update a Workflow <#openstack.workflow.v2.workflow.Workflow>, comprised of the properties on the Workflow class.

Returns โ€” the results of workflow update.


get_workflow(workflow)

Gets a workflow. ๐ŸŽฏ

Parameters

  • workflow โ€” the value can be the name of a workflow or Workflow <#openstack.workflow.v2.workflow.Workflow> instance.

Returns โ€” one Workflow <#openstack.workflow.v2.workflow.Workflow>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no workflow matching the name could be found.

workflows(**query)

Retrieves a generator of workflows. ๐ŸŒŠ

Parameters

  • query โ€” optional query parameters to be sent to restrict the workflows to be returned. Available parameters include:
    • limit โ€” requests at most the specified number of items be returned from the query.
    • marker โ€” specifies the ID of the last-seen workflow. Use the limit parameter to make an initial limited request and use the ID of the last-seen workflow from the response as the marker parameter value in a subsequent limited request.

Returns โ€” a generator of workflow instances.


delete_workflow(value, ignore_missing=True)

Deletes a workflow. ๐Ÿ’ฅ

Parameters

  • value โ€” the value can be either the name of a workflow or a Workflow <#openstack.workflow.v2.workflow.Workflow> instance.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the workflow does not exist. When set to True, no exception will be set when attempting to delete a nonexistent workflow.

Returns โ€” the deleted workflow.


find_workflow(name_or_id, ignore_missing=True)

Finds a single workflow. ๐Ÿ”Ž

Parameters

  • name_or_id โ€” the name or ID of an workflow.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns โ€” One Extension or None (yes bestie, Extension โ€” we're just reading the menu ๐Ÿ’€).


๐ŸŽ€ Execution Operations ๐ŸŽ€

class openstack.workflow.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_execution(**attrs)

Creates a new execution from attributes. ๐Ÿ”ฅ

Parameters

  • workflow_name โ€” the name of target workflow to execute.
  • attrs โ€” keyword arguments which will be used to create a Execution <#openstack.workflow.v2.execution.Execution>, comprised of the properties on the Execution class.

Returns โ€” the results of execution creation.


get_execution(execution)

Gets a execution. ๐Ÿ‘€

Parameters

  • execution โ€” the value can be either the ID of a execution or a Execution <#openstack.workflow.v2.execution.Execution> instance.

Returns โ€” one Execution <#openstack.workflow.v2.execution.Execution>.

Raises NotFoundException <#openstack.exceptions.NotFoundException> when no execution matching the criteria could be found.

executions(**query)

Retrieves a generator of executions. ๐ŸŒˆ

Parameters

  • query โ€” optional query parameters to be sent to restrict the executions to be returned. Available parameters include:
    • limit โ€” requests at most the specified number of items be returned from the query.
    • marker โ€” specifies the ID of the last-seen execution. Use the limit parameter to make an initial limited request and use the ID of the last-seen execution from the response as the marker parameter value in a subsequent limited request.

Returns โ€” a generator of execution instances.


delete_execution(value, ignore_missing=True)

Deletes an execution. ๐Ÿ’…

Parameters

  • value โ€” the value can be either the name of a execution or a Execution instance.
  • ignore_missing โ€” set this to False and boom ๐Ÿ’€ a NotFoundException (openstack.exceptions.NotFoundException) gets raised the moment the execution doesn't exist. Set it to True and literally nothing happens โ€” no exception gets set when you try to delete a nonexistent execution. It's giving "no thoughts, head empty" and honestly? valid ๐Ÿซถ

Returns โ€” the deleted execution.

find_execution(name_or_id, ignore_missing=True)

Find a single execution. One. Just one. ๐Ÿ”

Parameters

  • name_or_id โ€” the name or ID of an execution.
  • ignore_missing โ€” set it to False and NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. Set it to True and you just get None back when you try to find a nonexistent resource. no crash, no drama, no tears โœจ

Returns โ€” one Execution or None.


โฐ Cron Trigger Operations

Okay bestie, same proxy energy, but now with cron โ€” yes, the actual scheduled-vibes kind ๐Ÿ‘‘

class openstack.workflow.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)

create_cron_trigger(**attrs)

Create a new cron trigger from attributes โœจ

Parameters

  • attrs โ€” keyword arguments which will be used to create a CronTrigger (openstack.workflow.v2.cron_trigger.CronTrigger), comprised of the properties on the CronTrigger class.

Returns โ€” the results of cron trigger creation ๐Ÿ’–

get_cron_trigger(cron_trigger)

Get a cron trigger. grabbing exactly one, bestie ๐ŸŽ€

Parameters

  • cron_trigger โ€” the value can be the name of a cron_trigger or a CronTrigger (openstack.workflow.v2.cron_trigger.CronTrigger) instance.

Returns โ€” one CronTrigger (openstack.workflow.v2.cron_trigger.CronTrigger)

Raises NotFoundException (openstack.exceptions.NotFoundException) when no cron triggers matching the criteria could be found. ๐Ÿ˜ญ

cron_triggers(*, all_projects=False, **query)

Retrieve a generator of cron triggers ๐ŸŒˆ

Parameters

  • all_projects โ€” when set to True, list cron triggers from all projects. Admin-only by default. ๐Ÿ‘‘
  • query โ€” optional query parameters to be sent to restrict the cron triggers to be returned. Available parameters include:
    • limit: requests at most the specified number of items be returned from the query.
    • marker: specifies the ID of the last-seen cron trigger. Use the limit parameter to make an initial limited request and use the ID of the last-seen cron trigger from the response as the marker parameter value in a subsequent limited request. iykyk ๐Ÿงš

Returns โ€” a generator of CronTrigger instances.

delete_cron_trigger(value, ignore_missing=True)

Delete a cron trigger. bye bestie ๐Ÿ’…

Parameters

  • value โ€” the value can be either the name of a cron trigger or a CronTrigger (openstack.workflow.v2.cron_trigger.CronTrigger) instance.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the cron trigger does not exist. When set to True, no exception will be set when attempting to delete a nonexistent cron trigger. ghost it and it won't ghost you back ๐Ÿซถ

Returns โ€” the deleted cron trigger.

find_cron_trigger(name_or_id, ignore_missing=True, *, all_projects=False, **query)

Find a single cron trigger ๐Ÿ”Ž

Parameters

  • name_or_id โ€” the name or ID of a cron trigger.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • all_projects โ€” when set to True, search for cron triggers by name across all projects. Note that this will likely result in a higher chance of duplicates. โš ๏ธ (fair warning, bestie)
  • query โ€” optional query parameters to be sent to limit the cron triggers being returned.

Returns โ€” one CronTrigger or None

Raises NotFoundException (openstack.exceptions.NotFoundException) when no resource can be found.

Raises DuplicateResource (openstack.exceptions.DuplicateResource) when multiple resources are found. two of them?? not the duplicate situation ๐Ÿ˜ญ


๐Ÿงฑ Resource Interface

Okay so this is the lowkey lower-level layer โ€” the Resource layer is how you talk to OpenStack services directly, no middleman vibes. The classes exposed by the Connection build a whole convenience layer on top of this, but you can absolutely use Resources directly. However โ€” the most common usage of this layer is getting an object from a class in the Connection layer, modifying it, and sending it right back into the Connection layer, like to update a resource on the server. it's giving "borrow the hoodie, wear it, give it back" ๐Ÿงฅโœจ

The following services have exposed Resource classes.


โšก Accelerator v2 Resources

openstack.accelerator.v2.accelerator_request

The AcceleratorRequest Class

The AcceleratorRequest class inherits from Resource (openstack.resource.Resource).

class openstack.accelerator.v2.accelerator_request.AcceleratorRequest(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing). don't touch, fr fr ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'arq' : singular form of key for resource.

resources_key = 'arqs' : plural form of key for resource. yes, the s is doing all the work ๐ŸŽ€

base_path = '/accelerator_requests' : the base part of the URI for this resource.

create_opts = CreateOpts(request_key=None, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) : class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().

allow_create = True : allow create operation for this resource.

allow_fetch = True : allow get operation for this resource.

allow_delete = True : allow delete operation for this resource.

allow_list = True : allow list operation for this resource.

allow_patch = True : allow patch operation for binding.

attach_handle_info : the device address associated with this ARQ (if any)

attach_handle_type : the type of attach handle (e.g. PCI, mdev...)

device_profile_name : the name of the device profile

device_profile_group_id : the id of the device profile group

device_rp_uuid : the UUID of the bound device RP (if any)

hostname : the host name to which ARQ is bound. (if any)

instance_uuid : the UUID of the instance associated with this ARQ (if any)

state : the state of the ARQ

uuid : the UUID of the ARQ

patch(session, patch=None, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None)

Patch the remote resource. โœจ

Lets you modify the resource by handing over a list of JSON patches to apply to it. The patches can use both the original (server-side) and SDK field names โ€” flexible, we love to see it ๐Ÿ’…

Parameters

  • session โ€” the session to use for making this request.
  • patch โ€” additional JSON patch as a list or one patch item. If provided, it is applied on top of any changes to the current resource.
  • prepend_key โ€” whether the resource_key (openstack.resource.Resource.resource_key) should be prepended in a resource creation request. Default to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.
  • base_path โ€” base part of the URI for modifying resources, if different from base_path (openstack.resource.Resource.base_path).
  • microversion โ€” the API version to override the negotiated one โœจ

Returns ๐Ÿ’–

This Resource instance, bestie. That's it. That's the return.

Raises MethodNotSupported if Resource.allow_patch is not set to True โ€” like, it will literally throw hands if patching isn't allowed, so check that flag first, no cap ๐Ÿ˜ญ


openstack.accelerator.v2.attribute

โœจ The Attribute Class โœจ

The Attribute class inherits from Resource.

class openstack.accelerator.v2.attribute.Attribute(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” okay so this one is not for direct use, bestie. Don't touch it. Go look at new() and existing() instead, that's the vibe ๐Ÿ‘‘
  • connection โ€” reference to the Connection being used. Defaults to None, and that's on purpose โ€” it lets Resource objects exist without an active Connection, like in unit tests. And if you're using self._connection anywhere in Resource code, protect it with a None check, fr fr ๐Ÿ’…

resource_key = 'attribute' Singular form of the key for this resource. One attribute. Just the one. ๐ŸŽ€

resources_key = 'attributes' Plural form of the key for this resource. Now we're talking multiples โœจ

base_path = '/attributes' The base part of the URI for this resource โ€” that's the URL chunk it lives at ๐ŸŒธ

allow_create = True Yes, you can create one of these ๐Ÿ’–

allow_fetch = True Yes, you can fetch (get) one of these ๐Ÿฆ‹

allow_commit = False Nope, no update operation for this resource ๐Ÿ™ˆ

allow_delete = True Yes, you can delete it ๐Ÿ’€

allow_list = True Yes, you can list them all out, iconic behavior โญ

created_at The timestamp when this attribute was created. Baby's birth certificate ๐Ÿผ

deployable_id The deployable_id of the attribute.

key The key of the attribute.

value The value of the attribute.

updated_at The timestamp when this attribute was updated. Glow-up timestamp โœจ

uuid The uuid of the attribute.


openstack.accelerator.v2.deployable

๐Ÿ’œ The Deployable Class ๐Ÿ’œ

The Deployable class inherits from Resource.

class openstack.accelerator.v2.deployable.Deployable(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” again, not for direct use. See new() and existing() instead, iykyk ๐Ÿ‘‘
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. And use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…

resource_key = 'deployable' Singular form of the key for this resource.

resources_key = 'deployables' Plural form of the key for this resource.

base_path = /deployables The base part of the URI for this resource ๐ŸŒˆ

allow_create = False No create operation here, sorry bestie ๐Ÿ™ˆ

allow_fetch = True Fetch? Yes. Get it, girl ๐Ÿ’–

allow_commit = False No update operation. Not today ๐Ÿ’€

allow_delete = False No delete operation either. Hands off ๐Ÿšซ

allow_list = True But you can list them, and that's the tea โญ

allow_patch = True And you can patch. Patching is the whole main character energy of this class ๐Ÿ”ฅ

created_at The timestamp when this deployable was created.

device_id The device_id of the deployable.

id The UUID of the deployable.

name The name of the deployable.

num_accelerators The num_accelerator of the deployable.

parent_id The parent_id of the deployable.

root_id The root_id of the deployable.

updated_at The timestamp when this deployable was updated.

patch(session, patch=None, prepend_key=True, has_body=True, retry_on_conflict=None, base_path='/deployables/%(id)s/program', *, microversion=None)

Patch the remote resource. ๐Ÿฉนโœจ

This lets you modify the resource by handing over a list of JSON patches to apply to it. And the patches can use both the original (server-side) field names and the SDK field names โ€” flexible queen behavior, honestly ๐Ÿ’…

Parameters

  • session โ€” the session to use for making this request.
  • patch โ€” additional JSON patch, as a list or one patch item. If you provide it, it gets applied on top of any changes to the current resource.
  • prepend_key โ€” whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults alone, no notes ๐ŸŽ€
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path. Note the default here is '/deployables/%(id)s/program', which is not the plain class-level one, so like... read it carefully bestie ๐Ÿ‘€
  • microversion โ€” the API version to override the negotiated one.

Returns ๐Ÿ’–

This Resource instance.

Raises MethodNotSupported if Resource.allow_patch is not set to True. (Spoiler: for this class it is True, so you're chilling ๐ŸŒˆ)


openstack.accelerator.v2.device

๐Ÿฆ‹ The Device Class ๐Ÿฆ‹

The Device class inherits from Resource.

class openstack.accelerator.v2.device.Device(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” not intended to be used directly, see new() and existing() instead โญ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…

resource_key = 'device' Singular form of the key for this resource.

resources_key = 'devices' Plural form of the key for this resource.

base_path = /devices The base part of the URI for this resource ๐ŸŒธ

allow_create = False No creating devices here ๐Ÿ™ˆ

allow_fetch = True Fetching? Absolutely, obsessed ๐Ÿ’–

allow_commit = False No update operation ๐Ÿ’€

allow_delete = False No delete operation ๐Ÿšซ

allow_list = True Listing is on the menu, periodt โญ

created_at The timestamp when this device was created.

hostname The hostname of the device.

id The ID of the device.

model The model of the device.

status The status of the device.

std_board_info The std board information of the device.

type The type of the device.

updated_at The timestamp when this device was updated.

uuid The UUID of the device.

vendor The vendor ID of the device.

vendor_board_info The vendor board information of the device.

enable(session) Enable the device. Turn it all the way on ๐Ÿ’…โœจ

disable(session) Disable the device. Okay, turn it back off ๐Ÿ˜ญ


openstack.accelerator.v2.device_profile

๐ŸŽ€ The DeviceProfile Class ๐ŸŽ€

The DeviceProfile class inherits from Resource.

class openstack.accelerator.v2.device_profile.DeviceProfile(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” not intended for direct use, bestie. See new() and existing() ๐Ÿ‘‘
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿฆ‹

resource_key = 'device_profile' Singular form of the key for this resource.

resources_key = 'device_profiles' Plural form of the key for this resource.

base_path = /device_profiles The base part of the URI for this resource ๐ŸŒˆ

allow_create = True You can create these, slay ๐Ÿ’–

allow_fetch = True You can fetch these too โœจ

allow_commit = False No update operation ๐Ÿ’€

allow_delete = True Deletion is allowed, handle with care ๐Ÿ™ˆ

allow_list = True And listing, obviously โญ

created_at The timestamp when this device_profile was created.

description The description of the device profile.

groups The groups of the device profile.

name The name of the device profile.

updated_at The timestamp when this device_profile was updated.

uuid The uuid of the device profile.

  • create_opts โ€” class-level config for the create operation, shaped like this:
create_opts = CreateOpts(request_key=None,
response_key=<Unset.UNSET: 'UNSET'>, method='POST',
requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)

Subclasses can override this to set per-resource defaults without overriding create(). Slay, inheritance.


๐Ÿฆพ Baremetal Resources ๐Ÿฆพ

openstack.baremetal.v1.Allocation

Bestie. The Allocation Class. It inherits from Resource (peep #openstack.resource.Resource).

class openstack.baremetal.v1.allocation.Allocation(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly, ok? Look at new() (see #openstack.resource.Resource.new) and existing() (see #openstack.resource.Resource.existing) instead.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. And fr, any use of self._connection inside Resource code should protect itself with a check for None.
  • resources_key = 'allocations' โ€” the plural form of the key for this resource.
  • base_path = '/allocations' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation? allowed. ๐Ÿ’–
  • allow_fetch = True โ€” get operation? allowed.
  • allow_commit = True โ€” update operation? allowed.
  • allow_delete = True โ€” delete operation? allowed.
  • allow_list = True โ€” list operation? allowed.
  • allow_patch = True โ€” patch operation? allowed.
  • commit_method = 'PATCH' โ€” the method for committing a resource. It must be PATCH if allow_patch is True. No cap.

Attributes, the main character lineup:

  • candidate_nodes โ€” the candidate nodes for this allocation.
  • created_at โ€” timestamp at which the allocation was created.
  • extra โ€” a set of one or more arbitrary metadata key and value pairs.
  • id โ€” the UUID for the allocation.
  • last_error โ€” the last error for the allocation. ๐Ÿ˜ญ
  • links โ€” a list of relative links, including the self and bookmark links.
  • name โ€” the name of the allocation.
  • node โ€” the node UUID or name to create the allocation against, bypassing the normal allocation process. Sneaky but valid.
  • node_id โ€” UUID of the node this allocation belongs to.
  • owner โ€” the tenant who owns the object.
  • resource_class โ€” the requested resource class.
  • state โ€” the state of the allocation.
  • traits โ€” the requested traits.
  • updated_at โ€” timestamp at which the allocation was last updated.

wait(session, timeout=None, ignore_error=False)

Wait for the allocation to become active. The suspenseโ€ฆ ๐Ÿซถ

Parameters

  • session โ€” the session to use for making this request.
  • timeout โ€” how much (in seconds) to wait for the allocation. A value of None (the default) means no client-side timeout, so like, buckle up.
  • ignore_error โ€” if True, this call will raise an exception if the allocation reaches the error state. Otherwise the error state is considered successful and the call returns.

Returns โ€” this Allocation instance. ๐ŸŽ€

Raises ResourceFailure (see #openstack.exceptions.ResourceFailure) if allocation fails and ignore_error is False.

Raises ResourceTimeout (see #openstack.exceptions.ResourceTimeout) on timeout. ๐Ÿ’€


openstack.baremetal.v1.chassis

The Chassis Class, bestie. Inherits from Resource (see #openstack.resource.Resource).

class openstack.baremetal.v1.chassis.Chassis(_synchronized=False,
connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'chassis' โ€” plural form of key for resource.
  • base_path = '/chassis' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_patch = True โ€” allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. Must be PATCH if allow_patch is True. Periodt.

Attributes:

  • created_at โ€” timestamp at which the chassis was created.
  • description โ€” a descriptive text about the service.
  • extra โ€” a set of one or more arbitrary metadata key and value pairs.
  • id โ€” the UUID for the chassis.
  • links โ€” a list of relative links, including the self and bookmark links.
  • nodes โ€” links to the collection of nodes contained in the chassis.
  • updated_at โ€” timestamp at which the chassis was last updated.

openstack.baremetal.v1.conductor

The Conductor Class. Inherits from Resource (see #openstack.resource.Resource). ๐ŸŒˆ

class openstack.baremetal.v1.conductor.Conductor(_synchronized=False,
connection=None, **attrs)

The base resource ๐ŸŒธ

Parameters

  • _synchronized โ€” not intended to be used directly, see new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'conductors' โ€” plural form of key for resource.
  • base_path = '/conductors' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” no creating, bestie. ๐Ÿšซ
  • allow_fetch = True โ€” get operation allowed.
  • allow_commit = False โ€” no updating.
  • allow_delete = False โ€” no deleting.
  • allow_list = True โ€” listing? absolutely, go off.
  • allow_patch = False โ€” and no patching either.

openstack.baremetal.v1.deploy_templates

The DeployTemplate Class. Inherits from Resource (see #openstack.resource.Resource).

class openstack.baremetal.v1.deploy_templates.DeployTemplate(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'deploy_templates' โ€” plural form of key for resource.
  • base_path = '/deploy_templates' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_patch = True โ€” allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.

Attributes:

  • name โ€” the name of this resource.
  • created_at โ€” timestamp at which the deploy_template was created.
  • extra โ€” a set of one or more arbitrary metadata key and value pairs.
  • links โ€” a list of relative links. Includes the self and bookmark links.
  • steps โ€” a set of physical information of the deploy_template. ๐Ÿฆ‹
  • updated_at โ€” timestamp at which the deploy_template was last updated.
  • id โ€” the UUID of the resource.

openstack.baremetal.v1.driver

The Driver Class. Inherits from Resource (see #openstack.resource.Resource). ๐ŸŽ๏ธ

class openstack.baremetal.v1.driver.Driver(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly, ok? See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • connection โ€” a reference to the Connection that's being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests, bestie ๐Ÿ’…. And fr fr: if you're poking at self._connection inside Resource code, guard it with a None check. No cap.

resources_key = 'drivers' โ€” the plural form of the key for this resource. Slay, pluralization.

base_path = '/drivers' โ€” the base part of the URI for this resource. It's giving URL starter pack โœจ

allow_create = False โ€” nope, no create operation for this resource.

allow_fetch = True โ€” yes, get operation? Allowed ๐Ÿซถ

allow_commit = False โ€” update operation? Not here, babe.

allow_delete = False โ€” delete? Also no ๐Ÿ™ˆ

allow_list = True โ€” list operation? Absolutely, we stan a listable resource ๐Ÿ‘‘

hosts โ€” a list of active hosts that support this driver.

links โ€” a list of relative links, including the self and bookmark links.

name โ€” the name of the driver.

properties โ€” a list of links to driver properties.

default_bios_interface โ€” default BIOS interface implementation. Introduced in API microversion 1.40.

default_boot_interface โ€” default boot interface implementation. Introduced in API microversion 1.30.

default_console_interface โ€” default console interface implementation. Introduced in API microversion 1.30.

default_deploy_interface โ€” default deploy interface implementation. Introduced in API microversion 1.30.

default_firmware_interface โ€” default firmware interface implementation. Introduced in API microversion 1.86.

default_inspect_interface โ€” default inspect interface implementation. Introduced in API microversion 1.30.

default_management_interface โ€” default management interface implementation. Introduced in API microversion 1.30.

default_network_interface โ€” default network interface implementation. Introduced in API microversion 1.30.

default_power_interface โ€” default port interface implementation. Introduced in API microversion 1.30. (yes, it says port โ€” that's the manpage talking, not me ๐Ÿ˜ญ)

default_raid_interface โ€” default RAID interface implementation. Introduced in API microversion 1.30.

default_rescue_interface โ€” default rescue interface implementation. Introduced in API microversion 1.38.

default_storage_interface โ€” default storage interface implementation. Introduced in API microversion 1.33.

default_vendor_interface โ€” default vendor interface implementation. Introduced in API microversion 1.30.

enabled_bios_interfaces โ€” enabled BIOS interface implementations. Introduced in API microversion 1.40.

enabled_boot_interfaces โ€” enabled boot interface implementations. Introduced in API microversion 1.30.

enabled_console_interfaces โ€” enabled console interface implementations. Introduced in API microversion 1.30.

enabled_deploy_interfaces โ€” enabled deploy interface implementations. Introduced in API microversion 1.30.

enabled_firmware_interfaces โ€” enabled firmware interface implementations. Introduced in API microversion 1.86.

enabled_inspect_interfaces โ€” enabled inspect interface implementations. Introduced in API microversion 1.30.

enabled_management_interfaces โ€” enabled management interface implementations. Introduced in API microversion 1.30.

enabled_network_interfaces โ€” enabled network interface implementations. Introduced in API microversion 1.30.

enabled_power_interfaces โ€” enabled port interface implementations. Introduced in API microversion 1.30. (again with the port, iykyk ๐Ÿซ )

enabled_raid_interfaces โ€” enabled RAID interface implementations. Introduced in API microversion 1.30.

enabled_rescue_interfaces โ€” enabled rescue interface implementations. Introduced in API microversion 1.38.

enabled_storage_interfaces โ€” enabled storage interface implementations. Introduced in API microversion 1.33.

enabled_vendor_interfaces โ€” enabled vendor interface implementations. Introduced in API microversion 1.30.


list_vendor_passthru(session) โ€” fetch the vendor specific methods that this driver exposes ๐Ÿ’–

  • Parameters
    • session โ€” the session to use for making this request.
  • Returns โ€” a dict of the available vendor passthru methods for the driver. Method names are the keys, and corresponding usages in dict form are the values. Usage dict properties:
    • async: bool # Is passthru function invoked asynchronously
    • attach: bool # Is return value attached to response object
    • description: str # Description of what the method does
    • http_methods: list # List of HTTP methods supported

call_vendor_passthru(session, verb, method, body=None) โ€” call a vendor specific passthru method ๐ŸŽ€

Contents of body are params passed to the hardware driver function. Validation happens there โ€” so if parameters are missing, or if there are excess parameters, the request gets rejected. Periodt.

  • Parameters
    • session โ€” the session to use for making this request.
    • method โ€” vendor passthru method name.
    • verb โ€” one of GET, POST, PUT, or DELETE, depending on the driver and method.
    • body โ€” passed to the vendor function as json body.
  • Raises โ€” ValueError if verb is not one of GET, POST, PUT, DELETE.
  • Returns โ€” response of method call.

๐Ÿฆ‹ openstack.baremetal.v1.inspection_rules ๐Ÿฆ‹

The InspectionRule Class ๐Ÿ’œ

The InspectionRule class inherits from Resource <#openstack.resource.Resource>.

class openstack.baremetal.v1.inspection_rules.InspectionRule(_synchronized=False, connection=None, **attrs)

The base resource.

  • Parameters
    • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
    • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'inspection_rules' โ€” plural form of key for resource. (Ik it's long, it's fine, we love her ๐ŸŒธ)

base_path = '/inspection_rules' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

allow_patch = True โ€” allow patch operation for this resource.

commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. Like, mandatory mandatory ๐Ÿ’€

actions โ€” the actions to be executed when the rule conditions are met.

description โ€” a brief explanation about the inspection rule.

conditions โ€” the conditions under which the rule should be triggered.

created_at โ€” timestamp at which the resource was created.

links โ€” a list of relative links. Includes the self and bookmark links.

phase โ€” specifies the phase when the rule should run, defaults to 'main'. Main character energy, literally โœจ

priority โ€” specifies the rule's precedence level during execution.

sensitive โ€” indicates whether the rule contains sensitive information. ๐Ÿ™ˆ

updated_at โ€” timestamp at which the resource was last updated.

id โ€” the UUID of the resource.


๐ŸŒˆ openstack.baremetal.v1.Node ๐ŸŒˆ

The Node Class ๐Ÿ‘‘

The Node class inherits from Resource <#openstack.resource.Resource>.

class openstack.baremetal.v1.node.Node(_synchronized=False, connection=None, **attrs)

The base resource.

  • Parameters
    • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
    • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'nodes' โ€” plural form of key for resource.

base_path = '/nodes' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

and bestie, we're not even done yet โ€” more Node goodness incoming ๐Ÿ’…

  • allow_patch = True โ€” Allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.

๐Ÿ–ค the node fields, one by one

okay bestie, this is the long one โ€” every attribute of a baremetal node, plus exactly which microversion it showed up in. no skipping, i promise ๐Ÿซถ

  • allocation_id โ€” The UUID of the allocation associated with this node. Added in API microversion 1.52.
  • owner โ€” A string or UUID of the tenant who owns the baremetal node. Added in API microversion 1.50.
  • boot_mode โ€” The current boot mode state (uefi/bios). Added in API microversion 1.75.
  • chassis_id โ€” The UUID of the chassis associated with this node. Can be empty or None. ๐Ÿ’€
  • clean_step โ€” The current clean step.
  • conductor_group โ€” Conductor group this node is managed by. Added in API microversion 1.46.
  • created_at โ€” Timestamp at which the node was last updated. (yes, that's what it says, we don't make the rules ๐Ÿ’…)
  • deploy_step โ€” The current deploy step. Added in API microversion 1.44.
  • description โ€” The description of the node. Added in API microversion 1.51.
  • driver โ€” The name of the driver.
  • driver_info โ€” All the metadata required by the driver to manage this node. List of fields varies between drivers, and can be retrieved from the openstack.baremetal.v1.driver.Driver <#openstack.baremetal.v1.driver.Driver> resource.
  • driver_internal_info โ€” Internal metadata set and stored by node's driver. This is read-only. ๐Ÿ”’
  • extra โ€” A set of one or more arbitrary metadata key and value pairs.
  • fault โ€” Fault type that caused the node to enter maintenance mode. Introduced in API microversion 1.42.
  • health โ€” The health status of the node from the BMC (e.g. 'OK', 'Warning', 'Critical'). Introduced in API microversion 1.109.
  • id โ€” The UUID of the node resource.
  • instance_info โ€” Information used to customize the deployed image, e.g. size of root partition, config drive in the form of base64 encoded string and other metadata.
  • instance_id โ€” UUID of the nova instance associated with this node.
  • instance_name โ€” The name of the instance associated with this node. Added in API microversion 1.104.
  • is_automated_clean_enabled โ€” Override enabling of automated cleaning. Added in API microversion 1.47.
  • is_console_enabled โ€” Whether console access is enabled on this node.
  • is_maintenance โ€” Whether node is currently in "maintenance mode". Nodes put into maintenance mode are removed from the available resource pool. ๐Ÿ™ˆ
  • is_retired โ€” Whether the node is marked for retirement. Added in API microversion 1.61.
  • is_secure_boot โ€” Whether the node is currently booted with secure boot turned on. Added in API microversion 1.75.
  • last_error โ€” Any error from the most recent transaction that started but failed to finish. ๐Ÿ˜ญ
  • lessee โ€” Field indicating if the node is leased to a specific project. Added in API version 1.65
  • links โ€” A list of relative links, including self and bookmark links.
  • maintenance_reason โ€” user settable description of the reason why the node was placed into maintenance mode.
  • name โ€” Human readable identifier for the node. May be undefined. Certain words are reserved. Added in API microversion 1.5
  • parent_node โ€” The node which serves as the parent_node for this node. Added in API version 1.83
  • ports โ€” Links to the collection of ports on this node.
  • port_groups โ€” Links to the collection of portgroups on this node. Available since API microversion 1.24.
  • power_state โ€” The current power state. Usually "power on" or "power off", but may be "None" if service is unable to determine the power state.
  • properties โ€” Physical characteristics of the node. Content populated by the service during inspection.
  • provision_state โ€” The current provisioning state of the node.
  • retired_reason โ€” The reason why the node is marked for retirement. Added in API microversion 1.61.
  • raid_config โ€” The current RAID configuration of the node.
  • reservation โ€” The name of an service conductor host which is holding a lock on this node, if a lock is held.
  • resource_class โ€” A string to be used by external schedulers to identify this node as a unit of a specific type of resource. Added in API microversion 1.21.
  • service_step โ€” A string representing the current service step being executed upon. Added in API microversion 1.89.
  • runbook โ€” A string representing the uuid or logical name of a runbook as an alternative to providing clean_steps or service_steps. Added in API microversion 1.92.
  • shard โ€” A string indicating the shard this node belongs to. Added in API microversion 1,82. (that comma is canon, i don't make the rules ๐Ÿซ )
  • states โ€” Links to the collection of states.
  • target_provision_state โ€” The requested state if a provisioning action has been requested. For example, AVAILABLE, DEPLOYING, DEPLOYWAIT, DEPLOYING, ACTIVE etc.
  • target_power_state โ€” The requested state during a state transition.
  • target_raid_config โ€” The requested RAID configuration of the node which will be applied when the node next transitions through the CLEANING state.
  • traits โ€” Traits of the node. Introduced in API microversion 1.37.
  • updated_at โ€” Timestamp at which the node was last updated.

๐Ÿงš the interfaces, aka the plug-in slots

these are all "which thingy do we use for X" fields, and yep, every single one has its own microversion. iconic behaviour honestly โœจ

  • bios_interface โ€” BIOS interface to use when setting BIOS properties of the node. Introduced in API microversion 1.40.
  • boot_interface โ€” Boot interface to use when configuring boot of the node. Introduced in API microversion 1.31.
  • console_interface โ€” Console interface to use when working with serial console. Introduced in API microversion 1.31.
  • deploy_interface โ€” Deploy interface to use when deploying the node. Introduced in API microversion 1.31.
  • firmware_interface โ€” Firmware interface to be used when managing the node. Introduced in API microversion 1.86
  • inspect_interface โ€” Inspect interface to use when inspecting the node. Introduced in API microversion 1.31.
  • management_interface โ€” Management interface to use for management actions on the node. Introduced in API microversion 1.31.
  • network_interface โ€” Network interface provider to use when plumbing the network connections for this node. Introduced in API microversion 1.20.
  • power_interface โ€” Power interface to use for power actions on the node. Introduced in API microversion 1.31.
  • raid_interface โ€” RAID interface to use for configuring RAID on the node. Introduced in API microversion 1.31.
  • rescue_interface โ€” Rescue interface to use for rescuing of the node. Introduced in API microversion 1.38.
  • storage_interface โ€” Storage interface to use when attaching remote storage. Introduced in API microversion 1.33.
  • vendor_interface โ€” Vendor interface to use for vendor-specific actions on the node. Introduced in API microversion 1.31.

๐ŸŒˆ create(session, prepend_key=True, base_path=None, *, microversion=None, **params)

Create a remote resource based on this instance. ๐Ÿซถ

The overridden version is capable of handling the populated provision_state field of one of three values: enroll, manageable or available. If not provided, the server default is used (enroll in newer versions of Ironic).

This call does not cause a node to go through automated cleaning. If you need it, use provision_state=manageable followed by a call to set_provision_state(). ๐Ÿงผ

Note that Bare Metal API 1.4 is required for manageable and 1.11 is required for enroll.

โš ๏ธ Warning: Using provision_state=available is only possible with API versions 1.1 to 1.10 and thus is incompatible with setting any fields that appeared after 1.11. like, genuinely don't do it bestie ๐Ÿ’€

Parameters

  • session โ€” The session to use for making this request.

Returns

  • This Resource instance.

Raises

  • ValueError if the Node's provision_state is not one of None, enroll, manageable or available.
  • NotSupported <#openstack.exceptions.NotSupported> if the provision_state cannot be reached with any API version supported by the server.

๐ŸŽ€ commit(session, *args, **kwargs)

Commit the state of the instance to the remote resource.

Parameters

  • session โ€” The session to use for making this request.

Returns

  • This Node instance.

๐Ÿ‘‘ set_provision_state(session, target, config_drive=None, clean_steps=None, rescue_password=None, wait=False, timeout=None, deploy_steps=None, service_steps=None, runbook=None)

Run an action modifying this node's provision state.

This call is asynchronous โ€” it will return success as soon as the Bare Metal service acknowledges the request. so like, don't assume it's done just because it replied, okay? โญ

Parameters

  • session โ€” the session you're using to make this request, bestie. yeah, every single one of these needs it.
  • target โ€” the provisioning action you want, like active or provide. check the Bare Metal service docs for the full list of actions that exist, okay? โœจ
  • config_drive โ€” the config drive you're passing to the node. only valid for active and rebuild targets, lowkey. you can build one using functions from openstack.baremetal.configdrive ๐ŸŽ€
  • clean_steps โ€” the clean steps to execute. only valid for the clean target.
  • rescue_password โ€” password for the rescue operation. only valid for the rescue target ๐Ÿ”ฅ
  • wait โ€” whether to actually wait for the target state to be reached or just vibe and dip.
  • timeout โ€” timeout (in seconds) to wait for the target state to be reached. if it's None, you wait forever, no timeout, no cap, we die like legends ๐Ÿ’€
  • deploy_steps โ€” deploy steps to execute. only valid for active and rebuild targets.
  • service_steps โ€” service steps to execute. only valid for the service target.
  • runbook โ€” the UUID or logical name of a runbook.

Returns This Node instance. your node, your bestie, returned to you ๐Ÿซถ

Raises ValueError if config_drive, clean_steps, deploy_steps or rescue_password are provided with an invalid target. like, don't do that.

Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if the node reaches an error state while waiting for the state. ๐Ÿ˜ญ

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> if timeout is reached while waiting for the state.


wait_for_power_state(session, expected_state, timeout=None)

wait for the node to reach the expected power state. literally just sitting there refreshing until it happens โญ

Parameters

  • session โ€” the session to use for making this request.
  • expected_state โ€” the expected power state you want it to reach.
  • timeout โ€” if wait is set to True, this specifies how much (in seconds) to wait for the expected state to be reached. the value None (the default) means no client-side timeout. no cap, infinite patience ๐Ÿงš

Returns This Node instance.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> on timeout.


wait_for_provision_state(session, expected_state, timeout=None, abort_on_failed_state=True)

wait for the node to reach the expected state. provision-state edition ๐Ÿ’…

Parameters

  • session โ€” the session to use for making this request.
  • expected_state โ€” the expected provisioning state you want it to reach.
  • timeout โ€” if wait is set to True, this specifies how much (in seconds) to wait for the expected state to be reached. the value None (the default) means no client-side timeout.
  • abort_on_failed_state โ€” if True (the default), it aborts waiting if the node reaches a failure state which does not match the expected one. heads up though: the failure state for the enroll -> manageable transition is enroll again. yes really, that's the rule ๐Ÿ™ˆ

Returns This Node instance.

Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if the node reaches an error state and abort_on_failed_state is True.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> on timeout.


wait_for_reservation(session, timeout=None)

wait for a lock on the node to be released. we're waiting for the node to be free, basically ๐Ÿ’–

bare metal nodes in ironic have a reservation lock. it's used to represent that a conductor has locked the node while performing some sort of action โ€” like changing configuration as a result of a machine state change. main character conductor energy, honestly ๐Ÿ‘‘

this lock can occur during power syncronization, and it prevents updates to objects attached to the node, such as ports. so like, no touching while it's locked, okay?

heads up bestie: nothing prevents a conductor from acquiring the lock again after this call returns, so treat it as best effort. it's giving "I'll try my best" not "guaranteed" ๐Ÿ˜ญ

it returns immediately if there is no reservation on the node. slay, no waiting needed ๐Ÿ’…

Parameters

  • session โ€” the session to use for making this request.
  • timeout โ€” how much (in seconds) to wait for the lock to be released. the value None (the default) means no timeout.

Returns This Node instance.


inject_nmi(session)

inject NMI. that's it. that's the whole thing ๐Ÿ”ฅ

Parameters session โ€” the session to use for making this request.

Returns None


set_power_state(session, target, wait=False, timeout=None)

run an action modifying this node's power state โšก

this call is asynchronous, so it returns success as soon as the Bare Metal service acknowledges the request. it doesn't mean the thing is done, bestie, it means they heard you ๐Ÿ“ฃ

Parameters

  • session โ€” the session to use for making this request.
  • target โ€” target power state, as a PowerAction or a string.
  • wait โ€” whether to wait for the expected power state to be reached.
  • timeout โ€” timeout (in seconds) to wait for the target state to be reached. if None, wait without timeout.

attach_vmedia(session, device_type, image_url, image_download_source=None, retry_on_conflict=True)

attach a virtual media device to a node ๐ŸŽ€

Parameters

  • session โ€” the session to use for making this request.
  • device_type โ€” the type of virtual media device.
  • image_url โ€” the URL of the image to attach.
  • image_download_source โ€” the source of the image download.
  • retry_on_conflict โ€” whether to retry HTTP CONFLICT errors. this can happen when either the virtual media is already used on a node or the node is locked. since the latter happens more often, the default value is True. lowkey relatable, the node is always locked ๐Ÿ”’

Returns None

Raises NotSupported <#openstack.exceptions.NotSupported> if the server does not support the VMEDIA API. rude of the server, honestly.


detach_vmedia(session, device_types=None)

detach virtual media from a node. bye bye virtual media ๐Ÿ‘‹

Parameters

  • session โ€” the session to use for making this request.
  • device_types โ€” a list with the types of virtual media devices to detach.

Returns True if the virtual media was detached, otherwise False.

Raises NotSupported <#openstack.exceptions.NotSupported> if the server does not support the VMEDIA API


attach_vif(session, vif_id, retry_on_conflict=True, *, port_id=None, port_group_id=None)

attach a VIF to the node ๐ŸŒˆ

the exact form of the VIF ID depends on the network interface used by the node. in the most common case it's a Network service port (NOT a Bare Metal port) ID โ€” read that again, bestie, NOT a bare metal port. a VIF can only be attached to one node at a time, no sharing โœ‹

Parameters

  • session โ€” the session to use for making this request.
  • vif_id โ€” backend-specific VIF ID.
  • retry_on_conflict โ€” whether to retry HTTP CONFLICT errors. this can happen when either the VIF is already used on a node or the node is locked. since the latter happens more often, the default value is True.
  • port_id โ€” the UUID of the port to attach the VIF to. only one of port_id or port_group_id can be provided, pick one ๐Ÿ’…
  • port_group_id โ€” the UUID of the portgroup to attach to. only one of port_group_id or port_id can be provided. same deal, one or the other.

Returns None

Raises NotSupported <#openstack.exceptions.NotSupported> if the server does not support the VIF API.

Raises InvalidRequest <#openstack.exceptions.InvalidRequest> if both port_id and port_group_id are provided. like, you can't have both, that's the whole point ๐Ÿ˜ค


detach_vif(session, vif_id, ignore_missing=True)

detach a VIF from the node ๐Ÿฆ‹

the exact form of the VIF ID depends on the network interface used by the node. in the most common case it's a Network service port (NOT a Bare Metal port) ID. yeah, same warning as attach, it matters both ways ๐Ÿ’œ

Parameters

  • session โ€” the session to use for making this request.
  • vif_id โ€” backend-specific VIF ID.
  • ignore_missing โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the VIF does not exist. otherwise, False is returned. basically: do you want drama or do you want peace? ๐Ÿ™ˆ

Returns True if the VIF was detached, otherwise False.

  • Raises NotSupported (that's openstack.exceptions.NotSupported) if the server doesn't support the VIF API. Like, it's literally just not a thing on that server, bestie, don't take it personally ๐Ÿ’…

list_vifs(session)

Ok so this one lists the IDs of all the VIFs attached to the node โœจ

Heads up tho: the exact form of the VIF ID depends on whatever network interface the node is using. In the most common case it's a Network service port (and NOT a Bare Metal port) ID. Iykyk ๐Ÿซถ

  • session โ€” the session you're using to make this request.

Returns โ€” a list of VIF IDs, as strings ๐ŸŒธ

Raises NotSupported (openstack.exceptions.NotSupported) if the server doesn't support the VIF API.


validate(session, required=('boot', 'deploy', 'power'))

Validate the required info on the node. Vibe check for your node, basically ๐Ÿ‘‘

  • session โ€” the session you're using to make this request.
  • required โ€” list of interfaces that are required to pass validation. The default value is the list of minimum required interfaces for provisioning (that's ('boot', 'deploy', 'power'), iconically).

Returns โ€” a dict mapping interface names to ValidationResult objects โญ

Raises ValidationException (openstack.exceptions.ValidationException) if validation fails for a required interface. Not the vibe. ๐Ÿ˜ญ


set_maintenance(session, reason=None)

Turns maintenance mode on for the node. It's giving "do not disturb" ๐Ÿšง

  • session โ€” the session you're using to make this request.
  • reason โ€” optional reason for maintenance. Tell them why, bestie.

Returns โ€” this Node instance ๐Ÿ’–


unset_maintenance(session)

Turns maintenance mode off for the node. Back online, main character energy โœจ

  • session โ€” the session you're using to make this request.

Returns โ€” this Node instance ๐Ÿ’–


get_boot_device(session)

Gets the node's boot device. Which thing is it booting from, fr fr ๐Ÿฅพ

  • session โ€” the session you're using to make this request.

Returns โ€” the HTTP response.


set_boot_device(session, boot_device, persistent=False)

Sets the node's boot device ๐Ÿ”ฅ

  • session โ€” the session you're using to make this request.
  • boot_device โ€” the boot device to assign to the node.
  • persistent โ€” if the boot device change is maintained after the node reboots. Defaults to False, so it's a temporary slay unless you say otherwise.

Returns โ€” None


get_supported_boot_devices(session)

Gets the boot devices that are supported for the node. The menu of options ๐Ÿ“

  • session โ€” the session you're using to make this request.

Returns โ€” the HTTP response.


set_boot_mode(session, target)

Makes a request to change the node's boot mode ๐Ÿฆ‹

This call is asynchronous โ€” it returns success as soon as the Bare Metal service acknowledges the request. So like, it said "yes bestie" but the actual work is still happening in the background, ngl.

  • session โ€” the session you're using to make this request.
  • target โ€” the boot mode to set for the node, one of either 'uefi' or 'bios'.

Returns โ€” None

Raises ValueError if target is not one of 'uefi' or 'bios'.


set_secure_boot(session, target)

Makes a request to change the node's secure boot state ๐Ÿ”

Same deal as above โ€” this call is asynchronous, and it returns success as soon as the Bare Metal service acknowledges the request. The service is doing its thing, ok? ๐Ÿ™ˆ

  • session โ€” the session you're using to make this request.
  • target โ€” a boolean indicating the secure boot state to set. True/False correspond to 'on'/'off' respectively.

Returns โ€” None

Raises ValueError if target is not boolean.


add_trait(session, trait)

Adds a trait to the node. Giving it a little accessory ๐ŸŽ€

  • session โ€” the session you're using to make this request.
  • trait โ€” the trait to add to the node.

Returns โ€” None


remove_trait(session, trait, ignore_missing=True)

Removes a trait from the node. Accessory off, we're moving on ๐Ÿ’…

  • session โ€” the session you're using to make this request.
  • trait โ€” the trait to remove from the node.
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the trait doesn't exist. Otherwise, False is returned. Default is True, so by default it's chill about it.

Returns bool โ€” True on successfully removing the trait. False when the trait doesn't exist already.


set_traits(session, traits)

Sets traits for the node ๐ŸŒˆ

It removes any existing traits and then adds the traits you passed in to this method. So like, it's a full reset, not a merge โ€” no cap.

  • session โ€” the session you're using to make this request.
  • traits โ€” list of traits to add to the node.

Returns โ€” None


call_vendor_passthru(session, verb, method, body=None)

Calls a vendor passthru method. Fancy driver-specific stuff ๐Ÿ‘‘

  • session โ€” the session you're using to make this request.
  • verb โ€” the HTTP verb, one of GET, POST, PUT, DELETE.
  • method โ€” the method to call using vendor_passthru.
  • body โ€” the JSON body in the HTTP call.

Returns โ€” the HTTP response.

Raises ValueError if verb is not one of GET, POST, PUT, DELETE


list_vendor_passthru(session)

Lists the vendor passthru methods for the node ๐Ÿ“‹

  • session โ€” the session you're using to make this request.

Returns โ€” the HTTP response.


get_console(session)

Gets the node console. Peek at what's happening inside ๐Ÿ–ฅ๏ธ

  • session โ€” the session you're using to make this request.

Returns โ€” the HTTP response.


set_console_mode(session, enabled)

Sets the node console mode ๐ŸŽ›๏ธ

  • session โ€” the session you're using to make this request.
  • enabled โ€” whether the console should be enabled or not.

Returns โ€” None


get_node_inventory(session, node_id=None)

Gets a node's inventory. All the deets about the hardware โœจ

  • session โ€” the session you're using to make this request.
  • node_id โ€” DEPRECATED The ID of the node. Yeah it's deprecated, don't come for me, it's still documented ๐Ÿ’€

Returns โ€” the HTTP response.


list_firmware(session)

Lists the firmware components associated with the node ๐Ÿ”ง

  • session โ€” the session you're using to make this request.

Returns โ€” the HTTP response.


patch(session, patch=None, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None, reset_interfaces=None)

Patches the remote resource ๐Ÿฉน

This lets you modify the resource by providing a list of JSON patches to apply to it. The patches can use both the original (server-side) and SDK field names โ€” flexible, we love that.

  • session โ€” the session you're using to make this request.
  • patch โ€” additional JSON patch, as a list or one patch item. If provided, it's applied on top of any changes to the current resource.
  • prepend_key โ€” whether the resource_key (openstack.resource.Resource.resource_key) should be prepended in a resource creation request. Defaults to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults alone.
  • base_path โ€” the base part of the URI for modifying resources, if it's different from base_path (openstack.resource.Resource.base_path).
  • microversion โ€” API version to override the negotiated one.
  • reset_interfaces โ€” yes this parameter is in the signature, and no, the original doesn't describe it. We're just acknowledging its existence respectfully ๐Ÿซถ

Returns โ€” this Resource instance.

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_patch is not set to True. So like, if the resource didn't opt in, it's a no. ๐Ÿ™…โ€โ™€๏ธ


๐ŸŽ€ The PowerAction Class ๐ŸŽ€

The PowerAction enumeration represents known power actions. Think of it as the official list of ways to tell a node to move ๐Ÿ’…

class openstack.baremetal.v1.node.PowerAction(*values)

A mapping from an action to a target power state โœจ

  • POWER_ON = 'power on' โ€” power on the node. Wake up babe ๐ŸŒž
  • POWER_OFF = 'power off' โ€” power off the node (using hard power off). Brutal but effective ๐Ÿ’€
  • REBOOT = 'rebooting' โ€” reboot the node (using hard power off). Off and back on again ๐Ÿ”„
  • SOFT_POWER_OFF = 'soft power off' โ€” power off the node using soft power off. The gentle version ๐Ÿงš
  • SOFT_REBOOT = 'soft rebooting' โ€” reboot the node using soft power off. Still gentle, still rebooting ๐ŸŒธ

๐Ÿ’– The ValidationResult Class

okay so ValidationResult is literally just the receipt ๐Ÿงพ of a validation โ€” it holds how that check went.

class openstack.baremetal.v1.node.ValidationResult(result, reason)
Result of a single interface validation. yes bestie, one interface at a time ๐Ÿ’…

Variables (these are the whole personality of the class โœจ):

  • result โ€” the outcome of a validation: True means slay (success), False means nope (failure), and None means that interface isn't even supported, don't @ me.
  • reason โ€” if result is False or None, this is the explanation of why. the receipts, basically ๐Ÿ™ˆ

๐Ÿฆ‹ The WaitResult Class

WaitResult is the group-chat poll result of waiting on a whole squad of nodes.

class openstack.baremetal.v1.node.WaitResult(success, failure, timeout)

A named tuple representing a result of waiting for several nodes. ๐Ÿ“‹

Each component is a list of Node objects:

Variables:

  • ~.success โ€” a list of Node objects that reached the state. they made it, periodt ๐Ÿ‘‘
  • ~.timeout โ€” a list of Node objects that reached timeout. they were still "omw" ๐Ÿ˜ญ
  • ~.failure โ€” a list of Node objects that hit a failure. not the vibe ๐Ÿ’€
Create new instance of WaitResult(success, failure, timeout)

๐ŸŽ€ openstack.baremetal.v1.port

The Port Class

The Port class inherits from Resource <#openstack.resource.Resource>. it's giving very much "networking icon" energy ๐Ÿ”Œ

class openstack.baremetal.v1.port.Port(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” ok so this is not intended to be used directly ๐Ÿ™…โ€โ™€๏ธ. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None so that Resource objects can be used without an active Connection, like in unit tests, bestie. Any use of self._connection in Resource code should protect itself with a check for None. safety first โœจ
  • resources_key = 'ports' โ€” Plural form of key for resource.
  • base_path = '/ports' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_patch = True โ€” Allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True. no substitutions ๐Ÿ”ฅ
  • address โ€” The physical hardware address of the network port, typically the hardware MAC address. ๐Ÿท๏ธ
  • category โ€” The category for the port.
  • created_at โ€” Timestamp at which the port was created. โฐ
  • description โ€” The description for the port.
  • extra โ€” A set of one or more arbitrary metadata key and value pairs.
  • id โ€” The UUID of the port.
  • internal_info โ€” Internal metadata set and stored by the port. This field is read-only. Added in API microversion 1.18. ๐Ÿ™ˆ
  • is_pxe_enabled โ€” Whether PXE is enabled on the port. Added in API microversion 1.19.
  • is_smartnic โ€” Whether the port is a Smart NIC port. Added in API microversion 1.53.
  • links โ€” A list of relative links, including the self and bookmark links.
  • local_link_connection โ€” The port bindig profile (yes, "bindig", that's how the source says it, i don't make the rules ๐Ÿ˜ญ). If specified, must contain switch_id and port_id fields. switch_info field is an optional string field to be used to store vendor specific information. Added in API microversion 1.19.
  • name โ€” The name of the port.
  • node_id โ€” The UUID of node this port belongs to.
  • physical_network โ€” The name of physical network this port is attached to. Added in API microversion 1.34.
  • port_group_id โ€” The UUID of PortGroup this port belongs to. Added in API microversion 1.24.
  • updated_at โ€” Timestamp at which the port was last updated.
  • vendor โ€” The vendor for the port.

๐ŸŒธ openstack.baremetal.v1.port_group

The PortGroup Class

The PortGroup class inherits from Resource <#openstack.resource.Resource>. it's the friend group, and the ports are the members ๐Ÿซถ

class openstack.baremetal.v1.port_group.PortGroup(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'portgroups' โ€” Plural form of key for resource.
  • base_path = '/portgroups' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_patch = True โ€” Allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • address โ€” The physical hardware address of the portgroup, typically the hardware MAC address. Added in API microversion 1.23.
  • created_at โ€” Timestamp at which the portgroup was created. โฐ
  • extra โ€” A set of one or more arbitrary metadata key and value pairs.
  • name โ€” The name of the portgroup.
  • id โ€” The UUID for the portgroup.
  • internal_info โ€” Internal metadaa set and stored by the portgroup (yep, "metadaa" โ€” typos stay, i don't fix the source, i just vibe check it ๐Ÿ’€).
  • is_standalone_ports_supported โ€” Whether ports that are members of this portgroup can be used as standalone ports. Added in API microversion 1.23.
  • links โ€” A list of relative links, including the self and bookmark links.
  • mode โ€” Port bonding mode. Added in API microversion 1.26.
  • node_id โ€” UUID of the node this portgroup belongs to.
  • ports โ€” A list of links to the collection of ports belonging to this portgroup. Added in API microversion 1.24.
  • properties โ€” Port group properties. Added in API microversion 1.26.
  • updated_at โ€” Timestamp at which the portgroup was last updated.

๐Ÿงš openstack.baremetal.v1.runbooks

The Runbook Class

The Runbook class inherits from Resource <#openstack.resource.Resource>. main character energy for automation steps ๐Ÿ‘‘

class openstack.baremetal.v1.runbooks.Runbook(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'runbooks' โ€” Plural form of key for resource.
  • base_path = '/runbooks' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_patch = True โ€” Allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • name โ€” The name of this resource.
  • created_at โ€” Timestamp at which the runbook was created. โฐ
  • description โ€” A human readable description of the runbook. Introduced in API microversion 1.112.
  • extra โ€” A set of one or more arbitrary metadata key and value pairs.
  • links โ€” A list of relative links. Includes the self and bookmark links.
  • steps โ€” A set of physical information of the runbook.
  • public โ€” Indicates whether the runbook is publicly accessible. ๐Ÿ‘€
  • owner โ€” The name or ID of the project that owns the runbook.
  • traits โ€” The traits of the runbook. A node may only be acted upon by a runbook whose traits intersect with the traits of the node. Read-only here, use the trait methods to modify it. Introduced in API microversion 1.112.
  • updated_at โ€” Timestamp at which the runbook was last updated.
  • id โ€” The UUID of the resource.

๐Ÿช„ add_trait(session, trait)

Add a trait to the runbook. โœจ

Parameters:

  • session โ€” The session to use for making this request.
  • trait โ€” The trait to add to the runbook.

Returns: None

๐Ÿงน remove_trait(session, trait)

Remove a trait from the runbook.

Removing a trait the runbook does not have is a no-op on the server side. so like, nothing happens, no drama, it's fine ๐Ÿ’…

Parameters:

  • session โ€” the session you're using to make this request, bestie.
    • trait โ€” the trait you wanna yeet out of the runbook.

Returns None

set_traits(session, traits) Set traits for the runbook.

This one clears out whatever traits were already there and drops in the traits you pass to this method. Pass an empty list and it nukes all the traits โ€” total clean slate โœจ

Parameters

  • session โ€” the session to use for making this request.
  • traits โ€” list of traits to set on the runbook.

Returns None


openstack.baremetal.v1.volume_connector

The VolumeConnector Class

The VolumeConnector class inherits from Resource <#openstack.resource.Resource>. ๐Ÿ’…

class openstack.baremetal.v1.volume_connector.VolumeConnector(_synchronized=False,
       connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” okay so this is not meant to be used directly, no cap. Go look at new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active connection (unit tests, we love you). If you're using self._connection in Resource code, protect yourself with a check for None.

resources_key = 'connectors' Plural form of the key for this resource.

base_path = '/volume/connectors' The base part of the URI for this resource.

allow_create = True Allow create operation for this resource.

allow_fetch = True Allow get operation for this resource.

allow_commit = True Allow update operation for this resource.

allow_delete = True Allow delete operation for this resource.

allow_list = True Allow list operation for this resource.

allow_patch = True Allow patch operation for this resource.

commit_method = 'PATCH' Method for committing a resource. This must be PATCH if allow_patch is True โ€” like, that's the rule, periodt.

created_at Timestamp at which the port was created.

extra A set of one or more arbitrary metadata key and value pairs.

links A list of relative links, including the self and bookmark links.

node_id The UUID of node this port belongs to.

type The types of Volume connector.

updated_at Timestamp at which the port was last updated.

id The UUID of the port.


openstack.baremetal.v1.volume_target

The VolumeTarget Class

The VolumeTarget class inherits from Resource <#openstack.resource.Resource>. ๐Ÿฆ‹

class openstack.baremetal.v1.volume_target.VolumeTarget(_synchronized=False,
       connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not intended to be used directly, fr fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'targets' Plural form of the key for this resource.

base_path = '/volume/targets' The base part of the URI for this resource.

allow_create = True Allow create operation for this resource.

allow_fetch = True Allow get operation for this resource.

allow_commit = True Allow update operation for this resource.

allow_delete = True Allow delete operation for this resource.

allow_list = True Allow list operation for this resource.

allow_patch = True Allow patch operation for this resource.

commit_method = 'PATCH' Method for committing a resource. This must be PATCH if allow_patch is True.

created_at Timestamp at which the port was created.

extra A set of one or more arbitrary metadata key and value pairs.

links A list of relative links. Includes the self and bookmark links.

node_id The UUID of the Node this resource belongs to.

properties A set of physical information of the volume.

updated_at Timestamp at which the port was last updated.

id The UUID of the resource.

volume_id The identifier of the volume.

volume_type The type of Volume target.


โœจ Baremetal Introspection Resources โœจ

openstack.baremetal_introspection.v1.Introspection

The Introspection Class

The Introspection class inherits from Resource <#openstack.resource.Resource>. ๐Ÿงš

class openstack.baremetal_introspection.v1.introspection.Introspection(_synchronized=False,
       connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'introspection' Plural form of key for resource.

base_path = '/introspection' The base part of the URI for this resource.

allow_create = True Allow create operation for this resource.

allow_fetch = True Allow get operation for this resource.

allow_commit = False Allow update operation for this resource.

allow_delete = True Allow delete operation for this resource.

allow_list = True Allow list operation for this resource.

create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=True, response_has_body=False)

CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=True, response_has_body=False)

Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create() โ€” iconic behavior honestly.

finished_at Timestamp at which the introspection was finished.

error The last error message (if any). ๐Ÿ˜ญ

id The UUID of the introspection (matches the node UUID).

is_finished Whether introspection is finished.

links A list of relative links, including the self and bookmark links.

started_at Timestamp at which the introspection was started.

state The current introspection state.

abort(session) Abort introspection.

Parameters session โ€” the session to use for making this request.

get_data(session, processed=True) Get introspection data.

Heads up bestie: the introspection data format is not stable and can vary from environment to environment. Do not be surprised, okay?

Parameters

  • session โ€” the session to use for making this request.
  • processed โ€” whether to fetch the final processed data (the default) or the raw unprocessed data as received from the ramdisk.

Returns introspection data from the most recent successful run.

wait(session, timeout=None, ignore_error=False) Wait for the node to reach the expected state. ๐Ÿ•ฐ๏ธ

Parameters

  • session โ€” the session to use for making this request.
  • timeout โ€” how much (in seconds) to wait for the introspection. The value of None (the default) means no client-side timeout.
  • ignore_error โ€” if True, this call will raise an exception if the introspection reaches the error state. Otherwise the error state is considered successful and the call returns.

Returns This Introspection instance.

Raises ResourceFailure <#openstack.exceptions.ResourceFailure> if introspection fails and ignore_error is False.

Raises ResourceTimeout <#openstack.exceptions.ResourceTimeout> on timeout.


openstack.baremetal_introspection.v1.introspection_rule

The IntrospectionRule Class

The IntrospectionRule class inherits from Resource <#openstack.resource.Resource>. ๐ŸŒธ

class openstack.baremetal_introspection.v1.introspection_rule.IntrospectionRule(_synchronized=False,
       connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'rules' Plural form of key for resource.

base_path = '/rules' The base part of the URI for this resource.

  • allow_create = True โ€” creating this resource? allowed, bestie โœ…
  • allow_fetch = True โ€” fetching/getting this resource? also allowed, no cap.
  • allow_commit = False โ€” updating this resource? nope, not here ๐Ÿ’…
  • allow_delete = True โ€” deleting it? yep, allowed.
  • allow_list = True โ€” listing it? allowed, periodt.
  • create_opts โ€” class-level config for the create op. The default is literally:
create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=True, response_has_body=True)

Subclasses can override this to set per-resource defaults without overriding create(). iykyk ๐Ÿ’…

  • id โ€” the UUID of the resource.
  • conditions โ€” โ€œList of a logic statementd or operations in rulesโ€ โ€” yes, thatโ€™s the wording, bestie ๐Ÿซถ
  • actions โ€” list of operations that will be performed if conditions of this rule are fulfilled.
  • description โ€” rule human-readable description.
  • scope โ€” scope of an introspection rule.
  • links โ€” a list of relative links, including the self and bookmark links.

๐Ÿงฑ Block Storage Resources ๐Ÿงฑ

๐Ÿ’พ Block Storage v2 Resources ๐Ÿ’พ

๐Ÿ—„๏ธ openstack.block_storage.v2.backup ๐Ÿ—„๏ธ

The Backup Class โ€” The Backup class inherits from Resource <#openstack.resource.Resource>. Itโ€™s giving backup main character energy.

class openstack.block_storage.v2.backup.Backup(_synchronized=False,
connection=None, **attrs)

Volume Backup. The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'backup' โ€” singular form of key for resource.
  • resources_key = 'backups' โ€” plural form of key for resource.
  • base_path = '/backups' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • availability_zone โ€” Properties backup availability zone.
  • container โ€” the container backup in.
  • created_at โ€” the date and time when the resource was created.
  • data_timestamp โ€” data timestamp The time when the data on the volume was first saved. If it is a backup from volume, it will be the same as created_at for a backup. If it is a backup from a snapshot, it will be the same as created_at for the snapshot.
  • description โ€” backup description.
  • fail_reason โ€” Backup fail reason.
  • force โ€” Force backup.
  • has_dependent_backups โ€” If this value is true, there are other backups depending on this backup.
  • is_incremental โ€” Indicates whether the backup mode is incremental. If this value is true, the backup mode is incremental. If this value is false, the backup mode is full.
  • links โ€” a list of links associated with this volume. Type: list.
  • name โ€” backup name.
  • object_count โ€” backup object count.
  • size โ€” the size of the volume, in gibibytes (GiB).
  • snapshot_id โ€” the UUID of the source volume snapshot.
  • status โ€” backup status values: creating, available, deleting, error, restoring, error_restoring.
  • updated_at โ€” the date and time when the resource was updated.
  • volume_id โ€” the UUID of the volume.
  • volume_name โ€” the name of the volume.

classmethod import_record(session, *, service, url) โ€” Import information about a backup.

Parameters

  • session โ€” the session to use for making this request.
  • service โ€” the service used to perform the backup.
  • url โ€” an identifier string to locate the backup.

Returns: The imported backup.

export_record(session) โ€” Export the current backup.

Parameters

  • session โ€” openstack session.

Returns: The backup export record fields.

restore(session, volume_id=None, name=None) โ€” Restore current backup to volume.

Parameters

  • session โ€” openstack session.
  • volume_id โ€” the ID of the volume to restore the backup to.
  • name โ€” the name for new volume creation to restore.

Returns: Updated backup instance.

force_delete(session) โ€” Force backup deletion.

Parameters

  • session โ€” the session to use for making this request.

Returns: None.

reset_status(session, status) โ€” Reset the status of the backup.

Parameters

  • session โ€” the session to use for making this request.

Returns: None.

๐ŸŽ›๏ธ openstack.block_storage.v2.capabilities ๐ŸŽ›๏ธ

The Capabilities Class โ€” The Capabilities class inherits from Resource <#openstack.resource.Resource>. Capabilities core, honestly.

class
openstack.block_storage.v2.capabilities.Capabilities(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • base_path = '/capabilities' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • description โ€” Properties The capabilities description.
  • display_name โ€” the name of volume backend capabilities.
  • driver_version โ€” the driver version.
  • namespace โ€” the storage namespace, such as OS::Storage::Capabilities::foo.
  • pool_name โ€” the name of the storage pool.
  • properties โ€” the backend volume capabilites list, which consists of cinder standard capabilities and vendor unique properties.
  • replication_targets โ€” a list of volume backends used to replicate volumes on this backend.
  • storage_protocol โ€” the storage backend for the backend volume.
  • vendor_name โ€” the name of the vendor.
  • visibility โ€” the volume type access.
  • volume_backend_name โ€” the name of the back-end volume.

๐Ÿงฉ openstack.block_storage.v2.consistency_group ๐Ÿงฉ

The ConsistencyGroup Class โ€” The ConsistencyGroup class inherits from Resource <#openstack.resource.Resource>. Group chat, but make it storage.

class
openstack.block_storage.v2.consistency_group.ConsistencyGroup(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'consistencygroup' โ€” singular form of key for resource.
  • resources_key = 'consistencygroups' โ€” plural form of key for resource.
  • base_path = '/consistencygroups' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • availability_zone โ€” the availability zone.
  • created_at โ€” the date and time when this resource was created.
  • description โ€” the description.
  • name โ€” the name.
  • status โ€” the status.
  • volume_types โ€” the volume types.
  • add_volumes โ€” comma-separated list of volume UUIDs to add to the consistency group. Used in update requests only.
  • remove_volumes โ€” comma-separated list of volume UUIDs to remove from the consistency group. Used in update requests only.

classmethod create_from_source(session, *, consistency_group_snapshot_id=None, consistency_group_id=None, name=None, description=None) โ€” Creates a new group from source.

Parameters

  • session โ€” the session you're using to make this request ๐Ÿซถ
  • consistency_group_snapshot_id โ€” the ID of a consistency group snapshot you want to build the new consistency group from. You gotta give this or consistency_group_id, like, one of them, bestie, not neither ๐Ÿ’…
  • consistency_group_id โ€” the ID of a consistency group to create the new consistency group from. Again: this or consistency_group_snapshot_id must be provided โœจ
  • name โ€” the name you're slapping on the new consistency group ๐ŸŽ€
  • description โ€” the description to set on the new consistency group ๐ŸŒธ

Returns The created consistency group. Iconic, honestly ๐Ÿ˜Œ

delete(session, error_message=None, *, microversion=None, base_path=None, params=None) Deletes the remote resource that this instance is pointing at. Bye bye ๐Ÿ‘‹๐Ÿ’€

Parameters

  • session โ€” the session to use when making this request.
  • microversion โ€” the API version that overrides the one that got negotiated ๐Ÿ”ฅ
  • base_path โ€” the base part of the URI for modifying resources, if it's different from base_path <#openstack.resource.Resource.base_path>.
  • params โ€” query string parameters you want included in the request URL.

Returns This Resource instance ๐Ÿซถ

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True.

Raises NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found ๐Ÿ˜ญ


๐ŸŒˆ openstack.block_storage.v2.consistency_group_snapshot

The ConsistencyGroupSnapshot Class

The ConsistencyGroupSnapshot class inherits from Resource <#openstack.resource.Resource>. Slay, lineage ๐Ÿ’–

class openstack.block_storage.v2.consistency_group_snapshot.ConsistencyGroupSnapshot(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” this one is not meant to be used directly, okay? See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead ๐Ÿซถ
  • connection โ€” a reference to the Connection being used. It defaults to None so Resource objects can be used without an active Connection, like in unit tests. And if you're touching self._connection inside Resource code, protect yourself with a check for None, mkay? ๐Ÿ’…

resource_key = 'cgsnapshot' The singular form of the key for this resource.

resources_key = 'cgsnapshots' The plural form of the key for this resource.

base_path = '/cgsnapshots' The base part of the URI for this resource.

allow_fetch = True Allows the get operation for this resource.

allow_create = True Allows the create operation for this resource.

allow_delete = True Allows the delete operation for this resource.

allow_list = True Allows the list operation for this resource.

consistencygroup_id The UUID of the source consistency group ๐ŸŒธ

created_at The date and time when this resource was created โฐ

description The description.

name The name.

status The status.


๐Ÿฆ‹ openstack.block_storage.v2.extension

The Extension Class

The Extension class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v2.extension.Extension(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” nope, not for direct use, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

resources_key = 'extensions' The plural form of the key for this resource.

base_path = '/extensions' The base part of the URI for this resource.

allow_list = True Allows the list operation for this resource.

alias The alias for the extension.

description The extension description.

links Links pertaining to this extension ๐Ÿ”—

name The name of this extension.

namespace A URL pointing to the namespace for this extension.

updated_at The date and time when the resource was updated. The date and time stamp format is ISO 8601 โฐโœจ


๐ŸŽ€ openstack.block_storage.v2.limits

The AbsoluteLimit Class

The AbsoluteLimit class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v2.limits.AbsoluteLimit(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly, periodt. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

max_total_backup_gigabytes The maximum total amount of backups, in gibibytes (GiB).

max_total_backups The maximum number of backups.

max_total_snapshots The maximum number of snapshots.

max_total_volume_gigabytes The maximum total amount of volumes, in gibibytes (GiB).

max_total_volumes The maximum number of volumes.

total_backup_gigabytes_used The total number of backups gibibytes (GiB) used.

total_backups_used The total number of backups used.

total_gigabytes_used The total number of gibibytes (GiB) used.

total_snapshots_used The total number of snapshots used.

total_volumes_used The total number of volumes used ๐Ÿ“Š


The Limits Class

The Limit class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v2.limits.Limits(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” this is not intended to be used directly, okay? See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

resource_key = 'limits' The singular form of the key for this resource.

base_path = '/limits' The base part of the URI for this resource.

allow_fetch = True Allows the get operation for this resource.

absolute An absolute limits object.

rate Rate-limit volume copy bandwidth, used to mitigate slowdown of data access from the instances ๐ŸŽ๏ธ๐Ÿ’จ


The RateLimit Class

The RateLimit class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v2.limits.RateLimit(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” do not use this directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

next_available Rate limits next available time โณ

remaining Integer for rate limits remaining.

unit Unit of measurement for the value parameter.

value Integer number of requests which can be made.

verb An HTTP verb (POST, PUT, etc.) ๐Ÿ”ฅ


The RateLimits Class

The RateLimits class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v2.limits.RateLimits(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not meant to be used directly, periodt. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

limits A list of the specific limits that apply to the regex and uri.

regex A regex representing which routes this rate limit applies to.

uri A URI representing which routes this rate limit applies to ๐ŸŒˆ


๐Ÿงš openstack.block_storage.v2.qos_spec

The QoSSpec Class

The QoSSpec class inherits from Resource <#openstack.resource.Resource>.

  • associate(session, vol_type_id) โ€” links this QoS spec to a volume type, bestie. Params: session (the session for making this request) and vol_type_id (the ID of the volume type you're associating with). ๐Ÿ’…
  • disassociate(session, vol_type_id) โ€” breaks up this QoS spec and a volume type ๐Ÿ˜ญ params again: session (session for the request) and vol_type_id (the ID of the volume type you're disassociating from).
  • disassociate_all(session) โ€” severs this QoS spec from all the volume types at once, no cap. Param: session โ€” the session to use for making this request.
  • delete_keys(session, keys) โ€” yeets keys out of this QoS spec. Params: session (session for the request) and keys (the keys to delete). ๐Ÿ—‘๏ธ

openstack.block_storage.v2.qos_spec โ€” the QoSSpecAssociation era ๐Ÿฆ‹

The QoSSpecAssociation Class

The QoSSpecAssociation class inherits from Resource.

class openstack.block_storage.v2.qos_spec.QoSSpecAssociation(_synchronized=False,
connection=None, **attrs)

It's the base resource, periodt. Parameters:

  • _synchronized โ€” literally not meant to be used directly, iykyk. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ

resources_key = 'qos_associations' โ€” plural form of key for resource.

base_path = '/qos-specs/%(qos_spec_id)s/associations' โ€” the base part of the URI for this resource.

allow_list = True โ€” list operation is allowed for this resource.

association_type โ€” the type of association (e.g. "volume_type"). โญ

id โ€” the ID of the associated resource.

name โ€” the name of the associated resource.

qos_spec_id โ€” the ID of the QoS spec. ๐Ÿ’–


openstack.block_storage.v2.quota_class_set โœจ

The QuotaClassSet Class

The QuotaClassSet class inherits from Resource.

class openstack.block_storage.v2.quota_class_set.QuotaClassSet(_synchronized=False,
connection=None, **attrs)

Base resource energy. Parameters:

  • _synchronized โ€” please do not use this directly, it's not for you. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ’€

resource_key = 'quota_class_set' โ€” singular form of key for resource.

base_path = '/os-quota-class-sets' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” get operation is allowed for this resource.

allow_commit = True โ€” update operation is allowed for this resource.

backup_gigabytes โ€” the size (GiB) of backups that are allowed for each project.

backups โ€” the number of backups that are allowed for each project.

gigabytes โ€” the size (GiB) of volumes and snapshots that are allowed for each project.

groups โ€” the number of groups that are allowed for each project.

per_volume_gigabytes โ€” the size (GiB) of volumes in request that are allowed for each volume.

snapshots โ€” the number of snapshots that are allowed for each project.

volumes โ€” the number of volumes that are allowed for each project. ๐ŸŽ€


openstack.block_storage.v2.quota_set ๐ŸŒธ

The QuotaSet Class

The QuotaSet class inherits from Resource.

class openstack.block_storage.v2.quota_set.QuotaSet(_synchronized=False,
connection=None, **attrs)

The base resource, as ever. Parameters:

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿงš

backup_gigabytes โ€” properties, the size (GB) of backups that are allowed for each project. (Yep, GB here, not GiB โ€” that's what it says, don't come for me ๐Ÿ™ˆ)

backups โ€” the number of backups that are allowed for each project.

gigabytes โ€” the size (GB) of volumes and snapshots that are allowed for each project.

groups โ€” the number of groups that are allowed for each project.

per_volume_gigabytes โ€” the size (GB) of volumes in request that are allowed for each volume.

snapshots โ€” the number of snapshots that are allowed for each project.

volumes โ€” the number of volumes that are allowed for each project. ๐Ÿ’œ


openstack.block_storage.v2.service ๐Ÿ”ฅ

The Service Class

The Service class inherits from Resource.

class openstack.block_storage.v2.service.Service(_synchronized=False,
connection=None, **attrs)

Base resource behaviour, iconic as always. Parameters:

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐ŸŒˆ

resources_key = 'services' โ€” plural form of key for resource.

base_path = '/os-services' โ€” the base part of the URI for this resource.

allow_list = True โ€” list operation is allowed for this resource.

active_backend_id โ€” the ID of active storage backend (cinder-volume services only).

availability_zone โ€” the availability zone of service.

binary โ€” binary name of service.

disabled_reason โ€” disabled reason of service.

host โ€” the name of the host where service runs.

name โ€” service name.

replication_status โ€” the volume service replication status (cinder-volume services only).

state โ€” state of service.

status โ€” status of service.

updated_at โ€” the date and time when the resource was updated. โฐ

classmethod find(session, name_or_id, ignore_missing=True, list_base_path=None, *, microversion=None, all_projects=None, **params)

Find a resource by its name or id. The signature is exactly that, all_projects included โ€” that's the vibe check, no further tea in the docs. ๐Ÿ“

Parameters:

  • session โ€” the session to use for making this request.
  • name_or_id โ€” this resource's identifier, if needed by the request. The default is None.
  • ignore_missing โ€” when set to False, NotFoundException (from openstack.exceptions) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. ๐Ÿ‘‘
  • list_base_path โ€” base_path to be used when need listing resources.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” any additional parameters to be passed into underlying methods, such as to existing() in order to pass on URI parameters.
Ngl, that ignore_missing default of True is lowkey the whole personality of this method โ€” False means it will throw hands via NotFoundException. ๐Ÿ’…

Returns โ€” the Resource object that matches the name or id you handed it, or None if literally nothing matches. ๐Ÿซถ

Raises openstack.exceptions.DuplicateResource if more than one resource shows up for this request (messy, we don't love that).

Raises openstack.exceptions.NotFoundException if nothing is found and ignore_missing is False. no vibes found, so it throws hands ๐Ÿ˜ญ

commit(session, prepend_key=False, *args, **kwargs)

Commits the state of your instance to the remote resource. like hitting send on the whole object ๐Ÿ’…

Parameters

  • session โ€” the session used to make this request.
  • prepend_key โ€” whether resource_key should be prepended in a resource creation request. Default to True. (yes, the signature says False, the docs say True, that's just how it is, don't come for me ๐Ÿ™ˆ)
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults alone.
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path.
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns โ€” this Resource instance. iconic.

Raises MethodNotSupported if Resource.allow_commit is not set to True. so check your flags bestie โœจ

enable(session)

Enable service. that's it, that's the whole thing ๐Ÿ’–

disable(session, *, reason=None)

Disable service. you can pass a reason, optional, no pressure.

failover(session, *, backend_id=None)

Failover a service.

Only applies to replicating cinder-volume services. like, specifically those, don't try it elsewhere ๐Ÿ”ฅ


๐Ÿฆ‹ openstack.block_storage.v2.snapshot

The Snapshot Class

The Snapshot class inherits from Resource.

class openstack.block_storage.v2.snapshot.Snapshot(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None. safety first ๐ŸŽ€

resource_key = 'snapshot' : Singular form of key for resource.

resources_key = 'snapshots' : Plural form of key for resource.

base_path = '/snapshots' : The base part of the URI for this resource.

allow_fetch = True : Allow get operation for this resource.

allow_create = True : Allow create operation for this resource.

allow_delete = True : Allow delete operation for this resource.

allow_commit = True : Allow update operation for this resource.

allow_list = True : Allow list operation for this resource.

created_at : The timestamp of this snapshot creation.

description : Description of snapshot. Default is None.

is_forced : Indicate whether to create snapshot, even if the volume is attached. Default is False. Type: bool.

size : The size of the volume, in gibibytes (GiB).

status : The current status of this snapshot. Potential values are creating, available, deleting, error, and error_deleting.

updated_at : The date and time when the resource was updated.

volume_id : The ID of the volume this snapshot was taken of.

force_delete(session)

Force snapshot deletion. blunt force, but make it storage ๐Ÿ’€

reset_status(session, status)

Reset the status of the snapshot. you say what the status should be, it obeys.

classmethod manage(session, volume_id, ref, name=None, description=None, metadata=None)

Manage a snapshot under block storage provisioning.

unmanage(session)

Unmanage a snapshot from block storage provisioning. bestie broke up with the snapshot ๐Ÿฅ€


The SnapshotDetail Class

The SnapshotDetail class inherits from Snapshot.

openstack.block_storage.v2.snapshot.SnapshotDetail : alias of Snapshot.


๐ŸŒธ openstack.block_storage.v2.stats

The Pools Class

The Pools class inherits from Resource.

class openstack.block_storage.v2.stats.Pools(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = '' : Singular form of key for resource. (yes, it's an empty string, that's not a typo ๐Ÿซ )

resources_key = 'pools' : Plural form of key for resource.

base_path = '/scheduler-stats/get_pools?detail=True' : The base part of the URI for this resource.

allow_fetch = False : Allow get operation for this resource.

allow_create = False : Allow create operation for this resource.

allow_delete = False : Allow delete operation for this resource.

allow_list = True : Allow list operation for this resource.

name : The Cinder name for the pool.

capabilities : returns a dict with information about the pool.


๐Ÿ’œ openstack.block_storage.v2.transfer

The Volume Transfer Class

The Volume Transfer class inherits from Resource.

class openstack.block_storage.v2.transfer.Transfer(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'transfer' : Singular form of key for resource.

resources_key = 'transfers' : Plural form of key for resource.

base_path = '/os-volume-transfer' : The base part of the URI for this resource.

allow_create = True : Allow create operation for this resource.

allow_delete = True : Allow delete operation for this resource.

allow_fetch = True : Allow get operation for this resource.

allow_list = True : Allow list operation for this resource.

id : UUID of the transfer.

created_at : The date and time when the resource was created.

name : Name of the volume to transfer.

volume_id : ID of the volume to transfer.

auth_key : Auth key for the transfer. ๐Ÿ”‘

links : A list of links associated with this volume. Type: list.

accept(session, *, auth_key=None)

Accept a volume transfer. say yes to the transfer ๐Ÿ’Œ

Parameters

  • session โ€” the session to use for making this request.
  • auth_key โ€” the authentication key for the volume transfer.

Returns โ€” this Transfer instance.


โญ openstack.block_storage.v2.type

The Type Class

The Type class inherits from Resource.

class openstack.block_storage.v2.type.Type(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'volume_type' : Singular form of key for resource.

resources_key = 'volume_types' : Plural form of key for resource.

base_path = '/types' : The base part of the URI for this resource.

allow_fetch = True : Allow get operation for this resource.

allow_create = True : Allow create operation for this resource.

allow_delete = True : Allow delete operation for this resource.

allow_list = True : Allow list operation for this resource.

extra_specs : A dict of extra specifications. "capabilities" is a usual key.

is_public : a private volume-type. Type: bool. (that's what it says, and yes the wording is a little cursed, but we move ๐Ÿ˜ญ)

set_extra_specs(session, **extra_specs)

Update extra specs.

This call will replace only the extra_specs with the same keys given here. Other keys will not be modified. so it's surgical, not a nuke ๐Ÿ’…

Parameters

(the deets roll in right here โ€” keep it moving, bestie ๐Ÿงš)

  • session โ€” the session you're using to make this request ๐Ÿซถ
  • extra_specs โ€” key/value extra_specs pairs to be update on this volume type. All keys and values.

Returns โ€” the updated extra specs. โœจ


๐ŸŽ€ delete_extra_specs(session, keys)

Delete extra specs. Bye girl ๐Ÿ’…

โš ๏ธ okay so real talk: this method will do a HTTP DELETE request for every key in keys. Not one big batch. Every. Single. Key. Just so you know what you're signing up for ๐Ÿซ 

Parameters

  • session โ€” the session to use for this request.
  • keys โ€” the keys to delete.

Returns โ€” None

๐Ÿฆ‹ get_private_access(session)

List projects with private access to the volume type. Peek at the guest list ๐Ÿ‘€

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” the volume type access response.

๐ŸŒธ add_private_access(session, project_id)

Add project access from the volume type.

Parameters

  • session โ€” the session to use for making this request.
  • project_id โ€” the project to add access for.

๐ŸŒผ remove_private_access(session, project_id)

Remove project access from the volume type. Sorry bestie, you're off the list ๐Ÿ˜ญ

Parameters

  • session โ€” the session to use for making this request.
  • project_id โ€” the project to remove access for.

๐ŸงŠ openstack.block_storage.v2.volume

๐Ÿ‘‘ The Volume Class

The Volume class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v2.volume.Volume(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'volume' โ€” singular form of key for resource.

resources_key = 'volumes' โ€” plural form of key for resource.

base_path = '/volumes' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_list = True โ€” allow list operation for this resource.

attachments โ€” TODO(briancurtin): This is currently undocumented in the API.

availability_zone โ€” the availability zone.

consistency_group_id โ€” ID of the consistency group.

created_at โ€” the timestamp of this volume creation.

description โ€” the volume description.

extended_replication_status โ€” extended replication status on this volume.

host โ€” the volume's current back-end.

image_id โ€” the ID of the image from which you want to create the volume. Required to create a bootable volume.

is_bootable โ€” enables or disables the bootable attribute. You can boot an instance from a bootable volume. Type: bool

is_encrypted โ€” True if this volume is encrypted, False if not. Type: bool

is_multiattach โ€” whether volume will be sharable or not.

migration_id โ€” the volume ID that this volume's name on the back-end is based on.

migration_status โ€” the status of this volume's migration (None means that a migration is not currently in progress).

project_id โ€” the project ID associated with current back-end.

replication_driver_data โ€” data set by the replication driver

replication_status โ€” status of replication on this volume.

scheduler_hints โ€” scheduler hints for the volume

size โ€” the size of the volume, in gibibytes (GiB). Type: int

snapshot_id โ€” to create a volume from an existing snapshot, specify the ID of the existing volume snapshot. If specified, the volume is created in same availability zone and with same size of the snapshot.

source_volume_id โ€” to create a volume from an existing volume, specify the ID of the existing volume. If specified, the volume is created with same size of the source volume.

status โ€” one of the following values: creating, available, attaching, in-use deleting, error, error_deleting, backing-up, restoring-backup, error_restoring. For details on these statuses, see the Block Storage API documentation.

updated_at โ€” the date and time when the resource was updated.

user_id โ€” the user ID associated with the volume

volume_image_metadata โ€” one or more metadata key and value pairs about image

volume_type โ€” the name of the associated volume type.


โญ extend(session, size)

Extend a volume size. Make it bigger, make it iconic ๐Ÿ’–

โญ set_bootable_status(session, bootable=True)

Set volume bootable status flag.

โญ set_readonly(session, readonly)

Set volume readonly flag.

โญ set_image_metadata(session, metadata)

Sets image metadata key-value pairs on the volume.

โญ delete_image_metadata(session)

Remove all image metadata from the volume. Clean slate energy โœจ

โญ delete_image_metadata_item(session, key)

Remove a single image metadata from the volume.

โญ reset_status(session, status=None, attach_status=None, migration_status=None)

Reset volume statuses (admin operation). Admin only, bestie โ€” main character privileges ๐Ÿ‘‘

โญ attach(session, mountpoint, instance=None, host_name=None)

Attach volume to server.

โญ detach(session, attachment, force=False, connector=None)

Detach volume from server.

โญ unmanage(session)

Unmanage volume.

โญ retype(session, new_type, migration_policy=None)

Change volume type. Glow-up arc ๐ŸŒˆ

โญ migrate(session, host=None, force_host_copy=False, lock_volume=False)

Migrate volume.

โญ complete_migration(session, new_volume_id, error=False)

Complete volume migration.

โญ force_delete(session)

Force volume deletion.

โญ upload_to_image(session, image_name, *, force=False, disk_format=None, container_format=None)

Upload the volume to image service.


๐Ÿงš Block Storage v3 Resources

๐Ÿฆ‹ openstack.block_storage.v3.attachment

๐Ÿ’œ The Volume Attachment Class

The Volume Attachment class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v3.attachment.Attachment(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

๐ŸŽ€ complete(session, *, microversion=None)

Mark the attachment as completed. Finished, done, periodt ๐Ÿ’…

๐ŸŒŸ create(session, prepend_key=True, base_path=None, *, resource_request_key=None, resource_response_key=None, microversion=None, **params)

Create a remote resource based on this instance.

Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” DEPRECATED โ€” configure create_opts instead. Whether the resource_key should be prepended in a resource creation request. Default to True.
  • base_path โ€” base part of the URI for creating resources, if different from base_path <#openstack.resource.Resource.base_path>.
  • resource_request_key โ€” DEPRECATED โ€” configure create_opts instead. Overrides the usage of resource_key <#openstack.resource.Resource.resource_key> when prepending a key to the request body. Ignored if prepend_key is false.
  • resource_response_key โ€” DEPRECATED โ€” configure create_opts instead. Overrides the usage of resource_key <#openstack.resource.Resource.resource_key> when processing response bodies. Ignored if prepend_key is false.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional params to pass.

Returns โ€” this Resource instance.

Raises โ€” MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_create is not set to True. ๐Ÿ˜ญ no creating for you if that flag's off, fr fr.

  • update([E], **F) -> None. โ€” Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

๐ŸงŠ openstack.block_storage.v3.availability_zone

The AvailabilityZone Class ๐Ÿ’ซ

okay so the AvailabilityZone class inherits from Resource <#openstack.resource.Resource> โ€” yes bestie, it's giving inheritance hierarchy realness ๐Ÿซถ

class openstack.block_storage.v3.availability_zone.AvailabilityZone(_synchronized=False,
connection=None, **attrs)

The base resource, periodt.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ™ˆ like pls don't touch, it's not for you
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ’…

resource_key = '' โ€” Singular form of key for resource. โœจ

resources_key = 'availabilityZoneInfo' โ€” Plural form of key for resource. ๐ŸŒธ

base_path = '/os-availability-zone' โ€” The base part of the URI for this resource. ๐Ÿ”ฅ

allow_list = True โ€” Allow list operation for this resource. ๐Ÿ‘‘

Properties ๐Ÿฆ‹

  • name โ€” Name of availability zone
  • state โ€” State of availability zone, "available" is usual key

๐Ÿ’พ openstack.block_storage.v3.backup

The Backup Class ๐ŸŽ€

The Backup class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v3.backup.Backup(_synchronized=False,
connection=None, **attrs)

Volume Backup โ€” iconic, lowkey essential ๐Ÿ˜ญ

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿซถ
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ’œ

resource_key = 'backup' โ€” Singular form of key for resource. โญ

resources_key = 'backups' โ€” Plural form of key for resource. ๐ŸŒˆ

base_path = '/backups' โ€” The base part of the URI for this resource. โœจ

allow_fetch = True โ€” Allow get operation for this resource. ๐Ÿ’–

allow_create = True โ€” Allow create operation for this resource. ๐Ÿงš

allow_delete = True โ€” Allow delete operation for this resource. ๐Ÿ’€

allow_commit = True โ€” Allow update operation for this resource. ๐Ÿ”ฅ

allow_list = True โ€” Allow list operation for this resource. ๐Ÿ‘‘

Properties ๐Ÿ“

  • availability_zone โ€” backup availability zone
  • container โ€” The container backup in
  • created_at โ€” The date and time when the resource was created.
  • data_timestamp โ€” data timestamp The time when the data on the volume was first saved. If it is a backup from volume, it will be the same as created_at for a backup. If it is a backup from a snapshot, it will be the same as created_at for the snapshot.
  • description โ€” backup description
  • encryption_key_id โ€” The UUID of the encryption key. Only included for encrypted volumes.
  • fail_reason โ€” Backup fail reason
  • force โ€” Force backup
  • has_dependent_backups โ€” If this value is true, there are other backups depending on this backup.
  • is_incremental โ€” Indicates whether the backup mode is incremental. If this value is true, the backup mode is incremental. If this value is false, the backup mode is full.
  • links โ€” A list of links associated with this volume. Type: list
  • metadata โ€” The backup metadata. New in version 3.43
  • name โ€” backup name
  • object_count โ€” backup object count
  • project_id โ€” The UUID of the owning project. New in version 3.18
  • size โ€” The size of the volume, in gibibytes (GiB).
  • snapshot_id โ€” The UUID of the source volume snapshot.
  • status โ€” backup status values: creating, available, deleting, error, restoring, error_restoring
  • updated_at โ€” The date and time when the resource was updated.
  • user_id โ€” The UUID of the project owner. New in 3.56
  • volume_id โ€” The UUID of the volume.
  • volume_name โ€” The name of the volume.

classmethod import_record(session, *, service, url) โ€” Import information about a backup ๐ŸŒธ

Parameters

  • session โ€” The session to use for making this request.
  • service โ€” The service used to perform the backup.
  • url โ€” An identifier string to locate the backup.

Returns โ€” The imported backup

export_record(session) โ€” Export information about the backup โœจ

Parameters

  • session โ€” The session to use for making this request.

Returns โ€” The backup export record fields

export(session) โ€” Export information about the backup ๐Ÿฆ‹

Parameters

  • session โ€” The session to use for making this request.

Returns โ€” The backup export record fields

restore(session, volume_id=None, name=None) โ€” Restore current backup to volume ๐Ÿ’–

Parameters

  • session โ€” The session to use for making this request.
  • volume_id โ€” The ID of the volume to restore the backup to.
  • name โ€” The name for new volume creation to restore.

Returns โ€” Updated backup instance

force_delete(session) โ€” Force backup deletion ๐Ÿ’€

Parameters

  • session โ€” The session to use for making this request.

Returns โ€” None

reset_status(session, status) โ€” Reset the status of the backup ๐Ÿ”„

Parameters

  • session โ€” The session to use for making this request.

Returns โ€” None


๐Ÿ“Š openstack.block_storage.v3.block_storage_summary

The Block Storage Summary Class ๐Ÿ‘‘

The Block Storage Summary class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v3.block_storage_summary.BlockStorageSummary(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ™ˆ
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ’…

base_path = '/volumes/summary' โ€” The base part of the URI for this resource. โœจ

allow_fetch = True โ€” Allow get operation for this resource. ๐ŸŒŸ

Properties ๐ŸŽ€

  • total_size โ€” Total size of all the volumes
  • total_count โ€” Total count of all the volumes
  • metadata โ€” Metadata of all the volumes

๐Ÿ› ๏ธ openstack.block_storage.v3.capabilities

The Capabilities Class ๐Ÿงš

The Capabilities class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v3.capabilities.Capabilities(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿซถ
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ’œ

base_path = '/capabilities' โ€” The base part of the URI for this resource. ๐Ÿ”ฅ

allow_fetch = True โ€” Allow get operation for this resource. ๐ŸŒˆ

Properties ๐Ÿ“

  • description โ€” The capabilities description
  • display_name โ€” The name of volume backend capabilities.
  • driver_version โ€” The driver version.
  • namespace โ€” The storage namespace, such as OS::Storage::Capabilities::foo.
  • pool_name โ€” The name of the storage pool.
  • properties โ€” The backend volume capabilites list, which consists of cinder standard capabilities and vendor unique properties.
  • replication_targets โ€” A list of volume backends used to replicate volumes on this backend.
  • storage_protocol โ€” The storage backend for the backend volume.
  • vendor_name โ€” The name of the vendor.
  • visibility โ€” The volume type access.
  • volume_backend_name โ€” The name of the back-end volume.

openstack.block_storage.v3.cluster

The Cluster Class โ€” okay bestie, this one inherits from Resource (openstack.resource.Resource) and itโ€™s giving storage-cluster realness ๐Ÿซถ.

class openstack.block_storage.v3.cluster.Cluster(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Cluster class config + attrs โœจ

  • resource_key = 'cluster' โ€” Singular form of key for resource.
  • resources_key = 'clusters' โ€” Plural form of key for resource.
  • base_path = '/clusters' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • active_backend_id โ€” The ID of active storage backend (cinder-volume services only).
  • binary โ€” The binary name of the services in the cluster.
  • created_at โ€” The date and time when the resource was created.
  • disabled_reason โ€” The reason for disabling the cluster.
  • frozen โ€” Whether the cluster is frozen for replication.
  • last_heartbeat โ€” The last periodic heartbeat received.
  • name โ€” The name of the cluster.
  • num_down_hosts โ€” The number of down hosts in the cluster.
  • num_hosts โ€” The number of hosts in the cluster.
  • replication_status โ€” The cluster replication status.
  • state โ€” The state of the cluster. One of up or down.
  • status โ€” The status of the cluster. One of enabled or disabled.
  • updated_at โ€” The date and time when the resource was last updated.

Methods ๐Ÿ’…

  • enable(session) โ€” Enable scheduling for the cluster.
  • disable(session, *, reason=None) โ€” Disable scheduling for the cluster.
    • reason โ€” The reason for disabling the cluster.

openstack.block_storage.v3.consistency_group

The ConsistencyGroup Class โ€” this one also inherits from Resource (openstack.resource.Resource), and itโ€™s consistency-group coded fr fr ๐ŸŽ€.

class openstack.block_storage.v3.consistency_group.ConsistencyGroup(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

ConsistencyGroup class config + attrs ๐ŸŒธ

  • resource_key = 'consistencygroup' โ€” Singular form of key for resource.
  • resources_key = 'consistencygroups' โ€” Plural form of key for resource.
  • base_path = '/consistencygroups' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • availability_zone โ€” The availability zone.
  • created_at โ€” The date and time when this resource was created.
  • description โ€” The description.
  • name โ€” The name.
  • status โ€” The status.
  • volume_types โ€” The volume types.
  • add_volumes โ€” Comma-separated list of volume UUIDs to add to the consistency group. Used in update requests only.
  • remove_volumes โ€” Comma-separated list of volume UUIDs to remove from the consistency group. Used in update requests only.

classmethod create_from_source(...) โ€” Creates a new group from source. Lowkey iconic behavior โœจ

classmethod create_from_source(session, *, consistency_group_snapshot_id=None, consistency_group_id=None, name=None, description=None)

Parameters

  • session โ€” The session to use for making this request
  • consistency_group_snapshot_id โ€” The ID of a consistency group snapshot to create the new consistency group from. Either this or consistency_group_id must be provided
  • consistency_group_id โ€” The ID of a consistency group to create the new consistency group from. Either this or consistency_group_snapshot_id must be provided
  • name โ€” The name to assign to the new consistency group
  • description โ€” The description to set on the new consistency group

Returns โ€” The created consistency group

delete(...) โ€” Delete the remote resource based on this instance. Bestie, this is the cleanup arc ๐Ÿ’€

delete(session, error_message=None, *, microversion=None, base_path=None, params=None)

Parameters

  • session โ€” The session to use for making this request.
  • microversion โ€” API version to override the negotiated one.
  • base_path โ€” Base part of the URI for modifying resources, if different from base_path (openstack.resource.Resource.base_path).
  • params โ€” Query string parameters to include in the request URL.

Returns โ€” This Resource instance.

  • Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_commit is not set to True.
  • Raises NotFoundException (openstack.exceptions.NotFoundException) if the resource was not found.

openstack.block_storage.v3.consistency_group_snapshot

The ConsistencyGroupSnapshot Class โ€” inherits from Resource (openstack.resource.Resource). Snapshot era, no cap ๐Ÿ“ธ

class openstack.block_storage.v3.consistency_group_snapshot.ConsistencyGroupSnapshot(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

ConsistencyGroupSnapshot class config + attrs ๐Ÿฆ‹

  • resource_key = 'cgsnapshot' โ€” Singular form of key for resource.
  • resources_key = 'cgsnapshots' โ€” Plural form of key for resource.
  • base_path = '/cgsnapshots' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • consistencygroup_id โ€” The UUID of the source consistency group.
  • created_at โ€” The date and time when this resource was created.
  • description โ€” The description.
  • name โ€” The name.
  • status โ€” The status.

openstack.block_storage.v3.default_type

The DefaultType Class โ€” inherits from Resource (openstack.resource.Resource). Default-type main character energy ๐Ÿ‘‘

class openstack.block_storage.v3.default_type.DefaultType(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

DefaultType class config + attrs ๐Ÿ“

  • resource_key = 'default_type' โ€” Singular form of key for resource.
  • resources_key = 'default_types' โ€” Plural form of key for resource.
  • base_path = '/default-types' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='PUT', requires_id=True, response_has_body=True) โ€” Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().
  • project_id โ€” The UUID of the project.
  • volume_type_id โ€” the UUID for an existing volume type. ๐Ÿ’–

๐Ÿฆ‹ openstack.block_storage.v3.extension

๐Ÿ’… The Extension Class

The Extension class inherits from Resource <#openstack.resource.Resource>. Bestie, it's giving core resource energy.

class openstack.block_storage.v3.extension.Extension(_synchronized=False, connection=None, **attrs)

This is The base resource. No cap.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'extensions' โ€” plural form of key for resource.
  • base_path = '/extensions' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Properties:

  • alias โ€” the alias for the extension.
  • description โ€” the extension description.
  • links โ€” links pertaining to this extension.
  • name โ€” the name of this extension.
  • updated_at โ€” the date and time when the resource was updated. The date and time stamp format is ISO 8601. ๐Ÿ•ฐ๏ธ

๐ŸŒธ openstack.block_storage.v3.group

๐ŸŽ€ The Group Class

The Group class inherits from Resource <#openstack.resource.Resource>. Yup, another icon inheriting from the base resource.

class openstack.block_storage.v3.group.Group(_synchronized=False, connection=None, **attrs)

This is The base resource, periodt.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'group' โ€” singular form of key for resource.
  • resources_key = 'groups' โ€” plural form of key for resource.
  • base_path = '/groups' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • add_volumes โ€” a comma-separated list of volume IDs to add to the group.
  • remove_volumes โ€” a comma-separated list of volume IDs to remove from the group.
  • delete(session, error_message=None, *, microversion=None, delete_volumes=False, **attrs) โ€” delete a group.
  • fetch_replication_targets(session) โ€” fetch replication targets for the group. Parameters: session โ€” the session to use for making this request. Returns: this group with the replication_targets field populated.
  • enable_replication(session) โ€” enable replication for the group. Parameters: session โ€” the session to use for making this request.
  • disable_replication(session) โ€” disable replication for the group. Parameters: session โ€” the session to use for making this request.
  • failover_replication(session, *, allowed_attached_volume=False, secondary_backend_id=None) โ€” failover replication for the group. Parameters:
    • session โ€” the session to use for making this request.
    • allowed_attached_volume โ€” whether to allow attached volumes in the group.
    • secondary_backend_id โ€” the secondary backend ID. Returns: None.
  • reset_status(session, status) โ€” resets the status for a group. Parameters:
    • session โ€” the session to use for making this request.
    • status โ€” the status for the group.
  • classmethod create_from_source(session, group_snapshot_id, source_group_id, name=None, description=None) โ€” creates a new group from source.

๐Ÿ’œ openstack.block_storage.v3.group_snapshot

๐Ÿงš The GroupSnapshot Class

The GroupSnapshot class inherits from Resource <#openstack.resource.Resource>. Snapshot behavior, but make it group chat.

class openstack.block_storage.v3.group_snapshot.GroupSnapshot(_synchronized=False, connection=None, **attrs)

This is The base resource. Lowkey iconic.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'group_snapshot' โ€” singular form of key for resource.
  • resources_key = 'group_snapshots' โ€” plural form of key for resource.
  • base_path = '/group_snapshots' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource? Nope, it's False, so updates are not allowed.
  • allow_list = True โ€” allow list operation for this resource.

Properties:

  • created_at โ€” the date and time when the resource was created.
  • description โ€” the group snapshot description.
  • group_id โ€” the UUID of the source group.
  • group_type_id โ€” the group type ID.
  • id โ€” the ID of the group snapshot.
  • name โ€” the group snapshot name.
  • project_id โ€” the UUID of the volume group snapshot project.
  • status โ€” the status of the generic group snapshot.
  • reset_status(session, state) โ€” resets the status for a group snapshot. ๐Ÿซถ

๐Ÿ”ฅ openstack.block_storage.v3.group_type

๐Ÿ‘‘ The GroupType Class

The GroupType class inherits from Resource <#openstack.resource.Resource>. Main character group type behavior, fr fr.

class openstack.block_storage.v3.group_type.GroupType(_synchronized=False, connection=None, **attrs)

This is The base resource, bestie.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'group_type' โ€” singular form of key for resource.
  • resources_key = 'group_types' โ€” plural form of key for resource.
  • base_path = '/group_types' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Properties:

  • description โ€” the group type description.
  • group_specs โ€” contains the specifications for a group type.
  • is_public โ€” whether the group type is publicly visible.
  • fetch_group_specs(session) โ€” fetch group_specs of the group type. These are returned by default if the user has suitable permissions (i.e. you're an admin) but by default you also need the same permissions to access this API. That means this function is kind of useless. However, that is how the API was designed and it is theoretically possible that people will have modified their policy to allow this but not the other so we provide this anyway. Parameters: session โ€” the session to use for making this request. Returns: an updated version of this object.
  • create_group_specs(session, specs) โ€” creates group specs for the group type. This will override whatever specs are already present on the group type. Parameters:
    • session โ€” the session to use for making this request.
    • specs โ€” a dict of group specs to set on the group type. Returns: an updated version of this object.
  • get_group_specs_property(session, prop) โ€” retrieve a group spec property of the group type. Parameters:
    • session โ€” the session to use for making this request.
  • prop โ€” the name of the group spec property you're updating ๐Ÿ’…

โœจ Returns

The value of the group spec property. That's the whole vibe โ€” you get the thing back. ๐Ÿซถ


๐Ÿ› ๏ธ update_group_specs_property(session, prop, val)

Update a group spec property on the group type. Bestie, this is the setter one. ๐Ÿ’–

Parameters

  • session โ€” the session you're using to make this request.
  • prop โ€” the name of the group spec property you're updating.
  • val โ€” the value you're assigning to that group spec property.

Returns

The updated value of the group spec property โ€” it hands you back what it just set, iconic behaviour honestly ๐Ÿ‘‘


๐Ÿ—‘๏ธ delete_group_specs_property(session, prop)

Delete a group spec property from the group type. Poof, gone, no notes. ๐Ÿฆ‹

Parameters

  • session โ€” the session you're using to make this request.
  • prop โ€” the name of the group spec property to delete.

Returns

None โ€” literally nothing comes back, and that's the whole point ๐Ÿ’€


๐ŸงŠ openstack.block_storage.v3.limits

The AbsoluteLimit Class

The AbsoluteLimit class inherits from Resource (iykyk, that's the base-resource situation). ๐Ÿงš

class openstack.block_storage.v3.limits.AbsoluteLimit(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” not meant to be used directly. Go look at new() and existing() instead, ok?
  • connection โ€” a reference to the Connection being used. It defaults to None so that Resource objects can exist without a live Connection, like in unit tests. Any use of self._connection inside Resource code should protect itself with a check for None. ๐ŸŽ€

Attributes

  • max_total_backup_gigabytes โ€” the maximum total amount of backups, in gibibytes (GiB).
  • max_total_backups โ€” the maximum number of backups.
  • max_total_snapshots โ€” the maximum number of snapshots.
  • max_total_volume_gigabytes โ€” the maximum total amount of volumes, in gibibytes (GiB).
  • max_total_volumes โ€” the maximum number of volumes.
  • total_backup_gigabytes_used โ€” the total number of backups gibibytes (GiB) used.
  • total_backups_used โ€” the total number of backups used.
  • total_gigabytes_used โ€” the total number of gibibytes (GiB) used.
  • total_snapshots_used โ€” the total number of snapshots used.
  • total_volumes_used โ€” the total number of volumes used.

The Limits Class

The Limits class inherits from Resource, same as literally all of these. ๐Ÿ’…

class openstack.block_storage.v3.limits.Limits(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing(), bestie.
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects work with no active Connection, like in unit tests. self._connection usage in Resource code should check for None first. ๐Ÿซถ

Attributes

  • resource_key = 'limits' โ€” the singular form of the key for this resource.
  • base_path = '/limits' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allows the get operation for this resource.
  • absolute โ€” an absolute limits object.
  • rate โ€” rate-limit volume copy bandwidth, used to mitigate slow down of data access from the instances. ๐ŸŒˆ

The RateLimit Class

The RateLimit class inherits from Resource (yes, again, it's giving family reunion). ๐ŸŽ€

class openstack.block_storage.v3.limits.RateLimit(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’–

Parameters

  • _synchronized โ€” not intended to be used directly; see new() and existing().
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿฆ‹

Attributes

  • next_available โ€” rate limits next available time.
  • remaining โ€” integer for rate limits remaining.
  • unit โ€” unit of measurement for the value parameter.
  • value โ€” integer number of requests which can be made.
  • verb โ€” an HTTP verb (POST, PUT, etc.). ๐Ÿ”ฅ

The RateLimits Class

The RateLimits class inherits from Resource, obviously, the whole squad does. ๐Ÿงš

class openstack.block_storage.v3.limits.RateLimits(_synchronized=False, connection=None, **attrs)

The base resource โญ

Parameters

  • _synchronized โ€” not intended to be used directly. new() and existing() are right there, go look.
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ˜ญ

Attributes

  • limits โ€” a list of the specific limits that apply to the regex and uri.
  • regex โ€” a regex representing which routes this rate limit applies to.
  • uri โ€” a URI representing which routes this rate limit applies to. โœจ

๐Ÿ“ธ openstack.block_storage.v3.manageable_snapshot

The ManageableSnapshot Class

The ManageableSnapshot class inherits from Resource โ€” sniffing out snapshots you could manage. ๐Ÿ”

class openstack.block_storage.v3.manageable_snapshot.ManageableSnapshot(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐ŸŽ€

Attributes

  • resource_key = 'manageable-snapshot' โ€” the singular form of the key for this resource.
  • resources_key = 'manageable-snapshots' โ€” the plural form of the key for this resource.
  • base_path = '/manageable_snapshots' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allows the list operation for this resource.
  • cinder_id โ€” the ID of this snapshot in Cinder, if it's already managed.
  • extra_info โ€” additional information about the snapshot.
  • reason_not_safe โ€” the reason the snapshot isn't safe to manage, if that applies.
  • reference โ€” a reference to identify the existing snapshot on the backend.
  • safe_to_manage โ€” whether it's safe to manage this snapshot.
  • size โ€” the size of the snapshot in GiB.
  • source_reference โ€” a reference to the source volume of the snapshot. ๐ŸŒธ

๐Ÿ—„๏ธ openstack.block_storage.v3.manageable_volume

The ManageableVolume Class

The ManageableVolume class inherits from Resource โ€” same energy, but volumes this time. ๐Ÿ“ฆ

class openstack.block_storage.v3.manageable_volume.ManageableVolume(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’–

Parameters

  • _synchronized โ€” not intended to be used directly; peep new() and existing().
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ

Attributes

  • resource_key = 'manageable-volume' โ€” the singular form of the key for this resource.
  • resources_key = 'manageable-volumes' โ€” the plural form of the key for this resource.
  • base_path = '/manageable_volumes' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allows the list operation for this resource.
  • cinder_id โ€” the ID of this volume in Cinder, if it's already managed.
  • extra_info โ€” additional information about the volume.
  • reason_not_safe โ€” the reason the volume isn't safe to manage, if that applies.
  • reference โ€” a reference to identify the existing volume on the backend.
  • safe_to_manage โ€” whether it's safe to manage this volume.
  • size โ€” the size of the volume in GiB. ๐Ÿฆ‹

๐Ÿ’Œ openstack.block_storage.v3.message

The Message Class

The Message class inherits from Resource โ€” yes bestie, block storage has messages too, it's a whole thing. ๐Ÿ“ฌ

class openstack.block_storage.v3.message.Message(_synchronized=False, connection=None, **attrs)

The base resource ๐ŸŒŸ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing() instead, mwah.
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ’…
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'messages' โ€” Singular form of key for resource.
  • resources_key = 'messages' โ€” Plural form of key for resource.
  • base_path = '/messages' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • created_at โ€” Properties The date and time when the resource was created. Format is ISO 8601: CCYY-MM-DDThh:mm:ssยฑhh:mm Example: 2015-08-27T09:49:58-05:00
  • event_id โ€” The id of the event to this message.
  • guaranteed_until โ€” The expire time of message, message could be deleted after this time.
  • message_level โ€” The level of the message, possible value is only 'ERROR' now.
  • request_id โ€” The id of the request during which the message was created.
  • resource_type โ€” The resource type corresponding to resource_uuid.
  • resource_uuid โ€” The UUID of the resource during whose operation the message was created.
  • user_message โ€” The translated readable message corresponding to event_id.

okay bestie, message resource done โ€” next up is the QoS spec era, and it's lowkey iconic ๐Ÿ’…

openstack.block_storage.v3.qos_spec

The QosSpec Class

The QoSSpec class inherits from Resource.

class openstack.block_storage.v3.qos_spec.QoSSpec(_synchronized=False, connection=None, **attrs)

The base resource

Parameters โ€” the usual iconic duo, every time:

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'qos_specs' โ€” Singular form of key for resource.
  • resources_key = 'qos_specs' โ€” Plural form of key for resource.
  • base_path = '/qos-specs' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • id โ€” The ID of this resource.
  • name โ€” The name of this resource.

associate(session, vol_type_id) โ€” Associate this QoS spec with a volume type.

Parameters

  • session โ€” The session to use for making this request.
  • vol_type_id โ€” The ID of the volume type to associate with.

disassociate(session, vol_type_id) โ€” Disassociate this QoS spec from a volume type.

Parameters

  • session โ€” The session to use for making this request.
  • vol_type_id โ€” The ID of the volume type to disassociate from.

disassociate_all(session) โ€” Disassociate this QoS spec from all volume types.

Parameters

  • session โ€” The session to use for making this request.

delete_keys(session, keys) โ€” Delete keys from this QoS spec.

Parameters

  • session โ€” The session to use for making this request.
  • keys โ€” The keys to delete.

The QoSSpecAssociation Class

The QoSSpecAssociation class inherits from Resource.

class openstack.block_storage.v3.qos_spec.QoSSpecAssociation(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'qos_associations' โ€” Plural form of key for resource.
  • base_path = '/qos-specs/%(qos_spec_id)s/associations' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • association_type โ€” The type of association (e.g. "volume_type").
  • id โ€” The ID of the associated resource.
  • name โ€” The name of the associated resource.
  • qos_spec_id โ€” The ID of the QoS spec.

openstack.block_storage.v3.quota_class_set

The QuotaClassSet Class

The QuotaClassSet class inherits from Resource.

class openstack.block_storage.v3.quota_class_set.QuotaClassSet(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'quota_class_set' โ€” Singular form of key for resource.
  • base_path = '/os-quota-class-sets' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • backup_gigabytes โ€” The size (GiB) of backups that are allowed for each project.
  • backups โ€” The number of backups that are allowed for each project.
  • gigabytes โ€” The size (GiB) of volumes and snapshots that are allowed for each project.
  • groups โ€” The number of groups that are allowed for each project.
  • per_volume_gigabytes โ€” The size (GB) of volumes in request that are allowed for each volume.
  • snapshots โ€” The number of snapshots that are allowed for each project.
  • volumes โ€” The number of volumes that are allowed for each project.

openstack.block_storage.v3.quota_set

The QuotaSet Class

The QuotaSet class inherits from Resource.

class openstack.block_storage.v3.quota_set.QuotaSet(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • backup_gigabytes โ€” Properties The size (GB) of backups that are allowed for each project.
  • backups โ€” The number of backups that are allowed for each project.
  • gigabytes โ€” The size (GB) of volumes and snapshots that are allowed for each project.
  • groups โ€” The number of groups that are allowed for each project.
  • per_volume_gigabytes โ€” The size (GB) of volumes in request that are allowed for each volume.
  • snapshots โ€” The number of snapshots that are allowed for each project.
  • volumes โ€” The number of volumes that are allowed for each project.

openstack.block_storage.v3.resource_filter

The ResourceFilter Class

The ResourceFilter class inherits from Resource.

class openstack.block_storage.v3.resource_filter.ResourceFilter(_synchronized=False, connection=None, **attrs)

Resource Filter

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'resource_filters' โ€” Plural form of key for resource.
  • base_path = '/resource_filters' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • filters โ€” Properties: The list of filters that are applicable to the specified resource.
  • resource โ€” The resource that the filters will be applied to.

โœจ openstack.block_storage.v3.service โœจ

๐Ÿ’… The Service Class ๐Ÿ’…

The Service class inherits from Resource. ๐Ÿ’–

class openstack.block_storage.v3.service.Service(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters ๐Ÿซถ

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class facts & attributes ๐ŸŒธ

  • resources_key = 'services' โ€” Plural form of key for resource.
  • base_path = '/os-services' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • active_backend_id โ€” The ID of active storage backend (cinder-volume services only).
  • availability_zone โ€” The availability zone of service.
  • backend_state โ€” The state of storage backend (cinder-volume services only) (since 3.49).
  • binary โ€” Binary name of service.
  • cluster โ€” The cluster name (since 3.7).
  • disabled_reason โ€” Disabled reason of service.
  • host โ€” The name of the host where service runs.
  • name โ€” Service name.
  • replication_status โ€” The volume service replication status (cinder-volume services only).
  • state โ€” State of service.
  • status โ€” Status of service.
  • updated_at โ€” The date and time when the resource was updated.

๐Ÿ”Ž find โ€” find a resource by its name or id.

classmethod find(session, name_or_id, ignore_missing=True, list_base_path=None, *, microversion=None, all_projects=None, **params)

Parameters ๐ŸŽ€

  • session โ€” The session to use for making this request.
  • name_or_id โ€” This resourceโ€™s identifier, if needed by the request. The default is None.
  • ignore_missing โ€” When set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • list_base_path โ€” base_path to be used when need listing resources.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” Any additional parameters to be passed into underlying methods, such as to existing() in order to pass on URI parameters.
  • all_projects โ€” this one is in the signature above; no separate description is listed here.

Returns โ€” The Resource object matching the given name or id, or None if nothing matches.

Raises openstack.exceptions.DuplicateResource if more than one resource is found for this request.

Raises openstack.exceptions.NotFoundException if nothing is found and ignore_missing is False.


๐Ÿงš commit โ€” commit the state of the instance to the remote resource.

commit(session, prepend_key=False, *args, **kwargs)

Parameters ๐Ÿ’œ

  • session โ€” The session to use for making this request.
  • prepend_key โ€” Whether the resource_key should be prepended in a resource creation request. Default to True.
  • retry_on_conflict โ€” Whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.
  • base_path โ€” Base part of the URI for modifying resources, if different from base_path.
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” Attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.
The signature above shows prepend_key=False, while the description says โ€œDefault to Trueโ€ โ€” yes, bestie, both of those really are in the source. Keep both facts. ๐Ÿ˜ญ

Returns โ€” This Resource instance.

Raises MethodNotSupported if Resource.allow_commit is not set to True.


โœจ enable โ€” enable service.

enable(session)

๐Ÿ™ˆ disable โ€” disable service.

disable(session, *, reason=None)
  • reason โ€” present in the signature; no separate description is given.

๐Ÿ”ฅ set_log_levels โ€” set log levels for services.

classmethod set_log_levels(session, *, level, binary=None, server=None, prefix=None)

Parameters ๐Ÿ“

  • session โ€” The session to use for making this request.
  • level โ€” The log level to set, case insensitive. Accepted values are INFO, WARNING, ERROR and DEBUG.
  • binary โ€” The binary name of the service.
  • server โ€” The name of the host.
  • prefix โ€” The prefix for the log path we are querying, for example cinder. or sqlalchemy.engine.. When not present or the empty string is passed, all log levels will be retrieved.

Returns โ€” None.


๐ŸŒˆ get_log_levels โ€” get log levels for services.

classmethod get_log_levels(session, *, binary=None, server=None, prefix=None)

Parameters ๐Ÿ’–

  • session โ€” The session to use for making this request.
  • binary โ€” The binary name of the service.
  • server โ€” The name of the host.
  • prefix โ€” The prefix for the log path we are querying, for example cinder. or sqlalchemy.engine.. When not present or the empty string is passed, all log levels will be retrieved.

Returns โ€” A generator of LogLevel objects.


๐Ÿ‘‘ failover โ€” failover a service.

failover(session, *, cluster=None, backend_id=None)

Only applies to replicating cinder-volume services.

The signature takes cluster=None and backend_id=None; no separate parameter descriptions are listed.


๐Ÿงน cleanup_workers โ€” trigger cleanup of stuck operations on Cinder resources.

classmethod cleanup_workers(session, *, binary, host, cluster_name, disabled=None, is_up=False, resource_id=None, resource_type=None, service_id=None)

All filters are optional. Calling with no filters means โ€œclean everything on all services that are downโ€.

Parameters ๐ŸŒŸ

  • session โ€” The session to use for making this request.
  • binary โ€” Limit to cinder-volume or cinder-scheduler.
  • host โ€” Target services on a specific host.
  • cluster_name โ€” Target services in a specific cluster.
  • disabled โ€” Filter by whether the service is admin-disabled.
  • is_up โ€” Filter by whether the service is up. Defaults to False, meaning only clean up after crashed/stopped services).
  • resource_id โ€” no extra description listed here.
  • resource_type โ€” Only clean a specific type (Volume, Snapshot, etc.).
  • service_id โ€” Target a single specific service.

Returns โ€” the source page leaves this blank.


๐Ÿฆ‹ openstack.block_storage.v3.snapshot ๐Ÿฆ‹

๐ŸŽ€ The Snapshot Class ๐ŸŽ€

The Snapshot class inherits from Resource. ๐Ÿ’ซ

class openstack.block_storage.v3.snapshot.Snapshot(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters ๐Ÿซถ

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class facts & attributes ๐Ÿ’…

  • resource_key = 'snapshot' โ€” Singular form of key for resource.
  • resources_key = 'snapshots' โ€” Plural form of key for resource.
  • base_path = '/snapshots' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • consumes_quota โ€” Whether this resource consumes quota or not. Resources that not counted for quota usage are usually temporary internal resources created to perform an operation. This is included from microversion 3.65.
  • created_at โ€” The timestamp of this snapshot creation.
  • description โ€” what this snapshot is, in words ๐Ÿ’ฌ default is None.
  • group_snapshot_id โ€” the ID of the group snapshot. This one's only here from microversion 3.14 onward, iykyk ๐ŸŽ€
  • is_forced โ€” says whether to create the snapshot even if the volume is attached. Default is False. Type: bool. Yes bestie that's a real "risk it for the biscuit" flag ๐Ÿ˜ญ
  • progress โ€” how complete this snapshot is rn, as a percentage.
  • project_id โ€” the project ID this snapshot is associated with.
  • size โ€” size of the volume, in gibibytes (GiB).
  • status โ€” the current status of this snapshot. Potential values are creating, available, deleting, error, and error_deleting. (the last two are giving "we don't talk about it" ๐Ÿ’€)
  • updated_at โ€” the date and time when the resource was updated.
  • user_id โ€” the UUID of the user. Included from microversion 3.41 โœจ
  • volume_id โ€” the ID of the volume this snapshot was taken of.
  • force_delete(session) โ€” force snapshot deletion. no thoughts, just vibes and obliteration ๐Ÿซถ
  • reset_status(session, status) โ€” reset the status of the snapshot.
  • set_status(session, status, progress=None) โ€” update fields related to the status of a snapshot.
  • classmethod manage(session, volume_id, ref, name=None, description=None, metadata=None) โ€” manage a snapshot under block storage provisioning.
  • unmanage(session) โ€” unmanage a snapshot from block storage provisioning.

๐Ÿ’ซ The SnapshotDetail Class ๐Ÿ’ซ

Okay so the SnapshotDetail class inherits from Snapshot. That's it. That's the whole thing. nepotism but make it OOP ๐Ÿ’…

openstack.block_storage.v3.snapshot.SnapshotDetail

alias of Snapshot โ€” literally just Snapshot wearing a different name ๐Ÿฆ‹


๐ŸŒˆ openstack.block_storage.v3.stats ๐ŸŒˆ

๐ŸŽ€ The Pools Class ๐ŸŽ€

The Pools class inherits from Resource <#openstack.resource.Resource>. (yes, the link is doing a little split โ€” that's just how it rendered, don't come for me ๐Ÿ™ˆ)

class openstack.block_storage.v3.stats.Pools(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. (protective, communicative, iconic ๐Ÿ”ฅ)
  • resource_key = '' โ€” singular form of key for resource. empty string, and honestly? mood.
  • resources_key = 'pools' โ€” plural form of key for resource.
  • base_path = '/scheduler-stats/get_pools?detail=True' โ€” the base part of the URI for this resource.
  • allow_fetch = False โ€” allow get operation for this resource.
  • allow_create = False โ€” allow create operation for this resource.
  • allow_delete = False โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. the only thing it does. one job and it's slaying it โœจ
  • name โ€” the Cinder name for the pool.
  • capabilities โ€” returns a dict with information about the pool.

๐Ÿ’œ openstack.block_storage.v3.transfer ๐Ÿ’œ

๐Ÿ‘‘ The Volume Transfer Class ๐Ÿ‘‘

The Volume Transfer class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v3.transfer.Transfer(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'transfer' โ€” singular form of key for resource.
  • resources_key = 'transfers' โ€” plural form of key for resource.
  • base_path = '/volume-transfers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. all four enabled, she's an overachiever, we stan ๐ŸŒŸ
  • id โ€” UUID of the transfer.
  • created_at โ€” the date and time when the resource was created.
  • name โ€” name of the volume to transfer.
  • volume_id โ€” ID of the volume to transfer.
  • auth_key โ€” auth key for the transfer. keep this one close, bestie ๐Ÿคซ
  • links โ€” a list of links associated with this volume. Type: list.
  • no_snapshots โ€” whether to transfer snapshots or not.
  • create(session, prepend_key=True, base_path=None, *, microversion=None, **params) โ€” create a remote resource based on this instance.

Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” DEPRECATED, configure create_opts instead. Whether the resource_key should be prepended in a resource creation request. Default to True.
  • base_path โ€” base part of the URI for creating resources, if different from base_path <#openstack.resource.Resource.base_path>.
  • resource_request_key โ€” DEPRECATED, configure create_opts instead. Overrides the usage of resource_key <#openstack.resource.Resource.resource_key> when prepending a key to the request body. Ignored if prepend_key is false.
  • resource_response_key โ€” DEPRECATED, configure create_opts instead. Overrides the usage of resource_key <#openstack.resource.Resource.resource_key> when processing response bodies. Ignored if prepend_key is false.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional params to pass.

Returns โ€” this Resource instance.

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_create is not set to True. ๐Ÿšจ

  • fetch(session, requires_id=True, base_path=None, error_message=None, skip_cache=False, *, resource_response_key=None, microversion=None, **params) โ€” get volume transfer.

Parameters

  • session (Adapter) โ€” the session to use for making this request.
  • requires_id (boolean) โ€” a boolean indicating whether resource ID should be part of the requested URI.
  • base_path (str) โ€” base part of the URI for fetching resources, if different from base_path <#openstack.resource.Resource.base_path>.
  • error_message (str) โ€” an Error message to be returned if requested object does not exist.
  • skip_cache (bool) โ€” a boolean indicating whether optional API cache should be skipped for this invocation.
  • resource_response_key (str) โ€” overrides the usage of self.resource_key when processing the response body.
  • microversion (str) โ€” API version to override the negotiated one.
  • params (dict) โ€” additional parameters that can be consumed.

Returns โ€” this Resource instance.

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_fetch is not set to True.

Raises NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found. ๐Ÿ˜ญ it's not there bestie, let it go.

  • delete(session, error_message=None, *, microversion=None, **kwargs) โ€” delete a volume transfer.

Parameters

  • session (Adapter) โ€” the session to use for making this request.
  • microversion (str) โ€” API version to override the negotiated one.
  • kwargs (dict) โ€” parameters that will be passed to _prepare_request()

Returns โ€” this Resource instance.

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True. (yes, allow_commit โ€” that's what it says, I don't make the rules ๐Ÿ’€)

Raises NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found.

  • accept(session, *, auth_key=None) โ€” accept a volume transfer.

Parameters

  • session โ€” the session to use for making this request.
  • auth_key โ€” the authentication key for the volume transfer.

Returns โ€” this Transfer instance. ๐Ÿซถ


๐ŸŒธ openstack.block_storage.v3.type ๐ŸŒธ

โญ The Type Class โญ

The Type class inherits from Resource <#openstack.resource.Resource>.

class openstack.block_storage.v3.type.Type(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection (unit tests, we see you ๐Ÿ‘€). If your Resource code touches self._connection, protect it with a None check, bestie.
  • resource_key = 'volume_type' โ€” singular form of the key for this resource.
  • resources_key = 'volume_types' โ€” plural form of the key for this resource.
  • base_path = '/types' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow the get operation for this resource.
  • allow_create = True โ€” allow the create operation for this resource.
  • allow_delete = True โ€” allow the delete operation for this resource.
  • allow_list = True โ€” allow the list operation for this resource.
  • allow_commit = True โ€” allow the update operation for this resource.
  • description โ€” description of the type.
  • extra_specs โ€” a dict of extra specifications. "capabilities" is a usual key.
  • is_public โ€” literally a private volume-type. Type: bool.
  • set_extra_specs(session, **extra_specs) โ€” update extra specs. This call will replace only the extra_specs with the same keys given here. Other keys will not be modified. โœจ
    • Parameters
      • session โ€” the session to use for making this request.
      • extra_specs โ€” key/value extra_specs pairs to be update on this volume type. All keys and values.
    • Returns โ€” the updated extra specs.
  • delete_extra_specs(session, keys) โ€” delete extra specs.
Note: This method will do a HTTP DELETE request for every key in keys.
  • Parameters
    • session โ€” the session to use for this request.
    • keys โ€” the keys to delete.
  • Returns โ€” None
  • get_private_access(session) โ€” list projects with private access to the volume type.
    • Parameters
      • session โ€” the session to use for making this request.
    • Returns โ€” the volume type access response.
  • add_private_access(session, project_id) โ€” add project access from the volume type.
    • Parameters
      • session โ€” the session to use for making this request.
      • project_id โ€” the project to add access for.
  • remove_private_access(session, project_id) โ€” remove project access from the volume type.
    • Parameters
      • session โ€” the session to use for making this request.
      • project_id โ€” the project to remove access for.

The TypeEncryption Class ๐ŸŽ€

The TypeEncryption class inherits from Resource (#openstack.resource.Resource). ๐Ÿ’–

class openstack.block_storage.v3.type.TypeEncryption(_synchronized=False, connection=None, **attrs)

The base resource, bestie. ๐Ÿซถ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection (unit tests, we see you ๐Ÿ‘€). If your Resource code touches self._connection, protect it with a None check.
  • resource_key = 'encryption' โ€” singular form of the key for this resource.
  • resources_key = 'encryption' โ€” plural form of the key for this resource.
  • base_path = '/types/%(volume_type_id)s/encryption' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow the get operation for this resource.
  • allow_create = True โ€” allow the create operation for this resource.
  • allow_delete = True โ€” allow the delete operation for this resource.
  • allow_list = False โ€” allow the list operation for this resource.
  • allow_commit = True โ€” allow the update operation for this resource.
  • cipher โ€” the encryption algorithm or mode.
  • control_location โ€” notional service where encryption is performed.
  • created_at โ€” the date and time when the resource was created.
  • deleted โ€” the resource is deleted or not.
  • deleted_at โ€” the date and time when the resource was deleted.
  • encryption_id โ€” a ID representing this type.
  • key_size โ€” the Size of encryption key.
  • provider โ€” the class that provides encryption support.
  • updated_at โ€” the date and time when the resource was updated.
  • volume_type_id โ€” the ID of the Volume Type.

openstack.block_storage.v3.volume

The Volume Class ๐Ÿ‘‘

The Volume class inherits from Resource (#openstack.resource.Resource). ๐Ÿ’…

class openstack.block_storage.v3.volume.Volume(_synchronized=False, connection=None, **attrs)

The base resource, periodt. ๐ŸŒธ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (#openstack.resource.Resource.new) and existing() (#openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection (unit tests, we see you ๐Ÿ‘€). If your Resource code touches self._connection, protect it with a None check.
  • resource_key = 'volume' โ€” singular form of the key for this resource.
  • resources_key = 'volumes' โ€” plural form of the key for this resource.
  • base_path = '/volumes' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow the get operation for this resource.
  • allow_create = True โ€” allow the create operation for this resource.
  • allow_delete = True โ€” allow the delete operation for this resource.
  • allow_commit = True โ€” allow the update operation for this resource.
  • allow_list = True โ€” allow the list operation for this resource.
  • attachments โ€” instance attachment information. If this volume is attached to a server instance, the attachments list includes the UUID of the attached server, an attachment UUID, the name of the attached host, if any, the volume UUID, the device, and the device UUID. Otherwise, this list is empty.
  • availability_zone โ€” the availability zone.
  • backup_id โ€” to create a volume from an existing backup, specify the ID of the existing volume backup. (since 3.47)
  • consistency_group_id โ€” ID of the consistency group.
  • consumes_quota โ€” whether this resource consumes quota or not. Resources that aren't counted for quota usage are usually temporary internal resources created to perform an operation. (since 3.65)
  • cluster_name โ€” the cluster name of volume backend. (since 3.61)
  • created_at โ€” the timestamp of this volume creation.
  • description โ€” the volume description.
  • encryption_key_id โ€” the UUID of the encryption key. Only included for encrypted volumes. (since 3.64)
  • extended_replication_status โ€” extended replication status on this volume.
  • group_id โ€” the ID of the group that the volume belongs to. (since 3.13)
  • host โ€” the volume's current back-end.
  • image_id โ€” the ID of the image from which you want to create the volume. Required to create a bootable volume.
  • is_bootable โ€” enables or disables the bootable attribute. You can boot an instance from a bootable volume. Type: bool
  • is_encrypted โ€” True if this volume is encrypted, False if not. Type: bool
  • is_multiattach โ€” whether volume will be sharable or not.
  • migration_id โ€” the volume ID that this volume's name on the back-end is based on.
  • migration_status โ€” the status of this volume's migration (None means that a migration is not currently in progress).
  • project_id โ€” the project ID associated with current back-end.
  • replication_driver_data โ€” data set by the replication driver
  • provider_id โ€” the provider ID for the volume. (since 3.21)
  • replication_status โ€” status of replication on this volume.
  • scheduler_hints โ€” scheduler hints for the volume
  • service_uuid โ€” a unique identifier that's used to indicate what node the volume-service for a particular volume is being serviced by. (since 3.48)
  • shared_targets โ€” an indicator whether the host connecting the volume should lock for the whole attach/detach process or not. true means only if the iSCSI initiator running on the host doesn't support manual scans, false means never use locks, and null means to always use locks. Look at os-brick's guard_connection context manager. Default=True. (since 3.48)
  • size โ€” the size of the volume, in gibibytes (GiB).
  • snapshot_id โ€” bestie, if you wanna build a volume out of an existing snapshot, drop the ID of that existing volume snapshot right here. And like, the new volume lands in the same availability zone and gets the same size as the snapshot. matching outfits fr ๐Ÿ’…
  • source_volume_id โ€” cloning an existing volume? give it the ID of the existing volume and it makes you a new one with the same size as the source. no cap.
  • status โ€” one of these icons only: creating, available, attaching, in-use deleting, error, error_deleting, backing-up, restoring-backup, error_restoring. for the deets on what each one means, the Block Storage API documentation is right there, go read it ๐Ÿซถ
  • updated_at โ€” the date and time when the resource got updated. its little glow-up timestamp โœจ
  • user_id โ€” the user ID that's associated with the volume
  • volume_image_metadata โ€” one or more metadata key and value pairs about image
  • volume_type โ€” the name of the associated volume type
  • volume_type_id โ€” the associated volume type ID for the volume. (since 3.61) โญ

  • extend(session, size) โ€” extend a volume size. make it bigger, main character energy ๐Ÿ“
  • complete_extend(session, error=False) โ€” complete volume extend operation
  • set_bootable_status(session, bootable=True) โ€” set volume bootable status flag
  • set_readonly(session, readonly) โ€” set volume readonly flag
  • set_image_metadata(session, metadata) โ€” sets image metadata key-value pairs on the volume
  • delete_image_metadata(session) โ€” remove all image metadata from the volume. bye bye, all of it ๐Ÿงน
  • delete_image_metadata_item(session, key) โ€” remove a single image metadata from the volume. surgical.
  • reset_status(session, status=None, attach_status=None, migration_status=None) โ€” reset volume statuses (admin operation). admin only, ikyk ๐Ÿ‘‘
  • revert_to_snapshot(session, snapshot_id) โ€” revert volume to its snapshot. rewind time, lowkey iconic ๐Ÿ•ฐ๏ธ
  • attach(session, mountpoint, instance=None, host_name=None) โ€” attach volume to server
  • detach(session, attachment, force=False, connector=None) โ€” detach volume from server
  • classmethod manage(session, host, ref, name=None, description=None, volume_type=None, availability_zone=None, metadata=None, bootable=False, cluster=None) โ€” manage an existing volume.
  • unmanage(session) โ€” unmanage volume
  • retype(session, new_type, migration_policy=None) โ€” change volume type. whole new aesthetic ๐Ÿ’…
  • migrate(session, host=None, force_host_copy=False, lock_volume=False, cluster=None) โ€” migrate volume
  • complete_migration(session, new_volume_id, error=False) โ€” complete volume migration
  • force_delete(session) โ€” force volume deletion. it's giving no-mercy ๐Ÿ’€
  • upload_to_image(session, image_name, *, force=False, disk_format=None, container_format=None, visibility=None, protected=None) โ€” upload the volume to image service
  • reserve(session) โ€” reserve volume
  • unreserve(session) โ€” unreserve volume
  • begin_detaching(session) โ€” update volume status to 'detaching'
  • abort_detaching(session) โ€” roll back volume status to 'in-use'
  • init_attachment(session, connector) โ€” initialize volume attachment
  • terminate_attachment(session, connector) โ€” terminate volume attachment

๐ŸŒˆ Cluster Resources

๐Ÿฆ‹ openstack.clustering.v1.action

โœจ The Action Class โœจ

okay so the Action class inherits from Resource <#openstack.resource.Resource>. yes, that Resource. the blueprint of everything. ๐Ÿซถ

class openstack.clustering.v1.action.Action(_synchronized=False, connection=None, **attrs)

the base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. don't touch, fr fr ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, like in unit tests. use of self._connection in Resource code should protect itself with a check for None. safety first bestie ๐ŸŽ€

Class attributes:

  • resource_key = 'action' โ€” singular form of key for resource.
  • resources_key = 'actions' โ€” plural form of key for resource. (yes they're different, slay)
  • base_path = '/actions' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. this must be PATCH if allow_patch is True. non-negotiable โš ๏ธ
  • name โ€” name of the action.
  • target_id โ€” ID of the target object, which can be a cluster or a node.
  • action โ€” built-in type name of action.
  • cause โ€” a string representation of the reason why the action was created. the why, the lore ๐Ÿ‘€
  • owner_id โ€” the owning engine that is currently running the action.
  • user_id โ€” the ID of the user who created this action.
  • project_id โ€” the ID of the project this profile belongs to.
  • domain_id โ€” the domain ID of the action.
  • interval โ€” interval in seconds between two consecutive executions.
  • start_at โ€” the time the action was started.
  • end_at โ€” the time the action completed execution.
  • timeout โ€” the timeout in seconds.
  • status โ€” current status of the action.
  • inputs โ€” a dictionary containing the inputs to the action.
  • outputs โ€” a dictionary containing the outputs to the action.
  • depends_on โ€” a list of actions that must finish before this action starts execution.
  • depended_by โ€” a list of actions that can start only after this action has finished.
  • created_at โ€” timestamp when the action is created.
  • updated_at โ€” timestamp when the action was last updated.
  • cluster_id โ€” the ID of cluster which this action runs on.

๐Ÿงš openstack.clustering.v1.build_info

๐ŸŒธ The BuildInfo Class ๐ŸŒธ

BuildInfo also inherits from Resource <#openstack.resource.Resource>. tiny class, big vibes.

class openstack.clustering.v1.build_info.BuildInfo(_synchronized=False, connection=None, **attrs)

the base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, like in unit tests. use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • base_path = '/build-info' โ€” the base part of the URI for this resource.
  • resource_key = 'build_info' โ€” singular form of key for resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • api โ€” string representation of the API build version
  • engine โ€” string representation of the engine build version

๐Ÿ‘‘ openstack.clustering.v1.Cluster

๐Ÿ’œ The Cluster Class ๐Ÿ’œ

yup, Cluster inherits from Resource <#openstack.resource.Resource>. this one does everything โ€” create, fetch, commit, delete, list. full send ๐Ÿ”ฅ

class openstack.clustering.v1.cluster.Cluster(_synchronized=False, connection=None, **attrs)

the base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = 'cluster' โ€” singular form of key for resource.
  • resources_key = 'clusters' โ€” plural form of key for resource.
  • base_path = '/clusters' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. this must be PATCH if allow_patch is True. seriously, it's a whole thing โš ๏ธ
  • name โ€” the name of the cluster.
  • profile_id โ€” the ID of the profile used by this cluster.
  • user_id โ€” the ID of the user who created this cluster, thus the owner of it. the founder, the originator ๐Ÿ’ซ
  • project_id โ€” the ID of the project this cluster belongs to.
  • domain_id โ€” the domain ID of the cluster owner.
  • init_at โ€” timestamp of when the cluster was initialized. type: datetime object parsed from ISO 8601 formatted string.
  • created_at โ€” timestamp of when the cluster was created. type: datetime object parsed from ISO 8601 formatted string.
  • updated_at โ€” timestamp of when the cluster was last updated. type: datetime object parsed from ISO 8601 formatted string.
  • min_size โ€” lower bound (inclusive) for the size of the cluster.
  • max_size โ€” the upper bound (inclusive) for the size of the cluster. A value of -1 means there is literally no upper limit on cluster size. No cap, bestie. ๐Ÿ’…
  • desired_capacity โ€” the desired capacity for the cluster. A cluster would be created at the scale specified by this value. โœจ
  • timeout โ€” default timeout (in seconds) for cluster operations. Give it a sec, okay? โณ
  • status โ€” a string representation of the cluster status. The vibe check in text form. ๐ŸŒˆ
  • status_reason โ€” a string describing the reason why the cluster is in its current status. The lore behind the status. ๐Ÿ“–
  • config โ€” a dictionary configuration for cluster. ๐ŸŽ€
  • metadata โ€” a collection of key-value pairs that are attached to the cluster. ๐Ÿท๏ธ
  • data โ€” a dictionary with some runtime data associated with the cluster. ๐Ÿซถ
  • node_ids โ€” a list of IDs of nodes that are members of the cluster. The squad list. ๐Ÿ‘‘
  • profile_name โ€” name of the profile used by the cluster. ๐ŸŒธ
  • is_profile_only โ€” specify whether the cluster update should only pertain to the profile. Very โ€œthis update is about the profile, not the whole clusterโ€ energy. ๐Ÿ’ซ
  • dependents โ€” a dictionary with dependency information of the cluster. ๐Ÿงš
op(session, operation, **params)

Perform an operation on the cluster.

Parameters:

  • session โ€” a session object used for sending request. ๐Ÿ“จ
  • operation โ€” a string representing the operation to be performed. ๐Ÿ› ๏ธ
  • params (dict) โ€” an optional dict providing the parameters for the operation. ๐ŸŽ›๏ธ

Returns: a dictionary containing the action ID. ๐Ÿชช


๐Ÿฆ‹ openstack.clustering.v1.cluster_policy ๐Ÿฆ‹

The ClusterPolicy Class

The ClusterPolicy class inherits from Resource <#openstack.resource.Resource>. Itโ€™s giving very โ€œI know my lineageโ€ energy. ๐Ÿ‘‘

class openstack.clustering.v1.cluster_policy.ClusterPolicy(_synchronized=False, connection=None, **attrs)

The base resource. The blueprint. The main character. โœจ

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. Donโ€™t touch, bestie. ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. Safety first, slay. ๐Ÿ›ก๏ธ
  • resource_key = 'cluster_policy' โ€” singular form of key for resource. ๐Ÿ”‘
  • resources_key = 'cluster_policies' โ€” plural form of key for resource. ๐Ÿ”‘๐Ÿ”‘
  • base_path = '/clusters/%(cluster_id)s/policies' โ€” the base part of the URI for this resource. ๐Ÿ“
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ“‹
  • allow_fetch = True โ€” allow get operation for this resource. ๐Ÿ”
  • policy_id โ€” ID of the policy object. ๐Ÿชช
  • policy_name โ€” name of the policy object. ๐Ÿท๏ธ
  • cluster_id โ€” ID of the cluster object. ๐ŸŽฏ
  • cluster_name โ€” name of the cluster object. ๐Ÿ’–
  • policy_type โ€” type string of the policy. ๐Ÿงฌ
  • is_enabled โ€” whether the policy is enabled on the cluster. Type: bool. โœ…
  • data โ€” data associated with the cluster-policy binding. ๐Ÿซถ

๐ŸŒธ openstack.clustering.v1.event ๐ŸŒธ

The Event Class

The Event class inherits from Resource <#openstack.resource.Resource>. Itโ€™s all about what happened and when, iykyk. ๐Ÿ•ฐ๏ธ

class openstack.clustering.v1.event.Event(_synchronized=False, connection=None, **attrs)

The base resource. Same iconic blueprint energy. โœจ

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. Leave it alone, seriously. ๐Ÿ’€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ›ก๏ธ
  • resource_key = 'event' โ€” singular form of key for resource. ๐Ÿ”‘
  • resources_key = 'events' โ€” plural form of key for resource. ๐Ÿ”‘๐Ÿ”‘
  • base_path = '/events' โ€” the base part of the URI for this resource. ๐Ÿ“
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ“‹
  • allow_fetch = True โ€” allow get operation for this resource. ๐Ÿ”
  • generated_at โ€” timestamp string (in ISO8601 format) when the event was generated. โฐ
  • obj_id โ€” the UUID of the object related to this event. ๐Ÿชช
  • obj_name โ€” the name of the object related to this event. ๐Ÿท๏ธ
  • obj_type โ€” the type name of the object related to this event. ๐Ÿงฌ
  • cluster_id โ€” the UUID of the cluster related to this event, if any. ๐ŸŽฏ
  • level โ€” the event level (priority). ๐Ÿšฆ
  • user_id โ€” the ID of the user. ๐Ÿ‘ค
  • project_id โ€” the ID of the project (tenant). ๐Ÿข
  • action โ€” the string representation of the action associated with the event. ๐ŸŽฌ
  • status โ€” the status of the associated object. ๐ŸŒˆ
  • status_reason โ€” a string description of the reason that brought the object into its current status. ๐Ÿ“–
  • meta_data โ€” the metadata of an event object. ๐Ÿท๏ธ

๐ŸŽ€ openstack.clustering.v1.Node ๐ŸŽ€

The Node Class

The Node class inherits from Resource <#openstack.resource.Resource>. This one is a whole member of the cluster, and it has lore. ๐Ÿ‘‘

class openstack.clustering.v1.node.Node(_synchronized=False, connection=None, **attrs)

The base resource. The blueprint. The moment. โœจ

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. Do not use directly, bestie. ๐Ÿ™…โ€โ™€๏ธ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ›ก๏ธ
  • resource_key = 'node' โ€” singular form of key for resource. ๐Ÿ”‘
  • resources_key = 'nodes' โ€” plural form of key for resource. ๐Ÿ”‘๐Ÿ”‘
  • base_path = '/nodes' โ€” the base part of the URI for this resource. ๐Ÿ“
  • allow_create = True โ€” allow create operation for this resource. ๐Ÿ†•
  • allow_fetch = True โ€” allow get operation for this resource. ๐Ÿ”
  • allow_commit = True โ€” allow update operation for this resource. โœ๏ธ
  • allow_delete = True โ€” allow delete operation for this resource. ๐Ÿ—‘๏ธ
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ“‹
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. Important detail, no skipping. ๐Ÿšจ
  • name โ€” the name of the node. ๐Ÿท๏ธ
  • physical_id โ€” the ID of the physical object that backs the node. ๐Ÿชช
  • cluster_id โ€” the ID of the cluster in which this node is a member. A node is an orphan node if this field is empty. ๐Ÿ˜ญ
  • profile_id โ€” the ID of the profile used by this node. ๐ŸŽ€
  • domain_id โ€” the domain ID of the node. ๐ŸŒ
  • user_id โ€” the ID of the user who created this node. ๐Ÿ‘ค
  • project_id โ€” the ID of the project this node belongs to. ๐Ÿข
  • profile_name โ€” the name of the profile used by this node. ๐ŸŒธ
  • index โ€” an integer that is unique inside the owning cluster. A value of -1 means this node is an orphan node. ๐Ÿซ 
  • role โ€” a string indicating the role the node plays in a cluster. ๐ŸŽญ
  • init_at โ€” the timestamp of the node objectโ€™s initialization. Type: datetime object parsed from ISO 8601 formatted string. โฐ
  • created_at โ€” the timestamp of the nodeโ€™s creation, i.e. the physical object represented by this node is also created. Type: datetime object parsed from ISO 8601 formatted string. ๐ŸŽ‚
  • updated_at โ€” the timestamp the node was last updated. Type: datetime object parsed from ISO 8601 formatted string. ๐Ÿ”„
  • status โ€” a string indicating the nodeโ€™s status. ๐ŸŒˆ
  • status_reason โ€” a string describing why the node entered its current status. ๐Ÿ“–
  • metadata โ€” a map containing key-value pairs attached to the node. ๐Ÿท๏ธ
  • data โ€” a map containing some runtime data for this node. ๐Ÿซถ
  • details โ€” a map containing the details of the physical object this node represents. ๐Ÿ”
  • dependents โ€” a map containing the dependency of nodes. ๐Ÿงš
  • tainted โ€” whether the node is tainted. Type: bool. ๐Ÿ’€
check(session, **params)

An action procedure for the node to check its health status. A little wellness check, but for infrastructure. ๐Ÿฉบ

Parameters:

  • session โ€” a session object used for sending request. ๐Ÿ“จ

Returns: a dictionary containing the action ID. ๐Ÿชช

recover(session, **params)

An action procedure for the node to recover. Healing arc, periodt. ๐Ÿ’–

Parameters:

  • session โ€” a session object used for sending request. ๐Ÿ“จ

Returns: a dictionary containing the action ID. ๐Ÿชช

op(session, operation, **params)

Perform an operation on the specified node.

Parameters:

  • session โ€” a session object used for sending request. ๐Ÿ“จ
  • operation โ€” a string representing the operation to be performed. ๐Ÿ› ๏ธ
  • params (dict) โ€” an optional dict providing the parameters for the operation. ๐ŸŽ›๏ธ

Returns: a dictionary containing the action ID. ๐Ÿชช

  • adopt( session, preview=False, **params ) โ€” lowkey the glow-up moment for a node: it adopts that node for management, bestie ๐Ÿซถ

Parameters:

  • session โ€” a session object used for sending the request. It's giving "the messenger", nothing happens without it.
  • preview โ€” a boolean indicating whether the adoption is a preview. A "preview" does not create the node object. So like, window shopping only, no receipt ๐Ÿ˜ญ
  • params (dict) โ€” a dict providing the details of a node to be adopted.

๐ŸŒธ openstack.clustering.v1.policy

The Policy Class

The Policy class inherits from Resource.

class openstack.clustering.v1.policy.Policy(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing(). iykyk, hands off ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. fr fr, do the None check.
  • resource_key = 'policy' โ€” singular form of key for resource.
  • resources_key = 'policies' โ€” plural form of key for resource.
  • base_path = '/policies' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. periodt.
  • name โ€” the name of the policy.
  • type โ€” the type name of the policy.
  • project_id โ€” the ID of the project this policy belongs to.
  • user_id โ€” the ID of the user who created this policy.
  • created_at โ€” the timestamp when the policy is created.
  • updated_at โ€” the timestamp when the policy was last updated.
  • spec โ€” the specification of the policy.
  • data โ€” a dictionary containing runtime data of the policy.

๐ŸŽ€ openstack.clustering.v1.policy_type

The PolicyType Class

The PolicyType class inherits from Resource.

class
openstack.clustering.v1.policy_type.PolicyType(_synchronized=False,
connection=None, **attrs)

The base resource โœจ

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'policy_type' โ€” singular form of key for resource.
  • resources_key = 'policy_types' โ€” plural form of key for resource.
  • base_path = '/policy-types' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • name โ€” name of policy type.
  • schema โ€” the schema of the policy type.
  • support_status โ€” the support status of the policy type.

๐Ÿฆ‹ openstack.clustering.v1.profile

The Profile Class

The Profile class inherits from Resource.

class openstack.clustering.v1.profile.Profile(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'profile' โ€” singular form of key for resource.
  • resources_key = 'profiles' โ€” plural form of key for resource.
  • base_path = '/profiles' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • name โ€” the name of the profile.
  • type โ€” the type of the profile.
  • project_id โ€” the ID of the project this profile belongs to.
  • domain_id โ€” the domain ID of the profile.
  • user_id โ€” the ID of the user who created this profile.
  • spec โ€” the spec of the profile.
  • metadata โ€” a collection of key-value pairs that are attached to the profile.
  • created_at โ€” timestamp of when the profile was created.
  • updated_at โ€” timestamp of when the profile was last updated.

๐Ÿงš openstack.clustering.v1.profile_type

The ProfileType Class

The ProfileType class inherits from Resource.

class
openstack.clustering.v1.profile_type.ProfileType(_synchronized=False,
connection=None, **attrs)

The base resource ๐ŸŒˆ

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'profile_type' โ€” singular form of key for resource.
  • resources_key = 'profile_types' โ€” plural form of key for resource.
  • base_path = '/profile-types' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • name โ€” name of the profile type.
  • schema โ€” the schema of the profile type.
  • support_status โ€” the support status of the profile type.

๐Ÿ’– openstack.clustering.v1.receiver

The Receiver Class

The Receiver class inherits from Resource.

class openstack.clustering.v1.receiver.Receiver(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'receiver' โ€” singular form of key for resource.
  • resources_key = 'receivers' โ€” plural form of key for resource.
  • base_path = '/receivers' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • name โ€” the name of the receiver.
  • type โ€” the type of the receiver.
  • user_id โ€” the ID of the user who created the receiver, thus the owner of it. main character energy, honestly.
  • project_id โ€” the ID of the project this receiver belongs to.
  • domain_id โ€” the domain ID of the receiver.
  • cluster_id โ€” the ID of the targeted cluster.
  • action โ€” the name of the targeted action.
  • created_at โ€” timestamp of when the receiver was created.
  • updated_at โ€” timestamp of when the receiver was last updated.
  • actor โ€” the credential of the impersonated user.
  • params โ€” a dictionary containing key-value pairs that are provided to the targeted action.
  • channel โ€” the information about the channel through which you can trigger the receiver, hence the associated action. that's the plug, bestie ๐Ÿ”Œ

๐Ÿ”ฅ Compute Resources

openstack.compute.v2.aggregate

The Aggregate Class

The Aggregate class inherits from Resource.

๐Ÿงฉ openstack.compute.v2.aggregate.Aggregate

class openstack.compute.v2.aggregate.Aggregate(_synchronized=False, connection=None, **attrs)

This is the base resource, bestie. ๐Ÿ’…

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing() instead.
  • connection โ€” Reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests. If your Resource code touches self._connection, protect it with a check for None.

Hereโ€™s the whole vibe check of its attributes and methods:

  • resource_key = 'aggregate' โ€” Singular form of the key for this resource.
  • resources_key = 'aggregates' โ€” Plural form of the key for this resource.
  • base_path = '/os-aggregates' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Yep, the create operation is allowed for this resource.
  • allow_fetch = True โ€” Yep, the get (fetch) operation is allowed for this resource.
  • allow_delete = True โ€” Yep, the delete operation is allowed for this resource.
  • allow_list = True โ€” Yep, the list operation is allowed for this resource.
  • allow_commit = True โ€” Yep, the update operation is allowed for this resource.
  • availability_zone โ€” Availability zone of the aggregate.
  • created_at โ€” The date and time when the resource was created.
  • deleted_at โ€” The date and time when the resource was deleted.
  • is_deleted โ€” Deleted?
  • name โ€” Name of the aggregate.
  • hosts โ€” Hosts.
  • metadata โ€” Metadata.
  • updated_at โ€” The date and time when the resource was updated.
  • uuid โ€” UUID.
  • add_host(session, host) โ€” Adds a host to an aggregate.
  • remove_host(session, host) โ€” Removes a host from an aggregate.
  • set_metadata(session, metadata) โ€” Creates or replaces metadata for an aggregate.
  • precache_images(session, images) โ€” Requests image pre-caching.

๐ŸŒธ openstack.compute.v2.availability_zone

โœจ The AvailabilityZone Class

The AvailabilityZone class inherits from Resource.

class openstack.compute.v2.availability_zone.AvailabilityZone(_synchronized=False, connection=None, **attrs)

This is the base resource, bestie. ๐Ÿซถ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing() instead.
  • connection โ€” Reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests. If your Resource code touches self._connection, protect it with a check for None.
  • resources_key = 'availabilityZoneInfo' โ€” Plural form of the key for this resource.
  • base_path = '/os-availability-zone' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Yep, the list operation is allowed for this resource.
  • name โ€” Name of the availability zone.
  • state โ€” State of the availability zone.
  • hosts โ€” Hosts of the availability zone.

๐ŸŽ€ openstack.compute.v2.console_auth_token

๐Ÿฆ‹ The ServerRemoteConsole Class

The heading says ServerRemoteConsole, but the class youโ€™re actually getting is ConsoleAuthToken โ€” slay, we roll with what the page says. ๐Ÿ’€

The ConsoleAuthToken class inherits from Resource.

class openstack.compute.v2.console_auth_token.ConsoleAuthToken(_synchronized=False, connection=None, **attrs)

This is the base resource. โœจ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing() instead.
  • connection โ€” Reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests. If your Resource code touches self._connection, protect it with a check for None.
  • resource_key = 'console' โ€” Singular form of the key for this resource.
  • base_path = '/os-console-auth-tokens' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Yep, the get (fetch) operation is allowed for this resource.
  • instance_uuid โ€” Instance UUID.
  • host โ€” Hypervisor host.
  • port โ€” Hypervisor port.
  • tls_port โ€” Hypervisor TLS port.
  • internal_access_path โ€” Internal access path.

๐ŸŒˆ openstack.compute.v2.extension

๐Ÿ’œ The Extension Class

The Extension class inherits from Resource.

class openstack.compute.v2.extension.Extension(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐Ÿงš

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing() instead.
  • connection โ€” Reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests. If your Resource code touches self._connection, protect it with a check for None.
  • resource_key = 'extension' โ€” Singular form of the key for this resource.
  • resources_key = 'extensions' โ€” Plural form of the key for this resource.
  • base_path = '/extensions' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Yep, the get (fetch) operation is allowed for this resource.
  • allow_list = True โ€” Yep, the list operation is allowed for this resource.
  • alias โ€” A short name by which this extension is also known.
  • description โ€” Text describing this extensionโ€™s purpose.
  • links โ€” Links pertaining to this extension. This is a list of dictionaries, each including keys href and rel.
  • name โ€” The name of the extension.
  • namespace โ€” A URL pointing to the namespace for this extension.
  • updated_at โ€” Timestamp when this extension was last updated.

๐Ÿ“ openstack.compute.v2.flavor

๐Ÿ‘‘ The Flavor Class

The Flavor class inherits from Resource.

class openstack.compute.v2.flavor.Flavor(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐ŸŒŸ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing() instead.
  • connection โ€” Reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests. If your Resource code touches self._connection, protect it with a check for None.
  • resource_key = 'flavor' โ€” Singular form of the key for this resource.
  • resources_key = 'flavors' โ€” Plural form of the key for this resource.
  • base_path = '/flavors' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Yep, the create operation is allowed for this resource.
  • allow_fetch = True โ€” Yep, the get (fetch) operation is allowed for this resource.
  • allow_delete = True โ€” Yep, the delete operation is allowed for this resource.
  • allow_list = True โ€” Yep, the list operation is allowed for this resource.
  • allow_commit = True โ€” Yep, the update operation is allowed for this resource.
  • name โ€” The name of this flavor.
  • original_name โ€” The name of this flavor when returned by server list/show.
  • description โ€” The description of the flavor.
  • disk โ€” Size of the disk this flavor offers. Type: int.
  • is_public โ€” True if this is a publicly visible flavor. False if this is a private image. Type: bool.
  • ram โ€” The amount of RAM (in MB) this flavor offers. Type: int.
  • vcpus โ€” The number of virtual CPUs this flavor offers. Type: int.
  • swap โ€” Size of the swap partitions.
  • ephemeral โ€” Size of the ephemeral data disk attached to this server. Type: int.
  • is_disabled โ€” True if this flavor is disabled, False if not. Type: bool.
  • rxtx_factor โ€” The bandwidth scaling factor this flavor receives on the network.
  • extra_specs โ€” A dictionary of the flavorโ€™s extra-specs key-and-value pairs.
classmethod list(session, paginated=True, base_path='/flavors/detail', allow_unknown_params=False, *, microversion=None, headers=None, max_items=None, **params)

This method is a generator which yields resource objects.

This resource object list generator handles pagination and takes query params for response filtering.

Parameters

  • session โ€” The session to use for making this request.
  • paginated โ€” True if a GET to this resource returns a paginated series of responses, or False if a GET returns only one page of data. When paginated is False, only one page of data will be returned regardless of the APIโ€™s support of pagination.
  • base_path โ€” Base part of the URI for listing resources, if different from base_path.
  • allow_unknown_params โ€” True to accept, but discard, unknown query parameters. This allows getting list of 'filters' and passing everything known to the server. False will result in a validation exception when unknown query parameters are passed.
  • microversion โ€” the API version that overrides the negotiated one. Yeah, we're bossing the version negotiation around, we do that now ๐Ÿ’…
  • headers โ€” extra headers to inject straight into the HTTP request. Sneaky little add-ons, love that for us ๐ŸŽ€
  • max_items โ€” the max number of items to return. Pro tip from the docs themselves: usually you gotta pair this with paginated=True, okay? ๐Ÿ”ฅ
  • params โ€” these keyword arguments get passed straight through the _transpose() method to see if any of them match expected query parameters that should be sent in the params argument to get(). They also get checked against the base_path format string to see if any path fragments need filling in from this argument. And here's the vibe: parameters the server side supports as filters get passed in the API call, and the remaining ones get applied as filters to the results you already retrieved. Two jobs, one param, main character energy โœจ

Returns

A generator of Resource objects. It's giving infinite stream, lowkey ๐ŸŒˆ

Raises MethodNotSupported if Resource.allow_list is not set to True.

Raises InvalidResourceQuery if the query contains invalid params. Rude, but fair ๐Ÿ’€


add_tenant_access(session, tenant)

Adds flavor access to a tenant and flavor. Sharing is caring ๐Ÿซถ

Parameters

  • session โ€” the session to use for making this request.
  • tenant โ€” yeah, just the tenant. That's the one.

Returns โ€” None


remove_tenant_access(session, tenant)

Removes flavor access to a tenant and flavor. Taking it back, no hard feelings ๐Ÿ™ˆ

Parameters

  • session โ€” the session to use for making this request.
  • tenant โ€” the tenant in question.

Returns โ€” None


get_access(session)

Lists tenants who have access to a private flavor. Private flavor access management is admin-only by default, so if you're not admin, this is not your moment, bestie ๐Ÿ˜ญ

Quick refresher: a private flavor has is_public set to false, while a public flavor has is_public set to true. That's the whole distinction, no cap.

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” a list of dicts with flavor_id and tenant_id attributes ๐Ÿ“‹


fetch_extra_specs(session)

Fetches extra specs of the flavor. Starting with 2.61, extra specs are returned right there with the flavor details โ€” before that, you needed a separate call. Timeline lore fr fr โญ

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” the updated flavor.


create_extra_specs(session, specs)

Creates extra specs for a flavor. Crafting era โœจ

Parameters

  • session โ€” the session to use for making this request.
  • specs โ€” the specs to create.

Returns โ€” the updated flavor.


get_extra_specs_property(session, prop)

Gets one individual extra spec property. Just the one, we're being specific ๐ŸŽ€

Parameters

  • session โ€” the session to use for making this request.
  • prop โ€” the property to fetch.

Returns โ€” the value of the property if it exists, else None. Could be None, don't panic ๐Ÿ’€


update_extra_specs_property(session, prop, val)

Updates an extra spec for a flavor. Glow-up time ๐Ÿ’…

Parameters

  • session โ€” the session to use for making this request.
  • prop โ€” the property to update.
  • val โ€” the value to update with.

Returns โ€” the updated value of the property.


delete_extra_specs_property(session, prop)

Deletes an extra spec for a flavor. Bye bestie ๐Ÿ‘‹

Parameters

  • session โ€” the session to use for making this request.
  • prop โ€” the property to delete.

Returns โ€” None


๐Ÿฆ‹ The FlavorDetail Class ๐Ÿฆ‹

The FlavorDetail class inherits from Flavor. That's it, it's literally just that ๐Ÿ’œ

openstack.compute.v2.flavor.FlavorDetail

alias of Flavor


๐ŸŒธ openstack.compute.v2.hypervisor ๐ŸŒธ

The Hypervisor Class

The Hypervisor class inherits from Resource. Classic inheritance moment ๐Ÿ‘‘

class openstack.compute.v2.hypervisor.Hypervisor(_synchronized=False, connection=None, **attrs)

The base resource. The blueprint. The origin story ๐Ÿซถ

Parameters

  • _synchronized โ€” this is not intended to be used directly, okay? See new() and existing() instead. It said what it said ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None so that Resource objects can be used without an active Connection, like in unit tests. And heads up: any use of self._connection in Resource code should protect itself with a check for None. Safety first, always ๐ŸŽ€

resource_key = 'hypervisor' โ€” singular form of key for resource.

resources_key = 'hypervisors' โ€” plural form of key for resource. Plural slay โœจ

base_path = '/os-hypervisors' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_list = True โ€” allow list operation for this resource.

cpu_info โ€” information about the hypervisor's CPU. Up to 2.28 it was a string. Type glow-up arc, we love to see it ๐Ÿ’…

host_ip โ€” IP address of the host.

hypervisor_type โ€” the type of hypervisor.

hypervisor_version โ€” version of the hypervisor.

name โ€” name of hypervisor.

service_details โ€” service details.

servers โ€” list of Servers.

state โ€” state of hypervisor.

status โ€” status of hypervisor.

uptime โ€” the total uptime of the hypervisor and information about average load. Important detail: this attribute is set only when querying uptime explicitly. It's not just vibing there by default, you have to ask for it ๐ŸŒˆ

current_workload โ€” measurement of the hypervisor's current workload.

disk_available โ€” disk space available to the scheduler.

local_disk_used โ€” the amount, in gigabytes, of local storage used.

local_disk_size โ€” the amount, in gigabytes, of the local storage device.

local_disk_free โ€” the amount, in gigabytes, of free space on the local storage device.

memory_used โ€” the amount, in megabytes, of memory.

memory_size โ€” the amount, in megabytes, of total memory.

memory_free โ€” the amount, in megabytes, of available memory.

running_vms โ€” count of the running virtual machines.

vcpus_used โ€” count of the VCPUs in use.

vcpus โ€” count of all VCPUs.


๐Ÿ’– get_uptime(session) ๐Ÿ’–

Gets uptime information for the hypervisor.

Updates the uptime attribute of the hypervisor object. It literally edits itself, icon behavior โœจ


๐ŸŒบ openstack.compute.v2.image ๐ŸŒบ

The Image Class

The Image class inherits from Resource.

class openstack.compute.v2.image.Image(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing(). Same warning as always, don't come for me ๐Ÿ’€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. Say it with me: none-check ๐Ÿ’…

resource_key = 'image' โ€” singular form of key for resource.

resources_key = 'images' โ€” plural form of key for resource.

base_path = '/images' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

links โ€” links pertaining to this image. This is a list of dictionaries, each including keys href and rel, and optionally type. Dictionary girlies rise ๐ŸŽ€

name โ€” the name of this image.

created_at โ€” timestamp when the image was created.

min_disk โ€” the mimimum disk size. Type: int.

min_ram โ€” the minimum RAM size. Type: int.

progress โ€” if this image is still building, its progress is represented here. Once an image is created, progress will be 100. Type: int. We love a finished era ๐Ÿ”ฅ

status โ€” the status of this image.

updated_at โ€” timestamp when the image was updated.

size โ€” size of the image in bytes. Type: int.


๐Ÿงš The ImageDetail Class ๐Ÿงš

The ImageDetail class inherits from Image.

openstack.compute.v2.image.ImageDetail

alias of Image


๐Ÿ‘‘ openstack.compute.v2.keypair ๐Ÿ‘‘

The Keypair Class

The Keypair class inherits from Resource. Keys, but make it a resource ๐Ÿ—๏ธ

class openstack.compute.v2.keypair.Keypair(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” your reference to the Connection being used, bestie. It defaults to None so Resource objects can exist without an active Connection โ€” think unit tests and chill vibes. If youโ€™re touching self._connection inside Resource code, protect it with a check for None. ๐Ÿ’…
  • resource_key = 'keypair' โ€” the singular key name for this resource. โœจ
  • resources_key = 'keypairs' โ€” the plural key name for this resource. ๐ŸŽ€
  • base_path = '/os-keypairs' โ€” the base part of the URI for this resource. ๐Ÿฆ‹
  • allow_create = True โ€” create is allowed for this resource. ๐Ÿ’–
  • allow_fetch = True โ€” get is allowed for this resource. ๐ŸŒธ
  • allow_delete = True โ€” delete is allowed for this resource. ๐Ÿซถ
  • allow_list = True โ€” list is allowed for this resource. ๐Ÿ˜ญ
  • created_at โ€” the date and time when the resource was created. โญ
  • is_deleted โ€” a boolean that says whether this keypair is deleted or not. ๐Ÿ’€
  • fingerprint โ€” the short fingerprint associated with the public_key for this keypair. ๐Ÿ”ฅ
  • id โ€” the id identifying the keypair. ๐Ÿ‘‘
  • name โ€” a name identifying the keypair. ๐ŸŒˆ
  • private_key โ€” the private key for the keypair. ๐Ÿ™ˆ
  • public_key โ€” the SSH public key that is paired with the server. ๐Ÿ“
  • type โ€” the type of the keypair. ๐Ÿงš
  • user_id โ€” the user_id for a keypair. ๐Ÿ’œ

classmethod existing(connection=None, **kwargs) โ€” create an instance of an existing remote resource. When you create the instance, set the _synchronized parameter of Resource to True to show that it represents the state of an existing server-side resource. That means all attributes passed in **kwargs are considered โ€œcleanโ€ โ€” so an immediate update() call would not generate a body of attributes to be modified on the server. No cap. โœจ

Parameters

  • kwargs (dict) โ€” each of the named arguments will be set as attributes on the resulting Resource object. ๐Ÿ’–

openstack.compute.v2.limits

The Limits Class โœจ

The Limits class inherits from Resource. ๐Ÿฆ‹

class openstack.compute.v2.limits.Limits(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. See new() and existing(). ๐ŸŽ€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐ŸŒธ
  • base_path = '/limits' โ€” the base part of the URI for this resource. โญ
  • resource_key = 'limits' โ€” the singular key name for this resource. ๐Ÿ”ฅ
  • allow_fetch = True โ€” get is allowed for this resource. ๐Ÿซถ
  • absolute โ€” an absolute limits object. ๐Ÿ‘‘
  • rate โ€” rate-limit compute resources. This is only populated when using the legacy v2 API, which was removed in Nova 14.0.0 (Newton). In v2.1 it will always be an empty list. ๐Ÿ’€

fetch(session, requires_id=False, base_path=None, error_message=None, skip_cache=False, **params) โ€” get the Limits resource.

  • Parameters
    • session (Adapter) โ€” the session to use for making this request. ๐ŸŒˆ
  • Returns โ€” a Limits instance. ๐Ÿ“
  • Return type โ€” Limits. ๐Ÿงš

The AbsoluteLimits Class ๐Ÿ’œ

The AbsoluteLimits class inherits from Resource. ๐Ÿฆ‹

class openstack.compute.v2.limits.AbsoluteLimits(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing(). ๐ŸŽ€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐ŸŒธ
  • image_meta โ€” the number of key-value pairs that can be set as image metadata. โœจ
  • personality โ€” the maximum number of personality contents that can be supplied. ๐Ÿ’–
  • personality_size โ€” the maximum size, in bytes, of a personality. ๐ŸŽ€
  • security_group_rules โ€” the maximum amount of security group rules allowed. ๐Ÿฆ‹
  • security_groups โ€” the maximum amount of security groups allowed. ๐ŸŒธ
  • security_groups_used โ€” the amount of security groups currently in use. ๐Ÿซถ
  • server_meta โ€” the number of key-value pairs that can be set as server metadata. ๐Ÿ˜ญ
  • total_cores โ€” the maximum amount of cores. โญ
  • total_cores_used โ€” the amount of cores currently in use. ๐Ÿ”ฅ
  • floating_ips โ€” the maximum amount of floating IPs. ๐Ÿ‘‘
  • floating_ips_used โ€” the amount of floating IPs currently in use. ๐ŸŒˆ
  • instances โ€” the maximum amount of instances. ๐Ÿ“
  • instances_used โ€” the amount of instances currently in use. ๐Ÿงš
  • keypairs โ€” the maximum amount of keypairs. ๐Ÿ’œ
  • total_ram โ€” the maximum RAM size in megabytes. ๐Ÿ’…
  • total_ram_used โ€” the RAM size in megabytes currently in use. โœจ
  • server_groups โ€” the maximum amount of server groups. ๐Ÿ’–
  • server_groups_used โ€” the amount of server groups currently in use. ๐ŸŽ€
  • server_group_members โ€” the maximum number of members in a server group. ๐Ÿฆ‹

The RateLimit Class ๐ŸŒธ

The RateLimit class inherits from Resource. ๐Ÿซถ

class openstack.compute.v2.limits.RateLimit(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing(). ๐ŸŽ€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐ŸŒธ
  • next_available โ€” rate limits next availabe time. ๐Ÿ˜ญ
  • remaining โ€” integer for rate limits remaining. โญ
  • unit โ€” unit of measurement for the value parameter. ๐Ÿ”ฅ
  • value โ€” integer number of requests which can be made. ๐Ÿ‘‘
  • verb โ€” an HTTP verb (POST, PUT, etc.). ๐ŸŒˆ

openstack.compute.v2.migration

The Migration Class ๐Ÿ“

The Migration class inherits from Resource. ๐Ÿงš

class openstack.compute.v2.migration.Migration(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing(). ๐ŸŽ€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐ŸŒธ
  • resources_key = 'migrations' โ€” the plural key name for this resource. ๐Ÿ’œ
  • base_path = '/os-migrations' โ€” the base part of the URI for this resource. โœจ
  • allow_list = True โ€” list is allowed for this resource. ๐Ÿ’–
  • created_at โ€” the date and time when the resource was created. ๐ŸŽ€
  • dest_compute โ€” the target compute of the migration. ๐Ÿฆ‹
  • dest_host โ€” the target host of the migration. ๐ŸŒธ
  • dest_node โ€” the target node of the migration. ๐Ÿซถ
  • migration_type โ€” the type of the migration. One of 'migration', 'resize', 'live-migration' or 'evacuation'. ๐Ÿ˜ญ
  • new_flavor_id โ€” the ID of the old flavor. This value corresponds to the ID of the flavor in the database. This will be the same as new_flavor_id except for resize operations. โญ
  • old_flavor_id โ€” the ID of the old flavor. This value corresponds to the ID of the flavor in the database. ๐Ÿ”ฅ
  • project_id โ€” the ID of the project that initiated the server migration (since microversion 2.80). ๐Ÿ‘‘
  • server_id โ€” the UUID of the server. ๐ŸŒˆ
  • source_compute โ€” the source compute of the migration. ๐Ÿ“
  • source_node โ€” the source node of the migration. ๐Ÿงš
  • status โ€” the current status of the migration. ๐Ÿ’œ
  • updated_at โ€” the date and time when the resource was last updated. ๐Ÿ’…
  • user_id โ€” the ID of the user that initiated the server migration (since microversion 2.80). โœจ
  • uuid โ€” the UUID of the migration (since microversion 2.59). ๐Ÿ’–

openstack.compute.v2.quota_set

The QuotaSet Class ๐ŸŽ€

The QuotaSet class inherits from Resource. ๐Ÿฆ‹

class openstack.compute.v2.quota_set.QuotaSet(_synchronized=False, connection=None, **attrs)

This is the base resource. ๐Ÿ’…

Parameters

  • _synchronized โ€” bestie, this one is not meant to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> for the actual move. ๐Ÿซถ
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. no cap.
  • cores โ€” Properties: the number of allowed server cores for each tenant.
  • fixed_ips โ€” the number of allowed fixed IP addresses for each tenant. Must be equal to or greater than the number of allowed servers.
  • floating_ips โ€” the number of allowed floating IP addresses for each tenant.
  • force โ€” okay this is the pushy one: you can force the update even if the quota has already been used and the reserved quota exceeds the new quota. ๐Ÿ’…
  • injected_file_content_bytes โ€” the number of allowed bytes of content for each injected file.
  • injected_file_path_bytes โ€” the number of allowed bytes for each injected file path.
  • injected_files โ€” the number of allowed injected files for each tenant.
  • instances โ€” the number of allowed servers for each tenant.
  • key_pairs โ€” the number of allowed key pairs for each user.
  • metadata_items โ€” the number of allowed metadata items for each server.
  • networks โ€” the number of private networks that can be created per project.
  • ram โ€” the amount of allowed server RAM, in MiB, for each tenant.
  • security_group_rules โ€” the number of allowed rules for each security group.
  • security_groups โ€” the number of allowed security groups for each tenant.
  • server_groups โ€” the number of allowed server groups for each tenant.
  • server_group_members โ€” the number of allowed members for each server group.

โœจ openstack.compute.v2.server โœจ

๐Ÿ–ฅ๏ธ The Server Class ๐Ÿ–ฅ๏ธ

The Server class inherits from Resource <#openstack.resource.Resource>. It's giving main-character resource energy, honestly.

class openstack.compute.v2.server.Server(_synchronized=False, connection=None, **attrs)

The base resource. Literally the blueprint era.

๐Ÿ’ซ Parameters ๐Ÿ’ซ

  • _synchronized โ€” this is not intended to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to let Resource objects hang out without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Okay and the class is lowkey carrying these:

  • resource_key = 'server' โ€” singular form of key for resource.
  • resources_key = 'servers' โ€” plural form of key for resource.
  • base_path = '/servers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Now the actual data fields this server is serving, no cap:

  • links โ€” a list of dictionaries holding links relevant to this server.
  • addresses โ€” a dictionary of addresses this server can be accessed through. The dictionary contains keys such as private and public, each containing a list of dictionaries for addresses of that type. The addresses are contained in a dictionary with keys addr and version, which is either 4 or 6 depending on the protocol of the IP address. Type: dict
  • admin_password โ€” when a server is first created, it provides the administrator password.
  • attached_volumes โ€” a list of an attached volumes. Each item in the list contains at least an "id" key to identify the specific volumes.
  • availability_zone โ€” the name of the availability zone this server is a part of.
  • block_device_mapping โ€” enables fine grained control of the block device mapping for an instance. This is typically used for booting servers from volumes.
  • config_drive โ€” indicates whether or not a config drive was used for this server.
  • compute_host โ€” the name of the compute host on which this instance is running. Appears in the response for administrative users only.
  • created_at โ€” timestamp of when the server was created.
  • description โ€” the description of the server. Before microversion 2.19 this was set to the server name.
  • disk_config โ€” the disk configuration. Either AUTO or MANUAL.
  • flavor_id โ€” the flavor reference, as a ID or full URL, for the flavor to use for this server.
  • flavor โ€” the flavor property as returned from server.
  • has_config_drive โ€” indicates whether a configuration drive enables metadata injection. Not all cloud providers enable this feature.
  • host_id โ€” an ID representing the host of this server.
  • fault โ€” a fault object. Only available when the server status is ERROR or DELETED and a fault occurred.
  • host โ€” the host to boot the server on.
  • host_status โ€” the host status.
  • hostname โ€” the hostname set on the instance when it is booted. By default, it appears in the response for administrative users only.
  • hypervisor_hostname โ€” the hypervisor host name. Appears in the response for administrative users only.
  • image_id โ€” the image reference, as a ID or full URL, for the image to use for this server.
  • image โ€” the image property as returned from server.
  • instance_name โ€” the instance name. The Compute API generates the instance name from the instance name template. Appears in the response for administrative users only.
  • interface_ip โ€” the address to use to connect to this server from the current calling context. This will be set to public_ipv6 if the calling host has routable ipv6 addresses, and to private_ipv4 if the Connection was created with private=True. Otherwise it will be set to public_ipv4.
  • kernel_id โ€” the UUID of the kernel image when using an AMI. Will be null if not. By default, it appears in the response for administrative users only.
  • key_name โ€” the name of an associated keypair
  • launch_index โ€” when servers are launched via multiple create, this is the sequence in which the servers were launched. By default, it appears in the response for administrative users only.
  • launched_at โ€” the timestamp when the server was launched.
  • locked_reason โ€” the reason the server was locked, if any.
  • max_count โ€” the maximum number of servers to create.
  • min_count โ€” the minimum number of servers to create.
  • networks โ€” a networks object. Required parameter when there are multiple networks defined for the tenant. When you do not specify the networks parameter, the server attaches to the only network created for the current tenant.
  • personality โ€” personality files. This should be a list of dicts with each dict containing a file name ('name') and a base64-encoded file contents ('contents')
  • pinned_availability_zone โ€” the availability zone requested during server creation OR pinned availability zone, which is configured using default_schedule_zone config option.
  • power_state โ€” the power state of this server.
  • progress โ€” while the server is building, this value represents the percentage of completion. Once it is completed, it will be 100. Type: int
  • project_id โ€” the ID of the project this server is associated with.
  • private_v4 โ€” the private IPv4 address of this server
  • private_v6 โ€” the private IPv6 address of this server
  • public_v4 โ€” the public IPv4 address of this server
  • public_v6 โ€” the public IPv6 address of this server
  • ramdisk_id โ€” the UUID of the ramdisk image when using an AMI. Will be null if not. By default, it appears in the response for administrative users only.
  • reservation_id โ€” the reservation id for the server. This is an id that can be useful in tracking groups of servers created with multiple create, that will all have the same reservation_id. By default, it appears in the response for administrative users only.
  • root_device_name โ€” the root device name for the instance. By default, it appears in the response for administrative users only.
  • scheduler_hints โ€” the dictionary of data to send to the scheduler.
  • security_groups โ€” a list of applicable security groups. Each group contains keys for description, name, id, and rules.
  • server_groups โ€” the UUIDs of the server groups to which the server belongs. Currently this can contain at most one entry.
  • status โ€” what state your server is in rn. Valid values are: ACTIVE, BUILDING, DELETED, ERROR, HARD_REBOOT, PASSWORD, PAUSED, REBOOT, REBUILD, RESCUED, RESIZED, REVERT_RESIZE, SHUTOFF, SOFT_DELETED, STOPPED, SUSPENDED, UNKNOWN, or VERIFY_RESIZE. yes all of those, it's a whole mood board ๐Ÿ˜ญ
  • task_state โ€” the task state of this server.
  • terminated_at โ€” the timestamp of when the server was terminated (if it has been, rip ๐Ÿชฆ).
  • trusted_image_certificates โ€” a list of trusted certificate IDs that were used during image signature verification to verify the signing certificate. cute little chain of trust ๐Ÿ’–
  • updated_at โ€” timestamp of when this server was last updated.
  • user_data โ€” configuration info or scripts to use upon launch. must be Base64 encoded, no cap, that's the rule.
  • user_id โ€” the ID of the owners of this server.
  • vm_state โ€” the VM state of this server.

change_password(session, password, *, microversion=None)

Change the administrator password to whatever password you pass in. glow-up for the admin account ๐Ÿ”‘

Parameters

  • session โ€” the session to use for making this request.
  • password โ€” the new password.

Returns None


get_password(session, *, microversion=None)

Get the encrypted administrator password.

Parameters

  • session โ€” the session to use for making this request.

Returns The encrypted administrator password.


clear_password(session, *, microversion=None)

Clear the administrator password.

Lowkey important nuance: this removes the password from the database. It does not actually change the server password. Like, it's giving "deleted the receipt but the subscription is still active" ๐Ÿ’€

Parameters

  • session โ€” the session to use for making this request.

Returns None


reboot(session, reboot_type)

Reboot the server, where reboot_type might be 'SOFT' or 'HARD'. choose your fighter โœจ

Parameters

  • session โ€” the session to use for making this request.
  • reboot_type โ€” the type of reboot. One of: SOFT, HARD.

Returns None


force_delete(session)

Force delete the server. no soft launch, we're just gone ๐Ÿซถ

Parameters

  • session โ€” the session to use for making this request.

Returns None


rebuild(session, image, name=Unset.UNSET, admin_password=Unset.UNSET, preserve_ephemeral=Unset.UNSET, access_ipv4=Unset.UNSET, access_ipv6=Unset.UNSET, metadata=Unset.UNSET, user_data=Unset.UNSET, key_name=Unset.UNSET, description=Unset.UNSET, trusted_image_certificates=Unset.UNSET, hostname=Unset.UNSET)

Rebuild the server with the given arguments. full main-character transformation arc ๐Ÿฆ‹

Parameters

  • session โ€” the session to use for making this request.
  • image โ€” the image to rebuild to. Either an ID or a Image <#openstack.image.v2.image.Image> instance.
  • name โ€” a name to set on the rebuilt server. (Optional)
  • admin_password โ€” an admin password to set on the rebuilt server. (Optional)
  • preserve_ephemeral โ€” whether to preserve the ephemeral drive during the rebuild. (Optional)
  • access_ipv4 โ€” an IPv4 address that will be used to access the rebuilt server. (Optional)
  • access_ipv6 โ€” an IPv6 address that will be used to access the rebuilt server. (Optional)
  • metadata โ€” metadata to set on the updated server. (Optional)
  • user_data โ€” user data to set on the updated server. (Optional)
  • key_name โ€” a key name to set on the updated server. (Optional)
  • description โ€” the description to set on the updated server. (Optional) (requires API microversion 2.19)
  • trusted_image_certificates โ€” the trusted image certificates to set on the updated server. (Optional) (requires API microversion 2.78)
  • hostname โ€” the hostname to set on the updated server. (Optional) (requires API microversion 2.90)

Returns The updated server.


resize(session, flavor)

Resize the server to a flavor reference. it's giving "new year new me" but for compute ๐Ÿงš

Parameters

  • session โ€” the session to use for making this request.
  • flavor โ€” the server to resize to.

Returns None


confirm_resize(session)

Confirm the resize of the server. committing to the bit โœจ

Parameters

  • session โ€” the session to use for making this request.

Returns None


revert_resize(session)

Revert the resize of the server. actually no, take me back ๐Ÿ˜ญ

Parameters

  • session โ€” the session to use for making this request.

Returns None


create_image(session, name, metadata=None)

Create an image from the server. snapshot slay ๐Ÿ“ธ

Parameters

  • session โ€” the session to use for making this request.
  • name โ€” the name to use for the created image.
  • metadata โ€” metadata to set on the created image. (Optional)

Returns image uuid


add_security_group(session, security_group_name)

Add a security group to the server.

Parameters

  • session โ€” the session to use for making this request.
  • security_group_name โ€” the security group to add to the server.

Returns None


remove_security_group(session, security_group_name)

Remove a security group from the server.

Parameters

  • session โ€” the session to use for making this request.
  • security_group_name โ€” the security group to remove from the server.

Returns None


reset_state(session, state)

Reset the server state.

Heads up bestie: this is admin-only by default. don't try it on a regular account, it's not gonna go how you think ๐Ÿ’€

Parameters

  • session โ€” the session to use for making this request.
  • state โ€” the state to set on the server.

Returns None


add_fixed_ip(session, network_id)

Add a fixed IP to the server.

This is effectively an alias for adding a network.

Parameters

  • session โ€” the session to use for making this request.
  • network_id โ€” the network to connect the server to.

Returns None


remove_fixed_ip(session, address)

Remove a fixed IP from the server.

This is effectively an alias for removing a port from the server.

Parameters

  • session โ€” the session to use for making this request.
  • network_id โ€” the address to remove from the server.

Returns None

ok so yes, the parameter in the docs is called network_id even though the signature says address โ€” that's literally how it's written, we don't make the rules, we just report them ๐Ÿ™ˆ

add_floating_ip(session, address, fixed_address=None)

Add a floating IP to the server.

Parameters

  • session โ€” the session to use for making this request.
  • address โ€” the floating IP address to associate with the server.
  • fixed_address โ€” a fixed IP address with which to associated the floating IP. (Optional)

Returns None


remove_floating_ip(session, address)

Remove a floating IP from the server.

Parameters

  • session โ€” the session to use for making this request.
  • address โ€” the floating IP address to disassociate from the server.

Returns None


backup(session, name, backup_type, rotation)

Create a backup of the server. be responsible, bestie ๐ŸŽ€

Parameters

  • session โ€” the session to use for making this request.
  • name โ€” the name to use for the backup image.
  • backup_type โ€” the type of backup. the value and meaning of this atribute is user-defined and can be used to separate backups of different types. for example, this could be used to distinguish between daily and weekly backups.
  • rotation โ€” the number of backups to retain. all images older than the rotation'th image will be deleted. yes, deleted deleted ๐Ÿ”ฅ

Returns image uuid


pause(session)

Pause the server. brb, frozen in time โธ๏ธ

Parameters

  • session โ€” the session to use for making this request.

Returns: None

๐ŸŒธ unpause(session) ๐ŸŒธ

Unpause the server. Like waking it back up, bestie.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿฆ‹ suspend(session) ๐Ÿฆ‹

Suspend the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

โœจ resume(session) โœจ

Resume the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿ’… lock(session, locked_reason=None) ๐Ÿ’…

Lock the server.

Parameters:

  • session โ€” the session to use for making this request.
  • locked_reason โ€” the reason for locking the server.

Returns: None

๐Ÿ” unlock(session) ๐Ÿ”

Unlock the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿš‘ rescue(session, admin_pass=None, image=None) ๐Ÿš‘

Rescue the server.

This is admin-only by default. ๐Ÿ‘‘

Parameters:

  • session โ€” the session to use for making this request.
  • admin_pass โ€” a new admin password to set on the rescued server. (Optional)
  • image โ€” the image to use when rescuing the server. If not provided, the server will use the existing image. (Optional)

Returns: None

๐Ÿฉน unrescue(session) ๐Ÿฉน

Unrescue the server.

This is admin-only by default. ๐Ÿ‘‘

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿšจ evacuate(session, host=None, admin_pass=None, force=None, on_shared_storage=None) ๐Ÿšจ

Evacuate the server.

Parameters:

  • session โ€” the session to use for making this request.
  • host โ€” the host to evacuate the instance to. (Optional)
  • admin_pass โ€” the admin password to set on the evacuated instance. (Optional)
  • force โ€” whether to force evacuation.
  • on_shared_storage โ€” whether the host is using shared storage. (Optional) (Only supported before microversion 2.14)

Returns: None

๐ŸŸข start(session) ๐ŸŸข

Start the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿ”ด stop(session) ๐Ÿ”ด

Stop the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐ŸŽ€ restore(session) ๐ŸŽ€

Restore the server.

This is only supported if the server is soft-deleted. This is cloud-specific.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿ“ฆ shelve(session) ๐Ÿ“ฆ

Shelve the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐ŸงŠ shelve_offload(session) ๐ŸงŠ

Shelve-offload the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐ŸŒค๏ธ unshelve(session, availability_zone=Unset.UNSET, host=None) ๐ŸŒค๏ธ

Unshelve the server.

Parameters:

  • session โ€” the session to use for making this request.
  • availability_zone โ€” if specified the instance will be unshelved to the availability_zone. If None is passed the instance defined availability_zone is unpin and the instance will be scheduled to any availability_zone (free scheduling). If not specified the instance will be unshelved to either its defined availability_zone or any availability_zone (free scheduling).
  • host โ€” if specified the host to unshelve the instance.

๐Ÿ›ซ migrate(session, *, host=None) ๐Ÿ›ซ

Migrate the server.

Parameters:

  • session โ€” the session to use for making this request.
  • host โ€” the host to migrate the server to. (Optional)

Returns: None

๐Ÿ’ฅ trigger_crash_dump(session) ๐Ÿ’ฅ

Trigger a crash dump for the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿ–ฅ๏ธ get_console_output(session, length=None) ๐Ÿ–ฅ๏ธ

Get console output for the server.

Parameters:

  • session โ€” the session to use for making this request.
  • length โ€” the max length of the console output to return. (Optional)

Returns: the console output.

๐ŸŒˆ get_console_url(session, console_type) ๐ŸŒˆ

Get the console URL for the server.

Parameters:

  • session โ€” the session to use for making this request.
  • console_type โ€” the type of console to return. This is cloud-specific. One of: novnc, xvpvnc, spice-html5, spice-direct (after Nova microversion 2.99), rdp-html5, or serial.

Returns: the console URL.

๐Ÿ›ฐ๏ธ live_migrate(session, host, force, block_migration, disk_over_commit=False) ๐Ÿ›ฐ๏ธ

Live migrate the server.

Parameters:

  • session โ€” the session to use for making this request.
  • host โ€” the host to live migrate the server to. (Optional)
  • force โ€” whether to force the migration. (Optional)
  • block_migration โ€” whether to do block migration. One of: True, False, 'auto'. (Optional)
  • disk_over_commit โ€” whether to allow disk over-commit on the destination host. (Optional)

Returns: None

๐Ÿ•ธ๏ธ fetch_topology(session) ๐Ÿ•ธ๏ธ

Fetch the topology information for the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: None

๐Ÿ›ก๏ธ fetch_security_groups(session) ๐Ÿ›ก๏ธ

Fetch security groups of the server.

Parameters:

  • session โ€” the session to use for making this request.

Returns: updated Server instance.


๐Ÿฆ‹ openstack.compute.v2.server_action ๐Ÿฆ‹

๐Ÿ’– The ServerAction Class ๐Ÿ’–

The ServerAction class inherits from Resource.

class openstack.compute.v2.server_action.ServerAction(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'instanceAction' โ€” singular form of key for resource.
  • resources_key = 'instanceActions' โ€” plural form of key for resource.
  • base_path = '/servers/%(server_id)s/os-instance-actions' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • server_id โ€” the ID of the server that this action relates to.
  • action โ€” the name of the action.
  • request_id โ€” the ID of the request that this action related to.
  • user_id โ€” the ID of the user which initiated the server action.
  • project_id โ€” the ID of the project that this server belongs to.
  • message โ€” the related error message for when an action fails.
  • events โ€” events.

๐Ÿงš The ServerActionEvent Class ๐Ÿงš

The ServerActionEvent class inherits from Resource.

class openstack.compute.v2.server_action.ServerActionEvent(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters:

  • _synchronized โ€” nope, don't touch this one directly bestie, it's not for you ๐Ÿ˜Œ. See new() and existing() instead.
  • connection โ€” the reference to the Connection being used. Defaults to None so Resource objects can vibe on their own without an active Connection (unit tests, looking at you ๐Ÿ’…). Any self._connection usage in Resource code better protect itself with a None check, fr fr.

event โ€” the name of the event โœจ

start_time โ€” the date and time when the event was started. The date and time stamp format is ISO 8601 ๐Ÿ•

finish_time โ€” the date and time when the event finished. The date and time stamp format is ISO 8601 ๐Ÿ•

result โ€” the result of the event

traceback โ€” the traceback stack if an error occurred in this event ๐Ÿ˜ญ. This is only visible to cloud admins by default.

host โ€” the name of the host on which the event occurred. This is only visible to cloud admins by default.

host_id โ€” an obfuscated hashed host ID string, or the empty string if there's no host for the event. It's a hashed value so it will not actually look like a hostname, and it's hashed with data from the project_id โ€” so the same physical host seen by two different project_ids will come out different ๐Ÿ‘€. Super useful when, within the same project, you need to figure out whether two events happened on the same physical host or on different ones.

details โ€” details of the event. May be unset.


๐ŸŒธ openstack.compute.v2.server_diagnostics

The ServerDiagnostics Class

The ServerDiagnostics class inherits from Resource <#openstack.resource.Resource>, bestie ๐Ÿซถ

class openstack.compute.v2.server_diagnostics.ServerDiagnostics(_synchronized=False, connection=None, **attrs)
The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'diagnostics' โ€” singular form of key for resource.

base_path = '/servers/%(server_id)s/diagnostics' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” allow get operation for this resource.

requires_id = False โ€” do calls for this resource require an ID.

has_config_drive โ€” indicates whether or not a config drive was used for this server.

state โ€” the current state of the VM.

driver โ€” the driver on which the VM is running.

hypervisor โ€” the hypervisor on which the VM is running.

hypervisor_os โ€” the hypervisor OS.

uptime โ€” the amount of time in seconds that the VM has been running.

num_cpus โ€” the number of vCPUs.

num_disks โ€” the number of disks.

num_nics โ€” the number of vNICs.

memory_details โ€” the dictionary with information about VM memory usage.

cpu_details โ€” the list of dictionaries with detailed information about VM CPUs.

disk_details โ€” the list of dictionaries with detailed information about VM disks.

nic_details โ€” the list of dictionaries with detailed information about VM NICs.

server_id โ€” the ID for the server ๐Ÿ–ฅ๏ธ


๐Ÿฆ‹ openstack.compute.v2.server_external_event

The ServerExternalEvent Class

The ServerExternalEvent class inherits from Resource <#openstack.resource.Resource> ๐Ÿ’œ

class openstack.compute.v2.server_external_event.ServerExternalEvent(_synchronized=False, connection=None, **attrs)
The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>`.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = None โ€” singular form of key for resource.

resources_key = 'events' โ€” plural form of key for resource.

base_path = '/os-server-external-events' โ€” the base part of the URI for this resource.

requires_id = False โ€” do calls for this resource require an ID.

create_opts โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create():

CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=False, response_has_body=True)

allow_create = True โ€” allow create operation for this resource.

allow_fetch = False โ€” allow get operation for this resource.

allow_delete = False โ€” allow delete operation for this resource.

allow_list = False โ€” allow list operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

name โ€” the name of this event โœจ

code โ€” the result code (set in the response)


๐ŸŽ€ openstack.compute.v2.server_group

The ServerGroup Class

The ServerGroup class inherits from Resource <#openstack.resource.Resource> ๐ŸŒธ

class openstack.compute.v2.server_group.ServerGroup(_synchronized=False, connection=None, **attrs)
The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>`.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'server_group' โ€” singular form of key for resource.

resources_key = 'server_groups' โ€” plural form of key for resource.

base_path = '/os-server-groups' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

name โ€” a name identifying the server group ๐Ÿท๏ธ

policies โ€” the list of policies supported by the server group (till 2.63)

policy โ€” the policy field represents the name of the policy (from 2.64)

member_ids โ€” the list of members in the server group ๐Ÿ‘ฏ

metadata โ€” the metadata associated with the server group. This is always empty and only used for preserving compatibility. (so yeah, it's giving decorative ๐Ÿ’€)

project_id โ€” the project ID who owns the server group.

rules โ€” the rules field, which is a dict, can be applied to the policy. Currently, only the max_server_per_host rule is supported for the anti-affinity policy. The max_server_per_host rule allows specifying how many members of the anti-affinity group can reside on the same compute host. If not specified, only one member from the same anti-affinity group can reside on a given host.

user_id โ€” the user ID who owns the server group


๐Ÿ’… openstack.compute.v2.server_interface

The ServerInterface Class

The ServerInterface class inherits from Resource <#openstack.resource.Resource> ๐Ÿฆ‹

class openstack.compute.v2.server_interface.ServerInterface(_synchronized=False, connection=None, **attrs)
The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>`.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'interfaceAttachment' โ€” singular form of key for resource.

resources_key = 'interfaceAttachments' โ€” plural form of key for resource.

base_path = '/servers/%(server_id)s/os-interface' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

fixed_ips โ€” fixed IP addresses with subnet IDs.

mac_addr โ€” the MAC address.

net_id โ€” the network ID ๐ŸŒ

  • port_id โ€” the ID of the port you're making an interface for, bestie ๐Ÿ’–
  • port_state โ€” the port state. that's the whole vibe.
  • server_id โ€” the ID for the server ๐Ÿ‘‘
  • tag โ€” tags for the virtual interfaces ๐Ÿท๏ธ

๐ŸŒˆ openstack.compute.v2.server_ip ๐ŸŒˆ

The ServerIP Class โœจ

okay so the ServerIP class inherits from Resource <#openstack.resource.Resource> โ€” it's giving "chip off the old block," iconic behavior ๐Ÿ’…

class openstack.compute.v2.server_ip.ServerIP(_synchronized=False,
connection=None, **attrs)
the base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” ngl this is not meant to be used directly, bestie. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead ๐Ÿ’€
  • connection โ€” a reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, like in unit tests. and like, if you're using self._connection inside Resource code, protect yourself with a check for None โ€” periodt ๐Ÿ™ˆ
  • resources_key = 'addresses' โ€” the plural form of the key for the resource ๐ŸŽ€
  • base_path = '/servers/%(server_id)s/ips' โ€” the base part of the URI for this resource ๐ŸŒธ
  • allow_list = True โ€” allow the list operation for this resource, slay โœจ
  • address โ€” the IP address. the format of the address depends on version ๐Ÿ‘€
  • network_label โ€” the network label, like public or private ๐Ÿฆ‹
  • server_id โ€” the ID for the server ๐Ÿ‘‘
classmethod list(session, paginated=False, base_path=None,
allow_unknown_params=False, *, microversion=None, headers=None,
max_items=None, server_id=None, network_label=None, **params)

this method is a generator which yields resource objects ๐Ÿ”ฅ this resource object list generator handles pagination and takes query params for response filtering. lowkey does it all.

Parameters

  • session โ€” the session to use for making this request ๐Ÿ’œ
  • paginated โ€” True if a GET to this resource returns a paginated series of responses, or False if a GET returns only one page of data. when paginated is False, only one page of data gets returned regardless of the API's support of pagination ๐Ÿ“„
  • base_path โ€” the base part of the URI for listing resources, if it's different from base_path <#openstack.resource.Resource.base_path> ๐Ÿ›ค๏ธ
  • allow_unknown_params โ€” True to accept, but discard, unknown query parameters. this lets you get a list of 'filters' and pass everything known to the server. False will result in a validation exception when unknown query parameters are passed โš ๏ธ
  • microversion โ€” the API version to override the negotiated one ๐Ÿ”„
  • headers โ€” additional headers to inject into the HTTP request ๐Ÿ“ฌ
  • max_items โ€” the maximum number of items to return. typically this must be used with paginated=True ๐Ÿ“
  • params โ€” these keyword arguments get passed through the _transpose() method to find if any of them match expected query parameters to be sent in the params argument to get(). they're additionally checked against the base_path <#openstack.resource.Resource.base_path> format string to see if any path fragments need to be filled in by the contents of this argument. parameters supported as filters by the server side are passed in the API call, and the remaining parameters are applied as filters to the retrieved results ๐Ÿงš

Returns โ€” a generator of Resource objects ๐Ÿ’ซ

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_list is not set to True ๐Ÿ˜ญ

Raises InvalidResourceQuery <#openstack.exceptions.InvalidResourceQuery> if the query contains invalid params ๐Ÿšจ


๐Ÿ’… openstack.compute.v2.server_migration ๐Ÿ’…

The ServerMigration Class ๐Ÿ’€

the ServerMigration class inherits from Resource <#openstack.resource.Resource> โ€” main character energy fr fr ๐Ÿ‘‘

class
openstack.compute.v2.server_migration.ServerMigration(_synchronized=False,
connection=None, **attrs)
the base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” a reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’œ
  • resource_key = 'migration' โ€” the singular form of the key for the resource ๐ŸŽ€
  • resources_key = 'migrations' โ€” the plural form of the key for the resource โœจ
  • base_path = '/servers/%(server_id)s/migrations' โ€” the base part of the URI for this resource ๐Ÿ›ค๏ธ
  • allow_fetch = True โ€” allow the get operation for this resource ๐Ÿ‘€
  • allow_list = True โ€” allow the list operation for this resource ๐Ÿ“‹
  • allow_delete = True โ€” allow the delete operation for this resource ๐Ÿ—‘๏ธ
  • server_id โ€” the ID for the server, from the URI of the resource ๐Ÿ”—
  • created_at โ€” the date and time when the resource was created โฐ
  • dest_host โ€” the target host of the migration ๐Ÿ–ฅ๏ธ
  • dest_compute โ€” the target compute of the migration โš™๏ธ
  • dest_node โ€” the target node of the migration ๐Ÿ“
  • disk_processed_bytes โ€” the amount of disk, in bytes, that has been processed during the migration ๐Ÿ’พ
  • disk_remaining_bytes โ€” the amount of disk, in bytes, that still needs to be migrated ๐Ÿ’พ
  • disk_total_bytes โ€” the total amount of disk, in bytes, that needs to be migrated ๐Ÿ’พ
  • memory_processed_bytes โ€” the amount of memory, in bytes, that has been processed during the migration ๐Ÿง 
  • memory_remaining_bytes โ€” the amount of memory, in bytes, that still needs to be migrated ๐Ÿง 
  • memory_total_bytes โ€” the total amount of memory, in bytes, that needs to be migrated ๐Ÿง 
  • project_id โ€” the ID of the project that initiated the server migration (since microversion 2.80) ๐Ÿท๏ธ
  • server_uuid โ€” the UUID of the server, from the response body ๐Ÿ”–
  • source_compute โ€” the source compute of the migration โš™๏ธ
  • source_node โ€” the source node of the migration ๐Ÿ“
  • status โ€” the current status of the migration ๐Ÿ“Š
  • updated_at โ€” the date and time when the resource was last updated โฐ
  • user_id โ€” the ID of the user that initiated the server migration (since microversion 2.80) ๐Ÿ™‹
  • uuid โ€” the UUID of the migration (since microversion 2.59) ๐Ÿ”–
  • force_complete(session) โ€” force an on-going live migration to complete ๐Ÿ

๐Ÿฆ‹ openstack.compute.v2.server_remote_console ๐Ÿฆ‹

The ServerRemoteConsole Class โœจ

the ServerRemoteConsole class inherits from Resource <#openstack.resource.Resource> โ€” we love a console glow-up ๐Ÿ’…

class
openstack.compute.v2.server_remote_console.ServerRemoteConsole(_synchronized=False,
connection=None, **attrs)
the base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ˜Œ
  • connection โ€” a reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ
  • resource_key = 'remote_console' โ€” the singular form of the key for the resource ๐ŸŽ€
  • base_path = '/servers/%(server_id)s/remote-consoles' โ€” the base part of the URI for this resource ๐Ÿ›ค๏ธ
  • allow_create = True โ€” allow the create operation for this resource โœ…
  • allow_fetch = False โ€” allow the get operation for this resource โŒ
  • allow_commit = False โ€” allow the update operation for this resource โŒ
  • allow_delete = False โ€” allow the delete operation for this resource โŒ
  • allow_list = False โ€” allow the list operation for this resource โŒ
  • protocol โ€” protocol of the remote console ๐Ÿ”Œ
  • type โ€” type of the remote console ๐Ÿท๏ธ
  • url โ€” URL used to connect to the console ๐Ÿ”—
  • server_id โ€” the ID for the server ๐Ÿ‘‘

๐ŸŒธ openstack.compute.v2.service ๐ŸŒธ

The Service Class ๐ŸŽ€

the Service class inherits from Resource <#openstack.resource.Resource> โ€” serving looks, literally ๐Ÿ’โ€โ™€๏ธ

class openstack.compute.v2.service.Service(_synchronized=False,
connection=None, **attrs)
the base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” nope, not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” a reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’œ

okay so, we're jumping back into the Service attribute list mid-glow-upโ€”no recap, just vibes and facts:

  • resource_key = 'service' โ€” singular form of the key for this resource. ๐ŸŽ€
  • resources_key = 'services' โ€” plural form of the key for this resource. โœจ
  • base_path = '/os-services' โ€” the base part of the URI for this resource. ๐Ÿ’…
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ‘‘
  • allow_commit = True โ€” allow update operation for this resource. ๐Ÿ”ฅ
  • allow_delete = True โ€” allow delete operation for this resource. ๐Ÿ’€
  • availability_zone โ€” the availability zone of service. ๐ŸŒธ
  • binary โ€” binary name of service. ๐Ÿงš
  • disabled_reason โ€” disabled reason of service. ๐Ÿ™ˆ
  • is_forced_down โ€” whether or not this service was forced down manually by an administrator after the service was fenced. ๐Ÿซถ
  • host โ€” the name of the host where service runs. ๐Ÿ’œ
  • name โ€” service name. โญ
  • state โ€” state of service. ๐ŸŒˆ
  • status โ€” status of service. ๐Ÿฆ‹
  • updated_at โ€” the date and time when the resource was updated. ๐ŸŽ€

๐Ÿ”Ž classmethod find

classmethod find(session, name_or_id, ignore_missing=True,
                 list_base_path=None, *, microversion=None, all_projects=None,
                 **params)

Finds a resource by its name or id. It's giving search-bar main character energy, no cap.

๐Ÿงพ Parameters

  • session โ€” the session to use for making this request.
  • name_or_id โ€” this resource's identifier, if needed by the request. The default is None.
  • ignore_missing โ€” when set to False, openstack.exceptions.NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • list_base_path โ€” the base_path to use when you need to list resources.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” any additional parameters to be passed into underlying methods, such as to existing() (openstack.resource.Resource.existing) in order to pass on URI parameters.

Returns โ€” the Resource object matching the given name or id, or None if nothing matches.

Raises openstack.exceptions.DuplicateResource if more than one resource is found for this request.

Raises openstack.exceptions.NotFoundException if nothing is found and ignore_missing is False.

๐Ÿ’พ commit(session, prepend_key=False, *args, **kwargs)

commit(session, prepend_key=False, *args, **kwargs)

Commits the state of the instance to the remote resource. Iconic commit behavior, fr fr.

๐Ÿงพ Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” whether the resource_key (openstack.resource.Resource.resource_key) should be prepended in a resource creation request. Default to True. (Yes, the signature says prepend_key=False and this blurb says โ€œDefault to Trueโ€โ€”both are straight from the source, bestie. ๐Ÿซถ)
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.
  • base_path โ€” base part of the URI for modifying resources, if different from base_path (openstack.resource.Resource.base_path).
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns โ€” this Resource instance.

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_commit is not set to True.

Here are the service action methodsโ€”same session energy, different jobs:

  • set_forced_down(session, host=None, binary=None, forced=False) โ€” updates forced_down information of a service.
  • force_down(session, host=None, binary=None, forced=False) โ€” updates forced_down information of a service.
  • enable(session, host, binary) โ€” enables service.
  • disable(session, host, binary, reason=None) โ€” disables service.

๐ŸŒธ openstack.compute.v2.usage ๐ŸŒธ

๐Ÿ’– The Usage Class ๐Ÿ’–

The Usage class inherits from Resource.

class openstack.compute.v2.usage.Usage(_synchronized=False,
                                       connection=None, **attrs)

The base resource. Lowkey the blueprint for everything, periodt.

๐Ÿงพ Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'tenant_usage' โ€” singular form of the key for this resource. ๐ŸŽ€
  • resources_key = 'tenant_usages' โ€” plural form of the key for this resource. โœจ
  • base_path = '/os-simple-tenant-usage' โ€” the base part of the URI for this resource. ๐Ÿ’…
  • allow_create = False โ€” allow create operation for this resource. ๐Ÿ™ˆ
  • allow_fetch = True โ€” allow get operation for this resource. ๐Ÿ”ฅ
  • allow_delete = False โ€” allow delete operation for this resource. ๐Ÿ’€
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ‘‘
  • allow_commit = False โ€” allow update operation for this resource. ๐Ÿซถ
  • project_id โ€” the UUID of the project in a multi-tenancy cloud. ๐ŸŒˆ
  • server_usages โ€” a list of the server usage objects. ๐Ÿฆ‹
  • total_local_gb_usage โ€” multiplying the server disk size (in GiB) by hours the server exists, and then adding that all together for each server. ๐Ÿงš
  • total_vcpus_usage โ€” multiplying the number of virtual CPUs of the server by hours the server exists, and then adding that all together for each server. โญ
  • total_memory_mb_usage โ€” multiplying the server memory size (in MiB) by hours the server exists, and then adding that all together for each server. ๐Ÿ’œ
  • total_hours โ€” the total duration that servers exist (in hours). ๐ŸŽ€
  • start โ€” the beginning time to calculate usage statistics on compute and storage resources. ๐ŸŒธ
  • stop โ€” the ending time to calculate usage statistics on compute and storage resources. โœจ

๐Ÿงš The ServerUsage Class ๐Ÿงš

The ServerUsage class inherits from Resource.

class openstack.compute.v2.usage.ServerUsage(_synchronized=False,
                                             connection=None, **attrs)

The base resource. Same template tea, different resource vibes.

๐Ÿงพ Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = None โ€” singular form of the key for this resource. ๐ŸŽ€
  • resources_key = None โ€” plural form of the key for this resource. โœจ
  • allow_create = False โ€” allow create operation for this resource. ๐Ÿ™ˆ
  • allow_fetch = False โ€” allow get operation for this resource. ๐Ÿ’€
  • allow_delete = False โ€” allow delete operation for this resource. ๐Ÿ’€
  • allow_list = False โ€” allow list operation for this resource. ๐Ÿซถ
  • allow_commit = False โ€” allow update operation for this resource. ๐Ÿฆ‹
  • hours โ€” the duration that the server exists (in hours). โญ
  • flavor โ€” the display name of a flavor. ๐ŸŒˆ
  • instance_id โ€” the UUID of the server. ๐Ÿ’œ
  • name โ€” the server name. ๐ŸŽ€
  • project_id โ€” the UUID of the project in a multi-tenancy cloud. ๐ŸŒธ
  • memory_mb โ€” the memory size of the server (in MiB). ๐Ÿงš
  • local_gb โ€” the sum of the root disk size of the server and the ephemeral disk size of it (in GiB). โœจ
  • vcpus โ€” the number of virtual CPUs that the server uses. ๐Ÿ”ฅ
  • started_at โ€” the date and time when the server was launched. ๐Ÿ‘‘
  • ended_at โ€” the date and time when the server was deleted. ๐Ÿ’…
  • state โ€” the VM state. ๐ŸŒˆ
  • uptime โ€” the uptime of the server. ๐Ÿฆ‹

๐Ÿฆ‹ openstack.compute.v2.volume_attachment ๐Ÿฆ‹

๐Ÿ’œ The VolumeAttachment Class ๐Ÿ’œ

The VolumeAttachment class inherits from Resource.

class
openstack.compute.v2.volume_attachment.VolumeAttachment(_synchronized=False,
                                                        connection=None, **attrs)

The base resource. Attachment era, but make it resourceful.

๐Ÿงพ Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'volumeAttachment' โ€” singular form of the key for this resource. ๐ŸŽ€
  • resources_key = 'volumeAttachments' โ€” plural form of the key for this resource. โœจ
  • base_path = '/servers/%(server_id)s/os-volume_attachments' โ€” the base chunk of the URI for this resource, bestie. It's the address bar starter pack โœจ
  • allow_create = True โ€” yup, you can create this one ๐Ÿซถ
  • allow_fetch = True โ€” and get it too, lowkey essential ๐Ÿ’…
  • allow_commit = True โ€” updates are allowed, slay ๐Ÿ’–
  • allow_delete = True โ€” and yes, you can delete it, no cap
  • allow_list = True โ€” listing is on the menu too ๐ŸŒธ
  • server_id โ€” the ID for the server, obviously ๐Ÿ’€
  • device โ€” name of the device, like ,/dev/vdb. That's literally what the original says, comma and all โ€” keeping it exactly as-is ๐ŸŽ€
  • id โ€” the ID of the attachment, iconic identifier behavior ๐Ÿ‘‘
  • volume_id โ€” the ID of the attached volume ๐Ÿ’œ
  • attachment_id โ€” the UUID of the associated volume attachment in Cinder. That's the Cinder one, not the other one, iykyk ๐Ÿฆ‹
  • bdm_id โ€” the ID of the block device mapping record for the attachment โญ
  • tag โ€” virtual device tags for the attachment ๐ŸŽ€
  • delete_on_termination โ€” says whether to delete the volume when the server gets destroyed. Big consequences energy ๐Ÿ˜ญ

openstack.compute.version

The Version Class โœจ

So the Version class inherits from Resource <#openstack.resource.Resource>, bestie. Family tree moment ๐ŸŒˆ

class openstack.compute.version.Version(_synchronized=False, connection=None, **attrs)

The base resource โ€” that's the whole vibe ๐Ÿซถ

Parameters

  • _synchronized โ€” okay so this one is not intended to be used directly, periodt. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead ๐Ÿ’…
  • connection โ€” reference to the Connection being used. It defaults to None so that Resource objects can be used without an active Connection, like in unit tests. And if you're using self._connection inside Resource code, you gotta protect yourself with a check for None ๐Ÿ”ฅ
  • resource_key = 'version' โ€” the singular form of the key for the resource ๐ŸŽ€
  • resources_key = 'versions' โ€” and the plural form, the more the merrier โœจ
  • base_path = '/' โ€” the base part of the URI for this resource. Just a slash. Minimalist icon ๐Ÿ’…
  • allow_list = True โ€” listing allowed, we love to see it ๐ŸŒธ

Container Infrastructure Management Resources

It's giving whole new continent of resources, bestie ๐Ÿฆ‹

openstack.container_infrastructure_management.v1.cluster

The Cluster Class ๐Ÿ‘‘

The Cluster class inherits from Resource <#openstack.resource.Resource> too. Nepo baby but make it API ๐Ÿ˜ญ

class openstack.container_infrastructure_management.v1.cluster.Cluster(_synchronized=False, connection=None, **attrs)

The base resource โ€” same as before, the foundation of it all ๐Ÿ’–

Parameters

  • _synchronized โ€” again, not intended to be used directly, don't do it ๐Ÿซถ See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used, defaults to None so Resource objects work without an active Connection, like in unit tests. And use of self._connection in Resource code should protect itself with a check for None, fr fr ๐Ÿ’…
  • resources_key = 'clusters' โ€” plural form of key for resource ๐ŸŒˆ
  • base_path = '/clusters' โ€” the base part of the URI for this resource โญ
  • allow_create = True โ€” can create โœจ
  • allow_fetch = True โ€” can get ๐ŸŽ€
  • allow_commit = True โ€” can update ๐Ÿ’œ
  • allow_delete = True โ€” can delete ๐Ÿฆ‹
  • allow_list = True โ€” can list ๐ŸŒธ
  • allow_patch = True โ€” and can patch, fancy ๐Ÿ’…
  • commit_method = 'PATCH' โ€” the method for committing a resource. This must be PATCH if allow_patch is True. That's a hard requirement, not a suggestion, no cap ๐Ÿ”ฅ
  • api_address โ€” the endpoint URL of the COE API exposed to end-users ๐Ÿ‘‘
  • cluster_template_id โ€” the UUID of the cluster template ๐ŸŽ€
  • coe_version โ€” version info of the chosen COE in the bay/cluster, which helps the client pick the right version of the client. Helpful king behavior โญ
  • create_timeout โ€” the timeout for cluster creation in minutes. The value expected is a positive integer. If the timeout is reached during the cluster creation process, the operation will be aborted and the cluster status will be set to CREATE_FAILED. Defaults to 60. So yeahโ€ฆ don't sleep on it ๐Ÿ˜ญ
  • created_at โ€” the date and time when the resource was created. The date and time stamp format is ISO 8601:
CCYY-MM-DDThh:mm:ssยฑhh:mm

For example, 2015-08-27T09:49:58-05:00. The ยฑhh:mm value, if included, is the time zone as an offset from UTC. ISO girlies rise ๐ŸŒˆ

  • discovery_url โ€” the custom discovery url for node discovery. This is used by the COE to discover the servers that have been created to host the containers. The actual discovery mechanism varies with the COE. In some cases, the service fills in the server info in the discovery service. In other cases, if the discovery_url is not specified, the service will use the public discovery service at https://discovery.etcd.io. In this case, the service will generate a unique url here for each bay and store the info for the servers ๐Ÿฆ‹
  • fixed_network โ€” the name or ID of the network to provide connectivity to the internal network for the bay/cluster ๐Ÿ’œ
  • fixed_subnet โ€” the fixed subnet to use when allocating network addresses for nodes in bay/cluster ๐ŸŒธ
  • flavor_id โ€” the flavor name or ID to use when booting the node servers. Defaults to m1.small ๐ŸŽ€
  • is_floating_ip_enabled โ€” whether to enable using the floating IP of the cloud provider. Some cloud providers use floating IPs while some use public IPs. When set to true, floating IPs will be used. If this value is not provided, the value of floating_ip_enabled provided in the template will be used. Ship it โœจ
  • is_master_lb_enabled โ€” whether to enable the master load balancer. Since multiple masters may exist in a bay/cluster, a Neutron load balancer is created to provide the API endpoint for the bay/cluster and to direct requests to the masters. In some cases, such as when the LBaaS service is not available, this option can be set to false to create a bay/cluster without the load balancer. In this case, one of the masters will serve as the API endpoint. The default is true, i.e. to create the load balancer for the bay. Main character load balancer energy ๐Ÿ‘‘
  • keypair โ€” the name of the SSH keypair to configure in the bay/cluster servers for SSH access. Users will need the key to be able to ssh to the servers in the bay/cluster. The login name is specific to the bay/cluster driver. For example, with the fedora-atomic image the default login name is fedora ๐Ÿ”‘
  • labels โ€” arbitrary labels. The accepted keys and valid values are defined in the bay/cluster drivers. They're used as a way to pass additional parameters that are specific to a bay/cluster driver ๐Ÿท๏ธ
  • master_addresses โ€” a list of floating IPs of all master nodes ๐Ÿ’…
  • master_count โ€” the number of servers that will serve as master for the bay/cluster. Set it to more than 1 master to enable High Availability. If the option master-lb-enabled is specified in the baymodel/cluster template, the master servers will be placed in a load balancer pool. Defaults to 1 ๐ŸŒˆ
  • master_flavor_id โ€” the flavor of the master node for this baymodel/cluster template โญ
  • name โ€” name of the resource. Justโ€ฆ the name. Simple, iconic ๐ŸŽ€
  • node_count โ€” the number of servers that will serve as node in the bay/cluster. Defaults to 1 ๐ŸŒธ
  • node_addresses โ€” a list of floating IPs of all servers that serve as nodes ๐Ÿฆ‹
  • stack_id โ€” the reference UUID of the orchestration stack from the Heat orchestration service ๐Ÿ”ฅ
  • status โ€” the current state of the bay/cluster ๐Ÿ’œ
  • status_reason โ€” the reason of the bay/cluster's current status. Receipts, basically ๐Ÿงพ
  • updated_at โ€” the date and time when the resource was updated. The date and time stamp format is ISO 8601:
CCYY-MM-DDThh:mm:ssยฑhh:mm

For example, 2015-08-27T09:49:58-05:00. The ยฑhh:mm value, if included, is the time zone as an offset from UTC. If the updated_at date and time stamp is not set, its value is null. It's giving "no update yet" ๐Ÿ’€

  • uuid โ€” the UUID of the cluster โœจ
  • project_id โ€” the project the cluster belongs to ๐Ÿซถ

resize(session, *, node_count, nodes_to_remove=None)

Resize the cluster. Glow-up but for infrastructure ๐Ÿ’…

resize(session, *, node_count, nodes_to_remove=None)

Parameters

  • node_count โ€” the number of servers that will serve as node in the bay/cluster. The default is 1 ๐ŸŽ€
  • nodes_to_remove โ€” the server ID list will be removed if downsizing the cluster. Bye bestie ๐Ÿ‘‹

Returns

The UUID of the resized cluster โœจ

Raises

NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found. So likeโ€ฆ if it's not there ๐Ÿ˜ญ

upgrade(session, *, cluster_template, max_batch_size=None)

Upgrade the cluster. Level-up arc ๐ŸŒˆ

upgrade(session, *, cluster_template, max_batch_size=None)

Parameters

  • cluster_template โ€” the UUID of the cluster template ๐ŸŽ€
  • max_batch_size โ€” the max batch size each time when doing upgrade. The default is 1 ๐Ÿ’œ

Returns

The UUID of the updated cluster โญ

Raises

NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found. Same deal, if it's missing it's missing ๐Ÿ™ˆ

๐ŸŒธ openstack.container_infrastructure_management.v1.cluster_certificate

The Cluster Certificate Class โ€” okay so the ClusterCertificate class inherits from Resource <#openstack.resource.Resource>.

class openstack.container_infrastructure_management.v1.cluster_certificate.ClusterCertificate(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • base_path = '/certificates' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_list = False โ€” Allow list operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • bay_uuid โ€” The UUID of the bay.
  • cluster_uuid โ€” The UUID of the cluster.
  • csr โ€” Certificate Signing Request (CSR) for authenticating client key.
  • pem โ€” CA certificate for the bay/cluster.

๐ŸŒˆ openstack.container_infrastructure_management.v1.cluster_template

The Cluster Template Class โ€” the ClusterTemplate class inherits from Resource <#openstack.resource.Resource>.

class openstack.container_infrastructure_management.v1.cluster_template.ClusterTemplate(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'clustertemplates' โ€” Plural form of key for resource.
  • base_path = '/clustertemplates' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_patch = True โ€” Allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • apiserver_port โ€” The exposed port of COE API server.
  • cluster_distro โ€” Display the attribute os_distro defined as appropriate metadata in image for the bay/cluster driver.
  • coe โ€” Specify the Container Orchestration Engine to use. Supported COEs include kubernetes, swarm, mesos.
  • created_at โ€” The date and time when the resource was created.
  • docker_storage_driver โ€” The name of a driver to manage the storage for the images and the container's writable layer.
  • docker_volume_size โ€” The size in GB for the local storage on each server for the Docker daemon to cache the images and host the containers.
  • dns_nameserver โ€” The DNS nameserver for the servers and containers in the bay/cluster to use.
  • external_network_id โ€” The name or network ID of a Neutron network to provide connectivity to the external internet for the bay/cluster.
  • fixed_network โ€” The name or network ID of a Neutron network to provide connectivity to the internal network for the bay/cluster.
  • fixed_subnet โ€” Fixed subnet that are using to allocate network address for nodes in bay/cluster.
  • flavor_id โ€” The nova flavor ID or name for booting the node servers.
  • http_proxy โ€” The IP address for a proxy to use when direct http access from the servers to sites on the external internet is blocked. This may happen in certain countries or enterprises, and the proxy allows the servers and containers to access these sites. The format is a URL including a port number. The default is None.
  • https_proxy โ€” The IP address for a proxy to use when direct https access from the servers to sites on the external internet is blocked.
  • image_id โ€” The name or UUID of the base image in Glance to boot the servers for the bay/cluster.
  • insecure_registry โ€” The URL pointing to user's own private insecure docker registry to deploy and run docker containers.
  • is_floating_ip_enabled โ€” Whether enable or not using the floating IP of cloud provider.
  • is_hidden โ€” Indicates whether the ClusterTemplate is hidden or not.
  • is_master_lb_enabled โ€” this option can be set to false to create a bay/cluster without the load balancer.
  • is_tls_disabled โ€” Specifying this parameter will disable TLS so that users can access the COE endpoints without a certificate.
  • is_public โ€” Setting this flag makes the baymodel/cluster template public and accessible by other users.
  • is_registry_enabled โ€” This option provides an alternative registry based on the Registry V2
  • keypair_id โ€” The name of the SSH keypair to configure in the bay/cluster servers for ssh access.
  • labels โ€” Arbitrary labels. The accepted keys and valid values are defined in the bay/cluster drivers. They are used as a way to pass additional parameters that are specific to a bay/cluster driver.
  • master_flavor_id โ€” The flavor of the master node for this baymodel/cluster template.
  • network_driver โ€” The name of a network driver for providing the networks for the containers.
  • no_proxy โ€” When a proxy server is used, some sites should not go through the proxy and should be accessed normally.
  • server_type โ€” The servers in the bay/cluster can be vm or baremetal.
  • updated_at โ€” The date and time when the resource was updated.
  • uuid โ€” The UUID of the cluster template.
  • volume_driver โ€” The name of a volume driver for managing the persistent storage for the containers.

๐Ÿฆ‹ openstack.container_infrastructure_management.v1.service

The Service Class โ€” the Service class inherits from Resource <#openstack.resource.Resource>.

class openstack.container_infrastructure_management.v1.service.Service(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'mservices' โ€” Plural form of key for resource.
  • base_path = '/mservices' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • binary โ€” The name of the binary form of the Magnum service.
  • created_at โ€” The date and time when the resource was created.
  • disabled_reason โ€” The disable reason of the service, null if the service is enabled or disabled without reason provided.
  • host โ€” The host for the service.
  • report_count โ€” The total number of report.
  • state โ€” The current state of Magnum services.
  • updated_at โ€” The date and time when the resource was updated.

๐Ÿ’พ Database Resources

๐Ÿ“ openstack.database.v1.database

The Database Class โ€” the Database class inherits from Resource <#openstack.resource.Resource>.

class openstack.database.v1.database.Database(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'database' โ€” Singular form of key for resource.
  • resources_key = 'databases' โ€” Plural form of key for resource.
  • base_path = '/instances/%(instance_id)s/databases' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • character_set โ€” the set of symbols and encodings, like the alphabet the database speaks. default is utf8 โœจ
  • collate โ€” the ruleset for comparing characters inside that character set. default is utf8_general_ci
  • instance_id โ€” the ID of the instance
  • name โ€” the name of the database

๐Ÿฆ‹ openstack.database.v1.flavor

The Flavor Class ๐Ÿ’…

okay so the Flavor class inherits from Resource (iykyk, that's the base of everything around here).

class openstack.database.v1.flavor.Flavor(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿซถ that's literally what it says on the tin.

Parameters

  • _synchronized โ€” not a thing you touch directly, bestie, fr fr. go look at new() and existing() instead.
  • connection โ€” a reference to the Connection being used. it defaults to None so Resource objects can exist without an active Connection, like in unit tests. if you're using self._connection inside Resource code, guard it with a None check, okay? protect yourself ๐Ÿ’–

Attributes:

  • resource_key = 'flavor' โ€” the singular form of the key for this resource
  • resources_key = 'flavors' โ€” the plural form of the key for this resource
  • base_path = '/flavors' โ€” the base part of the URI for this resource
  • allow_list = True โ€” allow list operation for this resource, yes queen ๐Ÿ‘‘
  • allow_fetch = True โ€” allow get operation for this resource
  • links โ€” links associated with the flavor
  • name โ€” the name of the flavor
  • ram โ€” the size in MB of RAM the flavor has

๐ŸŒˆ openstack.database.v1.instance

The Instance Class ๐Ÿ”ฅ

this one inherits from Resource too, obviously.

class openstack.database.v1.instance.Instance(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” don't use this directly, seriously. see new() and existing().
  • connection โ€” a reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection (unit tests, hello). if Resource code uses self._connection, it should protect itself with a None check ๐Ÿ™ˆ

Attributes:

  • resource_key = 'instance' โ€” the singular form of the key for this resource
  • resources_key = 'instances' โ€” the plural form of the key for this resource
  • base_path = '/instances' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • flavor โ€” the flavor of the instance
  • links โ€” links associated with the instance
  • name โ€” the name of the instance
  • status โ€” the status of the instance
  • volume โ€” the size of the volume
  • datastore โ€” a dictionary of datastore details, usually with 'type' and 'version' keys
  • id โ€” the ID of this instance
  • region โ€” the region this instance resides in
  • hostname โ€” the name of the host
  • created_at โ€” the timestamp of when this instance was created
  • updated_at โ€” the timestamp of when this instance was updated

Methods, let's gooo:

  • enable_root_user(session) โ€” enable login for the root user. this operation enables login from any host for the root user and hands the user a generated root password. parameters: session (Adapter) โ€” the session to use for making this request. returns: a dictionary with the keys name and password specifying the login credentials ๐Ÿ”‘
  • is_root_enabled(session) โ€” determine if root is enabled on an instance. specifically, whether root is enabled on this particular instance. parameters: session (Adapter) โ€” the session to use for making this request. returns: True if the root user is enabled for the specified database instance, False otherwise
  • restart(session) โ€” restart the database instance. returns: None
  • resize(session, flavor_reference) โ€” resize the database instance. returns: None
  • resize_volume(session, volume_size) โ€” resize the volume attached to the instance. returns: None

๐ŸŽ€ openstack.database.v1.user

The User Class ๐Ÿ’œ

yep, inherits from Resource again. it's giving family reunion.

class openstack.database.v1.user.User(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not intended to be used directly. see new() and existing().
  • connection โ€” a reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’–

Attributes:

  • resource_key = 'user' โ€” the singular form of the key for this resource
  • resources_key = 'users' โ€” the plural form of the key for this resource
  • base_path = '/instances/%(instance_id)s/users' โ€” the base part of the URI for this resource (yes, there's a %(instance_id)s in there, it's a template, don't panic)
  • allow_create = True โ€” allow create operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • databases โ€” databases the user has access to
  • name โ€” the name of the user
  • password โ€” the password of the user

๐ŸŒธ DNS Resources

openstack.dns.v2.blacklist

The Blacklist Class ๐Ÿ–ค

the Blacklist class inherits from Resource.

class openstack.dns.v2.blacklist.Blacklist(_synchronized=False, connection=None, **attrs)

DNS Blacklist Resource โ€” iconic.

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() and existing().
  • connection โ€” reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None.

Attributes:

  • resources_key = 'blacklists' โ€” plural form of key for resource
  • base_path = '/blacklists' โ€” the base part of the URI for this resource
  • allow_list = True โ€” allow list operation for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • commit_method = 'PATCH' โ€” the method for committing a resource. this must be PATCH if allow_patch is True ๐Ÿ‘€
  • id โ€” properties ID for the resource
  • pattern โ€” pattern for this blacklist
  • description โ€” description for this blacklist
  • created_at โ€” timestamp of when the blacklist was created
  • updated_at โ€” timestamp of when the blacklist was last updated
  • links โ€” links to the resource, and the other related resources

openstack.dns.v2.floating_ip

The FloatingIP Class ๐Ÿฆ‹

the DNS class inherits from Resource.

class openstack.dns.v2.floating_ip.FloatingIP(_synchronized=False, connection=None, **attrs)

DNS Floating IP Resource โ€” floating, literally.

The base resource

Parameters

  • _synchronized โ€” not intended to be used directly. see new() and existing().
  • connection โ€” reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None.

Attributes:

  • resources_key = 'floatingips' โ€” plural form of key for resource
  • base_path = '/reverse/floatingips' โ€” the base part of the URI for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • commit_method = 'PATCH' โ€” method for committing a resource. this must be PATCH if allow_patch is True
  • action โ€” the properties' current action in progress on the resource
  • address โ€” the floatingip address for this PTR record
  • description โ€” description for this PTR record
  • ptrdname โ€” domain name for this PTR record
  • status โ€” status of the resource
  • ttl โ€” time to live for this PTR record โณ

โœจ openstack.dns.v2.limit โœจ

๐ŸŒธ The Limit Class ๐ŸŒธ

The Limit class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.limit.Limit(_synchronized=False, connection=None,
**attrs)

DNS Limit Resource โ€” okay bestie, this one is the base resource. ๐Ÿ’…

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'limit' โ€” Singular form of key for resource.
  • base_path = '/limits' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • max_page_limit โ€” Properties: The max amount of items allowed per page.
  • max_recordset_name_length โ€” The max length of a recordset name.
  • max_recordset_records โ€” The max amount of records contained in a recordset.
  • max_zone_name_length โ€” The max length of a zone name.
  • max_zone_records โ€” The max amount of records in a zone.
  • max_zone_recordsets โ€” The max amount of recordsets per zone.
  • max_zones โ€” The max amount of zones for this project.
  • min_ttl โ€” The lowest ttl allowed on this system.

โœจ openstack.dns.v2.quota โœจ

๐Ÿ’– The Quota Class ๐Ÿ’–

The Quota class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.quota.Quota(_synchronized=False, connection=None,
**attrs)

DNS Quota Resource โ€” yep, the base resource again, bestie. ๐Ÿซถ

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • base_path = '/quotas' โ€” The base part of the URI for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • project โ€” The ID of the project.
  • api_export_size โ€” The maximum amount of recordsets allowed in a zone export. Type: int
  • recordset_records โ€” The maximum amount of records allowed per recordset. Type: int
  • zone_records โ€” The maximum amount of records allowed per zone. Type: int
  • zone_recordsets โ€” The maximum amount of recordsets allowed per zone. Type: int
  • zones โ€” The maximum amount of zones allowed per project. Type: int

๐Ÿ› ๏ธ fetch(...) ๐Ÿ› ๏ธ

fetch(session, requires_id=True, base_path=None,
error_message=None, skip_cache=False, *,
resource_response_key=None, microversion=None, **params)

Get a remote resource based on this instance.

Parameters:

  • session โ€” The session to use for making this request.
  • requires_id โ€” Whether resource ID should be part of the requested URI.
  • base_path โ€” Base part of the URI for fetching resources, if different from base_path <# openstack.resource.Resource.base_path>.
  • error_message โ€” An error message to be returned if requested object does not exist.
  • skip_cache โ€” A boolean indicating whether optional API cache should be skipped for this invocation.
  • resource_response_key โ€” Overrides the usage of self.resource_key when processing the response body.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” Additional parameters that can be consumed.

Returns: This Resource instance.

๐Ÿ’€ Raises: MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_fetch is not set to True.
๐Ÿ’€ Raises: NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found.

๐ŸŒˆ openstack.dns.v2.recordset ๐ŸŒˆ

๐Ÿฆ‹ The Recordset Class ๐Ÿฆ‹

The DNS class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.recordset.Recordset(_synchronized=False,
connection=None, **attrs)

DNS Recordset Resource โ€” the base resource, but make it DNS. โœจ

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'recordsets' โ€” Plural form of key for resource.
  • base_path = '/zones/%(zone_id)s/recordsets' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • action โ€” Properties: current action in progress on the resource.
  • created_at โ€” Timestamp when the zone was created.
  • description โ€” Recordset description.
  • links โ€” Links contains a self pertaining to this zone or a next pertaining to next page.
  • name โ€” DNS Name of the recordset.
  • project_id โ€” ID of the project which the recordset belongs to.
  • records โ€” DNS record value list.
  • status โ€” Recordset status Valid values include: PENDING_CREATE, ACTIVE, PENDING_DELETE, ERROR.
  • ttl โ€” Time to live, default 300, available value 300-2147483647 (seconds).
  • type โ€” DNS type of the recordset Valid values include A, AAAA, MX, CNAME, TXT, NS, SSHFP, SPF, SRV, PTR.
  • updated_at โ€” Timestamp when the zone was last updated.
  • zone_id โ€” The id of the Zone which this recordset belongs to.
  • zone_name โ€” The name of the Zone which this recordset belongs to.

โญ openstack.dns.v2.service_status โญ

๐ŸŽ€ The ServiceStatus Class ๐ŸŽ€

The ServiceStatus class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.service_status.ServiceStatus(_synchronized=False,
connection=None, **attrs)

Designate Service Statuses โ€” the base resource, serving status realness. ๐Ÿ‘‘

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'service_statuses' โ€” Plural form of key for resource.
  • base_path = '/service_statuses' โ€” The base part of the URI for this resource.
  • allow_create = False โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = False โ€” Allow update operation for this resource.
  • allow_delete = False โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • capabilities โ€” Capabilities for the service.
  • created_at โ€” Timestamp when the resource was created.
  • heartbeated_at โ€” Timestamp when the last heartbeat was received.
  • hostname โ€” Hostname of the host with the service instance Type: str
  • links โ€” Links contains a self pertaining to this service status or a next pertaining to next page.
  • service_name โ€” The name of the Designate service instance Type: str
  • stats โ€” Statistics for the service.
  • status โ€” The status of the resource Type: enum
  • updated_at โ€” Timestamp when the resource was last updated.

๐Ÿงš openstack.dns.v2.tld ๐Ÿงš

๐Ÿ’œ The TLD Class ๐Ÿ’œ

The DNS class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.tld.TLD(_synchronized=False, connection=None,
**attrs)

DNS TLD Resource โ€” the base resource, top-level domain edition. ๐ŸŒˆ

Parameters:

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.

okay so continuing the tld resource deets, bestie:

  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'tlds' โ€” Plural form of key for resource.
  • base_path = '/tlds' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • name โ€” TLD name
  • description โ€” TLD description
  • created_at โ€” Timestamp when the tld was created
  • updated_at โ€” Timestamp when the tld was last updated
  • links โ€” Links contains a self pertaining to this tld or a next pertaining to next page

๐ŸŒธ openstack.dns.v2.zone ๐ŸŒธ

The Zone Class ๐Ÿฆ‹

The DNS class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.zone.Zone(_synchronized=False, connection=None, **attrs)

DNS ZONE Resource ๐Ÿ’…

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'zones' โ€” Plural form of key for resource.
  • base_path = '/zones' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • commit_method = 'PATCH' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • action โ€” Properties current action in progress on the resource
  • attributes โ€” Attributes Key:Value pairs of information about this zone, and the pool the user would like to place the zone in. This information can be used by the scheduler to place zones on the correct pool.
  • created_at โ€” Timestamp when the zone was created
  • description โ€” Zone description Type: str
  • email โ€” The administrator email of this zone Type: str
  • links โ€” Links contains a self pertaining to this zone or a next pertaining to next page
  • masters โ€” The master list for slaver server to fetch DNS
  • name โ€” Zone name
  • pool_id โ€” The pool which manages the zone, assigned by system
  • project_id โ€” The project id which the zone belongs to
  • serial โ€” Serial number in the SOA record set in the zone, which identifies the change on the primary DNS server Type: int
  • status โ€” Zone status Valid values include PENDING_CREATE, ACTIVE, PENDING_DELETE, ERROR
  • ttl โ€” SOA TTL time, unit is seconds, default 300, TTL range 300-2147483647 Type: int
  • type โ€” Zone type, Valid values include PRIMARY, SECONDARY Type: str
  • updated_at โ€” Timestamp when the zone was last updated
  • is_shared โ€” Whether the zone is shared with other projects Type: bool
  • delete_shares โ€” If true, delete any existing zone shares along with the zone

๐ŸŒˆ openstack.dns.v2.zone_export ๐ŸŒˆ

The ZoneExport Class ๐ŸŽ€

The DNS class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.zone_export.ZoneExport(_synchronized=False, connection=None, **attrs)

DNS Zone Exports Resource โœจ

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = '' โ€” Singular form of key for resource.
  • resources_key = 'exports' โ€” Plural form of key for resource.
  • base_path = '/zones/tasks/export' โ€” The base part of the URI for this resource.
  • create_opts โ€” Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().
              create_opts = CreateOpts(request_key=None,
              response_key=<Unset.UNSET: 'UNSET'>, method='POST',
              requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • created_at โ€” Properties Timestamp when the zone was created
  • links โ€” Links contains a self pertaining to this zone or a next pertaining to next page
  • message โ€” Message
  • metadata โ€” Returns the total_count of resources matching this filter
  • project_id โ€” The project id which the zone belongs to
  • status โ€” Current status of the zone export
  • updated_at โ€” Timestamp when the zone was last updated
  • version โ€” Version of the resource
  • zone_id โ€” ID for the zone that was created by this export

๐Ÿฆ‹ openstack.dns.v2.zone_import ๐Ÿฆ‹

The ZoneImport Class ๐Ÿ’œ

The DNS class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.zone_import.ZoneImport(_synchronized=False, connection=None, **attrs)

DNS Zone Import Resource ๐ŸŒŸ

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = '' โ€” Singular form of key for resource.
  • resources_key = 'imports' โ€” Plural form of key for resource.
  • base_path = '/zones/tasks/imports' โ€” The base part of the URI for this resource.
  • create_opts โ€” Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().
              create_opts = CreateOpts(request_key=None,
              response_key=<Unset.UNSET: 'UNSET'>, method='POST',
              requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • created_at โ€” Properties Timestamp when the zone was created
  • links โ€” Links contains a self pertaining to this zone or a next pertaining to next page
  • message โ€” Message
  • metadata โ€” Returns the total_count of resources matching this filter
  • project_id โ€” The project id which the zone belongs to
  • status โ€” Current status of the zone import
  • updated_at โ€” Timestamp when the zone was last updated
  • version โ€” Version of the resource
  • zone_id โ€” ID for the zone that was created by this import

๐Ÿ’… openstack.dns.v2.zone_share ๐Ÿ’…

The ZoneShare Class ๐Ÿซถ

The DNS class inherits from Resource <#openstack.resource.Resource>.

class openstack.dns.v2.zone_share.ZoneShare(_synchronized=False, connection=None, **attrs)

DNS ZONE Share Resource ๐Ÿ”ฅ

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'shared_zones' โ€” Plural form of key for resource.
  • base_path = '/zones/%(zone_id)s/shares' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” you can create this resource, yes ma'am โœจ
  • allow_delete = True โ€” and you can yeet it too ๐Ÿ’…
  • allow_fetch = True โ€” get/fetch is allowed, go off
  • allow_list = True โ€” listing? allowed, obviously ๐Ÿซถ
  • zone_id โ€” the ID of the zone being shared, keeping it cute and identifiable
  • created_at โ€” timestamp of when the share was created ๐ŸŽ€
  • updated_at โ€” timestamp of when the member was last updated
  • project_id โ€” the project ID that owns the share, main character energy fr
  • target_project_id โ€” the target project ID that the zone is shared with

๐Ÿฆ‹ openstack.dns.v2.zone_transfer

The ZoneTransferRequest Class

okay so this DNS class inherits from Resource <#openstack.resource.Resource>, slay ๐Ÿ’–

class openstack.dns.v2.zone_transfer.ZoneTransferRequest(_synchronized=False, connection=None, **attrs)

DNS Zone Transfer Request Resource โ€” that's the whole vibe. It's the base resource.

Parameters (yes, both of them, no skipping ๐Ÿ™ˆ)

  • _synchronized โ€” bestie, do not use this directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead, okay?
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection (like in unit tests, iykyk). Any use of self._connection in Resource code should protect itself with a check for None.
  • base_path = '/zones/tasks/transfer_requests' โ€” the base part of the URI for this resource, literally
  • resources_key = 'transfer_requests' โ€” plural form of the key for the resource
  • allow_create = True โ€” create is allowed โœจ
  • allow_fetch = True โ€” fetch is allowed
  • allow_delete = True โ€” delete is allowed
  • allow_list = True โ€” list is allowed
  • allow_commit = True โ€” update is allowed too, we love range ๐Ÿ”ฅ
  • description โ€” description. That's it. That's the description ๐Ÿ’€
  • target_project_id โ€” a project ID that the request will be limited to. No other project will be allowed to accept this request. Exclusive. Periodt ๐Ÿ‘‘
  • zone_name โ€” name for the zone that's being exported

The ZoneTransferAccept Class

same deal, this DNS class inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.dns.v2.zone_transfer.ZoneTransferAccept(_synchronized=False, connection=None, **attrs)

DNS Zone Transfer Accept Resource โ€” the base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” again, not for direct use. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • base_path = '/zones/tasks/transfer_accepts' โ€” the base part of the URI for this resource
  • resources_key = 'transfer_accepts' โ€” plural form of the key for the resource
  • allow_create = True โ€” create: allowed ๐ŸŒธ
  • allow_fetch = True โ€” fetch: allowed
  • allow_list = True โ€” list: allowed
  • zone_transfer_request_id โ€” name for the zone that's being exported (yes, that's what the doc says, no I'm not changing it ๐Ÿ’€)

๐ŸŽ€ Identity Resources

Identity v2 Resources

openstack.identity.v2.extension

The Extension Class

this Extension class inherits from Resource <#openstack.resource.Resource>, iconic โญ

class openstack.identity.v2.extension.Extension(_synchronized=False, connection=None, **attrs)

the base resource, as ever ๐Ÿซถ

Parameters

  • _synchronized โ€” nope, not meant for direct use. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection (unit tests say hi). Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'extension' โ€” singular form of the key for the resource
  • resources_key = 'extensions' โ€” plural form of the key for the resource
  • base_path = '/extensions' โ€” the base part of the URI for this resource
  • allow_list = True โ€” list is allowed
  • allow_fetch = True โ€” fetch is allowed
  • alias โ€” a unique identifier which will be used for accessing the extension through a dedicated url /extensions/*alias*. The extension alias uniquely identifies an extension and is prefixed by a vendor identifier. Type: string
  • description โ€” a description of the extension. Type: string
  • links โ€” links to the documentation in various format. Type: string
  • name โ€” the name of the extension. Type: string
  • namespace โ€” the second unique identifier of the extension after the alias. It's usually a URL which will be used. Example: http://docs.openstack.org/identity/api/ext/s3tokens/v1.0. Type: string
  • updated_at โ€” the last time the extension has been modified (update date)

classmethod list(...) โ€” the big one ๐Ÿ‘‘

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, headers=None, max_items=None, **params)

This method is a generator which yields resource objects ๐Ÿ’– It handles pagination and takes query params so you can filter your little heart out.

Parameters

  • session โ€” the session to use for making this request
  • paginated โ€” True if a GET to this resource returns a paginated series of responses, or False if a GET returns only one page of data. When paginated is False only one page of data will be returned, regardless of whether the API supports pagination. no cap.
  • base_path โ€” base part of the URI for listing resources, if it's different from base_path <#openstack.resource.Resource.base_path>
  • allow_unknown_params โ€” True to accept but discard unknown query parameters. This lets you get a list of 'filters' and pass everything known to the server. False will result in a validation exception when unknown query parameters are passed ๐Ÿ˜ญ
  • microversion โ€” API version to override the negotiated one
  • headers โ€” additional headers to inject into the HTTP request
  • max_items โ€” the maximum number of items to return. Typically this must be used with paginated=True.
  • params โ€” these keyword arguments get passed through the _transpose() method to find if any of them match expected query parameters to be sent in the params argument to get(). They're additionally checked against the base_path <#openstack.resource.Resource.base_path> format string to see if any path fragments need to be filled in by the contents of this argument. Parameters supported as filters by the server side are passed in the API call, and the remaining parameters are applied as filters to the retrieved results. chef's kiss ๐Ÿ’…

Returns โ€” a generator of Resource objects โœจ

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_list is not set to True.

Raises InvalidResourceQuery <#openstack.exceptions.InvalidResourceQuery> if the query contains invalid params.


openstack.identity.v2.role

The Role Class

the Role class inherits from Resource <#openstack.resource.Resource>, your honor ๐ŸŒˆ

class openstack.identity.v2.role.Role(_synchronized=False, connection=None, **attrs)

the base resource, again, always ๐ŸŽ€

Parameters

  • _synchronized โ€” please do not use directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'role' โ€” singular form of the key for the resource
  • resources_key = 'roles' โ€” plural form of the key for the resource
  • base_path = '/OS-KSADM/roles' โ€” the base part of the URI for this resource, exactly like that, don't touch it ๐Ÿ’…
  • allow_create = True โ€” create: allowed
  • allow_fetch = True โ€” fetch: allowed
  • allow_commit = True โ€” update: allowed
  • allow_delete = True โ€” delete: allowed
  • allow_list = True โ€” list: allowed
  • description โ€” the description of the role. Type: string

Okay, finishing the role fields real quick:

  • is_enabled โ€” set this attribute to False and this role is literally not available in the role list anymore. Type: bool
  • name โ€” unique role name, no duplicates bestie. Type: string

๐ŸŽ€ openstack.identity.v2.tenant โ€” The Tenant Class

The Tenant class inherits from Resource, as it should.

class openstack.identity.v2.tenant.Tenant(_synchronized=False, connection=None, **attrs)

This is the base resource.

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. See new() and existing() for the actual moves.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. If you're using self._connection in Resource code, protect it with a check for None. Periodt.
  • resource_key = 'tenant' โ€” singular form of the key for this resource.
  • resources_key = 'tenants' โ€” plural form of the key for this resource.
  • base_path = '/tenants' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation is allowed for this resource.
  • allow_fetch = True โ€” get operation is allowed for this resource.
  • allow_commit = True โ€” update operation is allowed for this resource.
  • allow_delete = True โ€” delete operation is allowed for this resource.
  • allow_list = True โ€” list operation is allowed for this resource.
  • description โ€” the description of the tenant. Type: string
  • is_enabled โ€” setting this attribute to False prevents users from authorizing against this tenant. Also, all pre-existing tokens authorized for the tenant are immediately invalidated. Re-enabling a tenant does not re-enable those pre-existing tokens, so don't think you can just flip it back and pretend nothing happened. Type: bool
  • name โ€” unique tenant name. Type: string

๐Ÿฆ‹ openstack.identity.v2.user โ€” The User Class

The User class inherits from Resource, naturally.

class openstack.identity.v2.user.User(_synchronized=False, connection=None, **attrs)

This is the base resource.

Parameters

  • _synchronized โ€” not for direct use, bestie. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can work without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a None check.
  • resource_key = 'user' โ€” singular form of the key for this resource.
  • resources_key = 'users' โ€” plural form of the key for this resource.
  • base_path = '/users' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation is allowed for this resource.
  • allow_fetch = True โ€” get operation is allowed for this resource.
  • allow_commit = True โ€” update operation is allowed for this resource.
  • allow_delete = True โ€” delete operation is allowed for this resource.
  • allow_list = True โ€” list operation is allowed for this resource.
  • email โ€” the email of this user. Type: string
  • is_enabled โ€” setting this value to False prevents the user from authenticating or receiving authorization. Also, all pre-existing tokens held by the user are immediately invalidated. Re-enabling a user does not re-enable pre-existing tokens. Type: bool
  • name โ€” the name of this user. Type: string

๐ŸŒˆ Identity v3 Resources

๐Ÿ’œ openstack.identity.v3.application_credential โ€” The ApplicationCredential Class

The ApplicationCredential class inherits from Resource.

class openstack.identity.v3.application_credential.ApplicationCredential(_synchronized=False, connection=None, **attrs)

This is the base resource.

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'application_credential' โ€” singular form of the key for this resource.
  • resources_key = 'application_credentials' โ€” plural form of the key for this resource.
  • base_path = '/users/%(user_id)s/application_credentials' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation is allowed for this resource.
  • allow_fetch = True โ€” get operation is allowed for this resource.
  • allow_commit = True โ€” update operation is allowed for this resource.
  • allow_delete = True โ€” delete operation is allowed for this resource.
  • allow_list = True โ€” list operation is allowed for this resource.
  • user_id โ€” user ID using the application credential. Type: string
  • user โ€” user object using the application credential. Type: string
  • links โ€” the links for the application credential resource.
  • name โ€” name of the user. Type: string
  • description โ€” description of the application credential's purpose. Type: string
  • expires_at โ€” expire time of the application credential. Type: string
  • roles โ€” roles of the user. Type: list
  • unrestricted โ€” restricts the application credential. Type: boolean
  • project_id โ€” ID of project. Type: string
  • access_rules โ€” access rules for the application credential. Type: list

๐Ÿ”ฅ openstack.identity.v3.credential โ€” The Credential Class

The Credential class inherits from Resource.

class openstack.identity.v3.credential.Credential(_synchronized=False, connection=None, **attrs)

This is the base resource.

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'credential' โ€” singular form of the key for this resource.
  • resources_key = 'credentials' โ€” plural form of the key for this resource.
  • base_path = '/credentials' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation is allowed for this resource.
  • allow_fetch = True โ€” get operation is allowed for this resource.
  • allow_commit = True โ€” update operation is allowed for this resource.
  • allow_delete = True โ€” delete operation is allowed for this resource.
  • allow_list = True โ€” list operation is allowed for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • blob โ€” arbitrary blob of the credential data, to be parsed according to the type. Type: string
  • project_id โ€” references a project ID which limits the scope the credential applies to. This attribute is mandatory if the credential type is ec2. Type: string
  • type โ€” representing the credential type, such as ec2 or cert. A specific implementation may determine the list of supported types. Type: string
  • user_id โ€” references the user ID which owns the credential. Type: string

๐Ÿ‘‘ openstack.identity.v3.domain โ€” The Domain Class

The Domain class inherits from Resource.

class openstack.identity.v3.domain.Domain(_synchronized=False, connection=None, **attrs)

This is the base resource.

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'domain' โ€” singular form of the key for this resource.
  • resources_key = 'domains' โ€” plural form of the key for this resource.
  • base_path = '/domains' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation is allowed for this resource.
  • allow_fetch = True โ€” get operation is allowed for this resource.
  • allow_commit = True โ€” update operation is allowed for this resource.
  • allow_delete = True โ€” delete operation is allowed for this resource.
  • allow_list = True โ€” list operation is allowed for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • description โ€” the description of this domain. Type: string
  • is_enabled โ€” set this to False and likeโ€ฆ users can't authorize against this domain or any project it owns, and users owned by the domain can't authenticate or get any other authorization, periodt. And bestie, hear me: every pre-existing token that applies to all those entities gets immediately invalidated. Re-enabling the domain does not bring those old tokens back. Type: bool ๐Ÿ’€
  • options โ€” the resource options for the project. Heads up: available resource options are immutable. Not me trying to change them ๐Ÿ™ˆ
  • links โ€” the links related to the domain resource. โœจ
  • assign_role_to_user(session, user, role, inherited) โ€” assign role to user on domain. Slay, give them the role ๐Ÿ‘‘
  • validate_user_has_role(session, user, role, inherited) โ€” validates that a user has a role on a domain. The vibe check, but for permissions ๐Ÿซถ
  • unassign_role_from_user(session, user, role, inherited) โ€” unassigns a role from a user on a domain. Revoking rights, we hate to see it but we respect it ๐Ÿ˜ญ
  • assign_role_to_group(session, group, role, inherited) โ€” assign role to group on domain. Group chat gets the power ๐ŸŒˆ
  • validate_group_has_role(session, group, role, inherited) โ€” validates that a group has a role on a domain. Checking receipts on the group's permissions ๐Ÿงพ
  • unassign_role_from_group(session, group, role, inherited) โ€” unassigns a role from a group on a domain. Taking it back, no hard feelings โœจ

๐Ÿฆ‹ openstack.identity.v3.domain_config

The Domain Class

The DomainConfig class inherits from Resource <#openstack.resource.Resource>. Family tree is giving legacy, honestly.

class openstack.identity.v3.domain_config.DomainConfig(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” literally not meant to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so that Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None. Stay safe out there ๐Ÿซถ
  • resource_key = 'config' โ€” singular form of key for resource.
  • base_path = '/domains/%(domain_id)s/config' โ€” the base part of the URI for this resource ๐Ÿ”—
  • requires_id = False โ€” do calls for this resource require an ID? Nope, bestie, not this one.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. The way it has to be PATCH, no cap.
  • create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='PUT', requires_id=False, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). Iconic inheritance behaviour honestly ๐ŸŽ€
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • domain_id โ€” the domain ID.
  • identity โ€” an identity object โœจ
  • ldap โ€” the config object.

๐ŸŒธ openstack.identity.v3.endpoint

The Endpoint Class

The Endpoint class inherits from Resource <#openstack.resource.Resource>. Bestie, this one does have an ID.

class openstack.identity.v3.endpoint.Endpoint(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly, periodt. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'endpoint' โ€” singular form of key for resource.
  • resources_key = 'endpoints' โ€” plural form of key for resource. Plural era ๐ŸŒˆ
  • base_path = '/endpoints' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. Yes, you can see them all ๐Ÿ’…
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • interface โ€” describes the interface of the endpoint according to one of the following values:
    • public: intended for consumption by end users, generally on a publicly available network interface ๐ŸŒ
    • internal: not intended for consumption by end users, generally on an unmetered internal network interface ๐Ÿ 
    • admin: intended only for consumption by those needing administrative access to the service, generally on a secure network interface ๐Ÿ”

Type: string

  • is_enabled โ€” setting this value to False prevents the endpoint from appearing in the service catalog. Type: bool. Ghosting the catalog, honestly ๐Ÿ’€
  • links โ€” the links for the region resource.
  • region_id โ€” represents the containing region ID of the service endpoint. New in v3.2. Type: string โœจ
  • service_id โ€” references the service ID to which the endpoint belongs. Type: string
  • url โ€” fully qualified URL of the service endpoint. Type: string ๐Ÿ”—

๐Ÿงš openstack.identity.v3.federation_protocol

The FederationProtocol Class

The FederationProtocol class inherits from Resource <#openstack.resource.Resource>. Long class name, long vibes.

class openstack.identity.v3.federation_protocol.FederationProtocol(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” nope, don't touch it directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'protocol' โ€” singular form of key for resource.
  • resources_key = 'protocols' โ€” plural form of key for resource.
  • base_path = '/OS-FEDERATION/identity_providers/%(idp_id)s/protocols' โ€” the base part of the URI for this resource. Look at that path, it's giving โœจfederationโœจ
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='PUT', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). ๐ŸŽ€
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • name โ€” name of the protocol (read only). Type: string. Read only, so don't even try it bestie ๐Ÿ™ˆ

๐Ÿ’œ openstack.identity.v3.group

The Group Class

The Group class inherits from Resource <#openstack.resource.Resource>. Group chat but make it IAM.

class openstack.identity.v3.group.Group(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly, fr fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'group' โ€” singular form of key for resource.
  • resources_key = 'groups' โ€” plural form of key for resource.
  • base_path = '/groups' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • description โ€” the description of this group. Type: string โœจ
  • domain_id โ€” references the domain ID which owns the group; if a domain ID is not specified by the client, the Identity service implementation will default it to the domain ID to which the client's token is scoped. Type: string. It just picks one for you, main character energy ๐Ÿ‘‘
  • name โ€” unique group name, within the owning domain. Type: string ๐ŸŒธ
  • add_user(session, user) โ€” adds that user to the group, simple as ๐Ÿ’…
  • remove_user(session, user) โ€” yeets the user out of the group
  • check_user(session, user) โ€” asks the vibes question: does this user actually belong to this group? ๐Ÿ•ต๏ธโ€โ™€๏ธ

The UserGroup Class

So UserGroup is a subclass of Group โ€” it inherits all the group energy and just does its own thing. It's the the user is in the group resource, iykyk ๐Ÿ‘‘

class openstack.identity.v3.group.UserGroup(_synchronized=False,
connection=None, **attrs)

The base resource โ€” every resource in this library starts from here, it's giving founding mother ๐Ÿซถ

Parameters

  • _synchronized โ€” bestie, this is not meant to be used directly. Go look at new() and existing() instead (#openstack.resource.Resource.new, #openstack.resource.Resource.existing).
  • connection โ€” a reference to the Connection being used. It defaults to None so you can use Resource objects with no active Connection at all, like in unit tests. Any code inside Resource that touches self._connection should protect itself with a check for None. Ngl, guard your heart (and your attributes) ๐Ÿ’€

base_path = '/users/%(user_id)s/groups' โ€” the base part of the URI for this resource.

user_id โ€” the ID for the user, pulled straight out of the URI of the resource.

allow_create = False โ€” creation? not allowed, we don't do that here ๐Ÿ™…โ€โ™€๏ธ

allow_fetch = False โ€” get operation? also no.

allow_commit = False โ€” update? nope.

allow_delete = False โ€” delete? absolutely not.

allow_list = True โ€” but listing? oh we slay, that one's allowed โœจ


openstack.identity.v3.identity_provider

The IdentityProvider Class

The IdentityProvider class inherits from Resource (#openstack.resource.Resource) โ€” 10/10 lineage, no notes.

class openstack.identity.v3.identity_provider.IdentityProvider(_synchronized=False,
connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” do not use this directly, seriously. Peep new() and existing() (#openstack.resource.Resource.new, #openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection in play. Defaults to None so Resource objects work without an active Connection (hello unit tests ๐Ÿ‘‹). Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'identity_provider' โ€” the singular form of the key for this resource.

resources_key = 'identity_providers' โ€” the plural form, because plurals are a whole vibe now ๐ŸŒˆ

base_path = '/OS-FEDERATION/identity_providers' โ€” the base part of the URI for this resource.

allow_create = True โ€” create: yes ๐Ÿ’–

allow_fetch = True โ€” get: yes.

allow_commit = True โ€” update: yes.

allow_delete = True โ€” delete: yes.

allow_list = True โ€” list: yes. All five ate, no crumbs ๐Ÿ“

create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='PUT', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create() โ€” iconic design choice honestly ๐Ÿ‘‘

commit_method = 'PATCH' โ€” the method used for committing a resource. It must be PATCH if allow_patch is True. Don't test it, just respect it ๐Ÿ™

description โ€” a description of this identity provider. Type: string.

is_enabled โ€” whether the identity provider is currently enabled. Type: bool.

remote_ids โ€” remote IDs associated with the identity provider. Type: list.

authorization_ttl โ€” the length of validity in minutes for group memberships. Type: int.

name โ€” the identifier of the identity provider (read only). Type: string.


openstack.identity.v3.limit

The Limit Class

The Limit class inherits from Resource (#openstack.resource.Resource) โ€” limits! boundaries! structure! we love a resource with self-respect ๐ŸŽ€

class openstack.identity.v3.limit.Limit(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” not for direct use, bestie. See new() and existing() (#openstack.resource.Resource.new, #openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'limit' โ€” singular form of key for resource.

resources_key = 'limits' โ€” plural form of key for resource.

base_path = '/limits' โ€” the base part of the URI for this resource.

allow_create = True โ€” create operation: allowed โœจ

allow_fetch = True โ€” get operation: allowed.

allow_commit = True โ€” update operation: allowed.

allow_delete = True โ€” delete operation: allowed.

allow_list = True โ€” list operation: allowed. Full house, we love to see it ๐Ÿ’…

commit_method = 'PATCH' โ€” the method for committing a resource. This must be PATCH if allow_patch is True.

create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key='limits', method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). Note the response_key='limits' and method='POST' โ€” very much on purpose ๐Ÿ”ฅ

domain_id โ€” the ID of the domain. Type: string.

description โ€” user-facing description of the registered_limit. Type: string.

links โ€” the links for the registered_limit resource.

service_id โ€” ID of service. Type: string.

region_id โ€” ID of region, if any. Type: string. (The "if any" is doing a lot of emotional labour there ๐Ÿ˜ญ)

resource_name โ€” the resource name. Type: string.

resource_limit โ€” the resource limit value. Type: int.

project_id โ€” ID of project. Type: string.


openstack.identity.v3.mapping

The Mapping Class

The Mapping class inherits from Resource (#openstack.resource.Resource) โ€” mappings, the federated identity girlies' best friend ๐Ÿงš

class openstack.identity.v3.mapping.Mapping(_synchronized=False,
connection=None, **attrs)

The base resource โญ

Parameters

  • _synchronized โ€” please do not use this directly, it's not that kind of parameter. See new() and existing() (#openstack.resource.Resource.new, #openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to let Resource objects exist without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'mapping' โ€” singular form of key for resource.

resources_key = 'mappings' โ€” plural form of key for resource.

base_path = '/OS-FEDERATION/mappings' โ€” the base part of the URI for this resource.

allow_create = True โ€” create: yes ๐ŸŒธ

allow_fetch = True โ€” get: yes.

allow_commit = True โ€” update: yes.

allow_delete = True โ€” delete: yes.

allow_list = True โ€” list: yes. All of them green, we're thriving ๐ŸŒฑ

create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='PUT', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().

commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.

rules โ€” the rules of this mapping. Type: list. The rules! we live by them ๐Ÿ“œ

schema_version โ€” the attribute mapping schema version. Type: string.

name โ€” the identifier of the mapping. Type: string.


openstack.identity.v3.policy

The Policy Class

The Policy class inherits from Resource (#openstack.resource.Resource) โ€” policies, the main character energy of access control ๐Ÿ‘‘

class openstack.identity.v3.policy.Policy(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” not intended for direct use. See new() and existing() (#openstack.resource.Resource.new, #openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'policy' โ€” singular form of key for resource.

resources_key = 'policies' โ€” plural form of key for resource.

base_path = '/policies' โ€” the base part of the URI for this resource.

allow_create = True โ€” create operation: allowed ๐Ÿ’–

allow_fetch = True โ€” get operation: allowed.

allow_commit = True โ€” update operation: allowed.

allow_delete = True โ€” delete operation: allowed.

allow_list = True โ€” list operation: allowed. Every flag set to True, periodt โœจ

commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.

  • blob โ€” the policy rule set itself, as a serialized blob. Type: string โœจ
  • links โ€” the links for the policy resource ๐Ÿ”—
  • project_id โ€” the ID for the project ๐Ÿซถ
  • type โ€” the MIME Media Type of the serialized policy blob. Type: string ๐Ÿ’…
  • user_id โ€” the ID of the user who owns the policy ๐Ÿ‘‘

๐ŸŒธ openstack.identity.v3.project

๐Ÿซถ The Project Class

The Project class inherits from Resource <#openstack.resource.Resource>. Bestie, it's giving "whole project energy" and honestly? Iconic. ๐Ÿ’–

class openstack.identity.v3.project.Project(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ˜Œ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ”’
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿงช
  • resource_key = 'project' โ€” singular form of key for resource ๐ŸŽ€
  • resources_key = 'projects' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/projects' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” allow create operation for this resource โœ…
  • allow_fetch = True โ€” allow get operation for this resource โœ…
  • allow_commit = True โ€” allow update operation for this resource โœ…
  • allow_delete = True โ€” allow delete operation for this resource โœ…
  • allow_list = True โ€” allow list operation for this resource โœ…
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. ๐Ÿ’…
  • description โ€” the description of the project. Type: string ๐Ÿ“
  • domain_id โ€” references the domain ID which owns the project; if a domain ID is not specified by the client, the Identity service implementation will default it to the domain ID to which the client's token is scoped. Type: string ๐ŸŒ
  • is_domain โ€” indicates whether the project also acts as a domain. If set to True, the project acts as both a project and a domain. Default is False. New in version 3.6 โœจ
  • is_enabled โ€” setting this attribute to False prevents users from authorizing against this project. Additionally, all pre-existing tokens authorized for the project are immediately invalidated. Re-enabling a project does not re-enable pre-existing tokens. Type: bool โš ๏ธ
  • options โ€” the resource options for the project. Available resource options are immutable. ๐Ÿ”’
  • parent_id โ€” the ID of the parent of the project. New in version 3.4 ๐Ÿงฌ
  • links โ€” the links related to the project resource ๐Ÿ”—
  • assign_role_to_user(session, user, role, inherited) โ€” assign role to user on project ๐Ÿ‘‘
  • validate_user_has_role(session, user, role, inherited) โ€” validates that a user has a role on a project โœ…
  • unassign_role_from_user(session, user, role, inherited) โ€” unassigns a role from a user on a project โŒ
  • assign_role_to_group(session, group, role, inherited) โ€” assign role to group on project ๐Ÿ‘ฅ
  • validate_group_has_role(session, group, role, inherited) โ€” validates that a group has a role on a project โœ…
  • unassign_role_from_group(session, group, role, inherited) โ€” unassigns a role from a group on a project โŒ
  • associate_endpoint(session, endpoint_id) โ€” associate endpoint with project. ๐Ÿซถ

Parameters

  • session โ€” The session to use for making this request.
  • endpoint_id โ€” The ID of an endpoint.

Returns

None

  • disassociate_endpoint(session, endpoint_id) โ€” disassociate endpoint from project. ๐Ÿ’”

Parameters

  • session โ€” The session to use for making this request.
  • endpoint_id โ€” The ID of an endpoint.

Returns

None


๐Ÿฆ‹ openstack.identity.v3.region

๐Ÿ’… The Region Class

The Region class inherits from Resource <#openstack.resource.Resource>. Regional queen behavior, no cap. ๐Ÿ‘‘

class openstack.identity.v3.region.Region(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ˜Œ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ”’
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿงช
  • resource_key = 'region' โ€” singular form of key for resource ๐ŸŽ€
  • resources_key = 'regions' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/regions' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” allow create operation for this resource โœ…
  • allow_fetch = True โ€” allow get operation for this resource โœ…
  • allow_commit = True โ€” allow update operation for this resource โœ…
  • allow_delete = True โ€” allow delete operation for this resource โœ…
  • allow_list = True โ€” allow list operation for this resource โœ…
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. ๐Ÿ’…
  • description โ€” user-facing description of the region. Type: string ๐Ÿ“
  • links โ€” the links for the region resource ๐Ÿ”—
  • parent_region_id โ€” ID of parent region, if any. Type: string ๐Ÿงฌ

๐ŸŒˆ openstack.identity.v3.registered_limit

๐ŸŽ€ The RegisteredLimit Class

The RegisteredLimit class inherits from Resource <#openstack.resource.Resource>. Limits? Registered. Vibes? Immaculate. โœจ

class openstack.identity.v3.registered_limit.RegisteredLimit(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ˜Œ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ”’
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿงช
  • resource_key = 'registered_limit' โ€” singular form of key for resource ๐ŸŽ€
  • resources_key = 'registered_limits' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/registered_limits' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” allow create operation for this resource โœ…
  • allow_fetch = True โ€” allow get operation for this resource โœ…
  • allow_commit = True โ€” allow update operation for this resource โœ…
  • allow_delete = True โ€” allow delete operation for this resource โœ…
  • allow_list = True โ€” allow list operation for this resource โœ…
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. ๐Ÿ’…
  • create_opts โ€” CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key='registered_limits', method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True). Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). ๐Ÿ› ๏ธ
  • description โ€” user-facing description of the registered_limit. Type: string ๐Ÿ“
  • links โ€” the links for the registered_limit resource ๐Ÿ”—
  • service_id โ€” ID of service. Type: string ๐Ÿ›Ž๏ธ
  • region_id โ€” ID of region, if any. Type: string ๐ŸŒ
  • resource_name โ€” the resource name. Type: string ๐Ÿท๏ธ
  • default_limit โ€” the default limit value. Type: int ๐Ÿ”ข

๐ŸŒธ openstack.identity.v3.role

๐Ÿ‘‘ The Role Class

The Role class inherits from Resource <#openstack.resource.Resource>. It's giving main-character permissions, fr fr. ๐Ÿ’…

class openstack.identity.v3.role.Role(_synchronized=False,
connection=None, **attrs)

The base resource ๐Ÿ˜Œ

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ”’
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿงช
  • resource_key = 'role' โ€” singular form of key for resource ๐ŸŽ€
  • resources_key = 'roles' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/roles' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” allow create operation for this resource โœ…
  • allow_fetch = True โ€” allow get operation for this resource โœ…
  • allow_commit = True โ€” allow update operation for this resource โœ…
  • allow_delete = True โ€” allow delete operation for this resource โœ…
  • allow_list = True โ€” allow list operation for this resource โœ…
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. ๐Ÿ’…
  • name โ€” the role's unique name, scoped inside the domain that owns it. Type: string
    • description โ€” the user-facing description of the role. Type: string
    • domain_id โ€” references the domain ID that owns the role. Type: string
    • options โ€” the resource options for the role. Heads up bestie: the available resource options are immutable, so no take-backsies. ๐Ÿซถ
    • links โ€” the links for the service resource.

openstack.identity.v3.role_assignment

The RoleAssignment Class โœจ

The RoleAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_assignment.RoleAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” nope, don't touch this one directly, it's not meant to be used like that. Peep new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
  • connection โ€” a reference to the Connection being used. Defaults to None so you can make Resource objects without an active Connection (think unit tests, iconic behaviour). Any use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'role_assignment' โ€” singular form of key for resource.
  • resources_key = 'role_assignments' โ€” plural form of key for resource.
  • base_path = '/role_assignments' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • links โ€” the links for the service resource.
  • role โ€” the role (dictionary contains only id).
  • scope โ€” the scope (either domain or project; dictionary contains only id).
  • user โ€” the user (dictionary contains only id).
  • group โ€” the group (dictionary contains only id).

openstack.identity.v3.role_domain_group_assignment

The RoleDomainGroupAssignment Class ๐Ÿฆ‹

The RoleDomainGroupAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_domain_group_assignment.RoleDomainGroupAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” again, not for direct use, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Code that uses self._connection should guard with a None check.
  • resource_key = 'role' โ€” singular form of key for resource.
  • resources_key = 'roles' โ€” plural form of key for resource.
  • base_path = '/domains/%(domain_id)s/groups/%(group_id)s/roles' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • name โ€” name of the role. Type: string
  • links โ€” the links for the service resource.
  • domain_id โ€” the ID of the domain to list assignment from. Type: string
  • group_id โ€” the ID of the group to list assignment from. Type: string

openstack.identity.v3.role_domain_user_assignment

The RoleDomainUserAssignment Class ๐ŸŽ€

The RoleDomainUserAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_domain_user_assignment.RoleDomainUserAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource ๐Ÿ’–

Parameters

  • _synchronized โ€” do not use directly, fr fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. self._connection usage inside Resource code should protect itself with a None check.
  • resource_key = 'role' โ€” singular form of key for resource.
  • resources_key = 'roles' โ€” plural form of key for resource.
  • base_path = '/domains/%(domain_id)s/users/%(user_id)s/roles' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • name โ€” name of the role. Type: string
  • links โ€” the links for the service resource.
  • domain_id โ€” the ID of the domain to list assignment from. Type: string
  • user_id โ€” the ID of the user to list assignment from. Type: string

openstack.identity.v3.role_project_group_assignment

The RoleProjectGroupAssignment Class ๐ŸŒธ

The RoleProjectGroupAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_project_group_assignment.RoleProjectGroupAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource โญ

Parameters

  • _synchronized โ€” not meant to be used directly, okay? See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'role' โ€” singular form of key for resource.
  • resources_key = 'roles' โ€” plural form of key for resource.
  • base_path = '/projects/%(project_id)s/groups/%(group_id)s/roles' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • name โ€” name of the role. Type: string
  • links โ€” the links for the service resource.
  • project_id โ€” the ID of the project to list assignment from. Type: string
  • group_id โ€” the ID of the group to list assignment from. Type: string

openstack.identity.v3.role_project_user_assignment

The RoleProjectUserAssignment Class ๐Ÿงš

The RoleProjectUserAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_project_user_assignment.RoleProjectUserAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” this one's not for direct use, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'role' โ€” singular form of key for resource.
  • resources_key = 'roles' โ€” plural form of key for resource.
  • base_path = '/projects/%(project_id)s/users/%(user_id)s/roles' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • name โ€” name of the role. Type: string
  • links โ€” the links for the service resource.
  • project_id โ€” the ID of the project to list assignment from. Type: string
  • user_id โ€” the ID of the user to list assignment from. Type: string

openstack.identity.v3.role_system_group_assignment

The RoleSystemGroupAssignment Class ๐Ÿ”ฅ

The RoleSystemGroupAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_system_group_assignment.RoleSystemGroupAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” no direct use, ngl. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'role' โ€” singular form of key for resource.
  • resources_key = 'roles' โ€” plural form of key for resource.
  • base_path = '/system/groups/%(group_id)s/roles' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • group_id โ€” the ID of the group to list assignment from. Type: string
  • system_id โ€” the name of the system to list assignment from. Type: string

openstack.identity.v3.role_system_user_assignment

The RoleSystemUserAssignment Class ๐Ÿฆ‹

The RoleSystemUserAssignment class inherits from Resource <#openstack.resource.Resource>.

class openstack.identity.v3.role_system_user_assignment.RoleSystemUserAssignment(_synchronized=False,
        connection=None, **attrs)

The base resource ๐Ÿ’ซ

Parameters

  • _synchronized โ€” not intended to be used directly, periodt. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'role' โ€” singular form of key for resource.
  • allow_list = True โ€” allow the list operation for this resource โœจ
  • base_path = '/system/users/%(user_id)s/roles' โ€” the base part of the URI for this resource ๐ŸŽ€
  • resources_key = 'roles' โ€” the plural form of the key for the resource ๐Ÿ’…
  • allow_list = True โ€” allow the list operation for this resource โœจ
  • system_id โ€” the name of the system to list assignment from. Type: string
  • user_id โ€” the ID of the user to list assignment from. Type: string

๐ŸŒˆ openstack.identity.v3.service

๐Ÿ’– The Service Class

okay so the Service class inherits from Resource (that's <#openstack.resource.Resource> bestie, keep up ๐Ÿซถ).

class openstack.identity.v3.service.Service(_synchronized=False,
connection=None, **attrs)

The base resource ๐ŸŒธ

Parameters โ€” the deets ๐Ÿ‘‘

  • _synchronized โ€” literally not meant to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>) instead ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests ngl. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’€
  • resource_key = 'service' โ€” the singular form of the key for the resource
  • resources_key = 'services' โ€” the plural form of the key for the resource
  • base_path = '/services' โ€” the base part of the URI for this resource ๐Ÿฆ‹
  • allow_create = True โ€” allow the create operation for this resource โœจ
  • allow_fetch = True โ€” allow the get operation for this resource โœจ
  • allow_commit = True โ€” allow the update operation for this resource โœจ
  • allow_delete = True โ€” allow the delete operation for this resource โœจ
  • allow_list = True โ€” allow the list operation for this resource โœจ
  • commit_method = 'PATCH' โ€” the method for committing a resource. This must be PATCH if allow_patch is True ๐Ÿ’…
  • description โ€” user-facing description of the service. Type: string
  • is_enabled โ€” setting this value to False prevents the service and its endpoints from appearing in the service catalog. Type: bool
  • links โ€” the links for the service resource
  • name โ€” user-facing name of the service. Type: string
  • type โ€” describes the API implemented by the service. The following values are recognized within the OpenStack ecosystem: compute, image, ec2, identity, volume, network. To support non-core and future projects, the value should not be validated against this list. Type: string ๐Ÿ”ฅ

๐Ÿฆ‹ openstack.identity.v3.system

๐Ÿ’œ The System Class

the System class inherits from Resource (<#openstack.resource.Resource>), obviously ๐Ÿ’…

class openstack.identity.v3.system.System(_synchronized=False,
connection=None, **attrs)

The base resource ๐ŸŒธ

Parameters โ€” again, the essentials ๐ŸŽ€

  • _synchronized โ€” not intended to be used directly, periodt. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>)
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ™ˆ
  • resource_key = 'system' โ€” the singular form of the key for the resource
  • base_path = '/system' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • assign_role_to_user(session, user, role) โ€” assign role to user on system โœจ
  • validate_user_has_role(session, user, role) โ€” validates that a user has a role on a system ๐Ÿ‘‘
  • unassign_role_from_user(session, user, role) โ€” unassigns a role from a user on a system ๐Ÿ’€
  • assign_role_to_group(session, group, role) โ€” assign role to group on system โœจ
  • validate_group_has_role(session, group, role) โ€” validates that a group has a role on a system ๐Ÿ‘‘
  • unassign_role_from_group(session, group, role) โ€” unassigns a role from a group on a system ๐Ÿ’€

๐ŸŽ€ openstack.identity.v3.token

โญ The Token Class

the Token class inherits from Resource (<#openstack.resource.Resource>) ๐Ÿซถ

class openstack.identity.v3.token.Token(_synchronized=False,
connection=None, **attrs)

The base resource ๐ŸŒธ

Parameters ๐Ÿ’–

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>)
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ™ˆ
  • resource_key = 'token' โ€” the singular form of the key for the resource
  • base_path = '/auth/tokens' โ€” the base part of the URI for this resource ๐Ÿ”ฅ
  • allow_fetch = False โ€” allow get operation for this resource
  • allow_delete = False โ€” allow delete operation for this resource
  • allow_list = False โ€” allow list operation for this resource
  • allow_head = False โ€” allow head operation for this resource ๐Ÿ’€
  • subject_token โ€” an authentication token. This is used rather than X-Auth-Token to allow users to check or revoke a token other than their own ๐ŸŽ€
  • audit_ids โ€” a list of one or two audit IDs. An audit ID is a unique, randomly generated, URL-safe string that you can use to track a token. The first audit ID is the current audit ID for the token. The second audit ID is present for only re-scoped tokens and is the audit ID from the token before it was re-scoped. A re-scoped token is one that was exchanged for another token of the same or different scope. You can use these audit IDs to track the use of a token or chain of tokens across multiple requests and endpoints without exposing the token ID to non-privileged users ๐Ÿ‘€ super useful ngl
  • catalog โ€” the service catalog ๐Ÿฆ‹
  • expires_at โ€” the date and time when the token expires
  • issued_at โ€” the date and time when the token was issued
  • methods โ€” the authentication method
  • user โ€” the user that owns the token
  • project โ€” the project that the token is scoped to, if any
  • domain โ€” the domain that the token is scoped to, if any
  • is_domain โ€” whether the project, if set, is acting as a domain
  • system โ€” the parts of the system the token is scoped to, if system-scoped
  • roles โ€” the roles associated with the user ๐Ÿ’…

๐ŸŒธ openstack.identity.v3.trust

๐Ÿงš The Trust Class

the Trust class inherits from Resource (<#openstack.resource.Resource>) ๐Ÿซถ

class openstack.identity.v3.trust.Trust(_synchronized=False,
connection=None, **attrs)

The base resource ๐ŸŒˆ

Parameters ๐Ÿ’–

  • _synchronized โ€” not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>)
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ™ˆ
  • resource_key = 'trust' โ€” the singular form of the key for the resource
  • resources_key = 'trusts' โ€” the plural form of the key for the resource
  • base_path = '/OS-TRUST/trusts' โ€” the base part of the URI for this resource โœจ
  • allow_create = True โ€” allow create operation for this resource โœจ
  • allow_fetch = True โ€” allow get operation for this resource โœจ
  • allow_delete = True โ€” allow delete operation for this resource โœจ
  • allow_list = True โ€” allow list operation for this resource โœจ
  • allow_redelegation โ€” a boolean indicating whether the trust can be issued by the trustee as a regulart trust. Default is False ๐ŸŽ€ (yes bestie, "regulart" is exactly what the original says, don't come for me ๐Ÿ’€)
  • expires_at โ€” specifies the expiration time of the trust. A trust may be revoked ahead of expiration. If the value represents a time in the past, the trust is deactivated โฐ
  • is_impersonation โ€” if impersonation is set to true, then the user attribute of tokens that are generated based on the trust will represent that of the trustor rather than the trustee, thus allowing the trustee to impersonate the trustor. If impersonation is set to False, then the token's user attribute will represent that of the trustee. Type: bool ๐Ÿ‘€
  • links โ€” links for the trust resource
  • project_id โ€” ID of the project upon which the trustor is delegating authorization. Type: string
  • role_links โ€” a role links object that includes 'next', 'previous', and self links for roles ๐Ÿ”—
  • roles โ€” specifies the subset of the trustor's roles on the project_id to be granted to the trustee when the token is consumed. The trustor must already be granted these roles in the project referenced by the project_id attribute. Type: list ๐Ÿ‘‘
  • redelegated_trust_id โ€” returned with redelegated trust provides information about the predecessor in the trust chain ๐Ÿฆ‹
  • redelegation_count โ€” redelegation count ๐Ÿ”ข
  • remaining_uses โ€” how many times this trust can be used to get a token. Every time a token gets issued through the trust, the value goes down. Once it hits zero, no more tokens get issued through the trust. That's the whole vibe.
  • trustee_user_id โ€” the user ID of the person who can actually consume the trust. Type: string
  • trustor_user_id โ€” the user ID of the person who created the trust and whose authorization is being delegated. Type: string

โœจ openstack.identity.v3.user โœจ

๐Ÿ’– The User Class ๐Ÿ’–

The User class inherits from Resource (openstack.resource.Resource). Iconic.

class openstack.identity.v3.user.User(_synchronized=False,
connection=None, **attrs)

The base resource. Constructor params, bestie:

  • _synchronized โ€” not meant to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. If Resource code uses self._connection, it should guard with a None check.
  • resource_key = 'user' โ€” singular form of the key for this resource.
  • resources_key = 'users' โ€” plural form of the key for this resource.
  • base_path = '/users' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • default_project_id โ€” references the user's default project ID to authorize against, if the API user doesn't explicitly specify one when creating a token. Setting this attribute does not grant any actual authorization on the project โ€” it's just there for the user's convenience. So yes, the referenced project doesn't even need to exist within the user's domain. New in version 3.1: if the user doesn't have authorization to their default project, the default project gets ignored at token creation. Type: string
  • description โ€” the description of this user. Type: string
  • domain_id โ€” references the domain ID that owns the user. If the client doesn't specify a domain ID, the Identity service implementation defaults it to the domain ID the client's token is scoped to. Type: string
  • email โ€” the email of this user. Type: string
  • is_enabled โ€” setting this to False stops the user from authenticating or receiving authorization. Also, every pre-existing token held by the user is immediately invalidated. Re-enabling the user does not re-enable those pre-existing tokens. Type: bool
  • links โ€” the links for the user resource.
  • name โ€” unique user name within the owning domain. Type: string
  • password โ€” the default form of credential used during authentication. Type: string
  • password_expires_at โ€” the date and time when the password expires. Time zone is UTC. A None value means the password never expires.
This is a response object attribute, not valid for requests. New in version 3.7.
  • federated โ€” list of federated identity mappings associated with the user. Each item contains idp_id and protocols (a list of objects with protocol_id and unique_id). New in version 3.14.
  • options โ€” a dictionary of the user's extra options.
  • update_password(session, current_password, password) โ€” update the password for this user. Params:
    • session โ€” the session to use for the request.
    • current_password (str) โ€” the user's current password.
    • password (str) โ€” the user's new password.

๐ŸŒˆ Other Resources ๐ŸŒˆ

๐Ÿ’œ openstack.identity.version ๐Ÿ’œ

The Version Class

The Version class inherits from Resource (openstack.resource.Resource). Slay.

class openstack.identity.version.Version(_synchronized=False,
connection=None, **attrs)

The base resource. Params:

  • _synchronized โ€” not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'version' โ€” singular form of the key for this resource.
  • resources_key = 'versions' โ€” plural form of the key for this resource.
  • base_path = '/' โ€” the base part of the URI for this resource.
  • allow_list = True โ€” allow list operation for this resource.
classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, headers=None, **params)

This method is a generator that yields resource objects. It handles pagination and takes query params for response filtering. Params:

  • session โ€” the session to use for making this request.
  • paginated โ€” True if a GET to this resource returns a paginated series of responses, or False if a GET returns only one page of data. When paginated is False, only one page of data will be returned regardless of the API's support of pagination.
  • base_path โ€” base part of the URI for listing resources, if different from base_path (openstack.resource.Resource.base_path).
  • allow_unknown_params โ€” True to accept, but discard, unknown query parameters. This allows getting a list of 'filters' and passing everything known to the server. False will result in a validation exception when unknown query parameters are passed.
  • microversion โ€” API version to override the negotiated one.
  • headers โ€” additional headers to inject into the HTTP request.
  • max_items โ€” the maximum number of items to return. Typically this must be used with paginated=True.
  • params โ€” these keyword arguments are passed through the _transpose() method to find if any of them match expected query parameters to be sent in the params argument to get(). They're additionally checked against the base_path (openstack.resource.Resource.base_path) format string to see if any path fragments need to be filled in by the contents of this argument. Parameters supported as filters by the server side are passed in the API call, remaining parameters are applied as filters to the retrieved results.

Returns: a generator of Resource objects.

Raises: MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_list is not set to True.

Raises: InvalidResourceQuery (openstack.exceptions.InvalidResourceQuery) if query contains invalid params.


๐Ÿฆ‹ Image Resources ๐Ÿฆ‹

๐ŸŒธ Image v1 Resources ๐ŸŒธ

๐Ÿ’… openstack.image.v1.image ๐Ÿ’…

The Image Class

The Image class inherits from Resource (openstack.resource.Resource). Periodt.

class openstack.image.v1.image.Image(_synchronized=False,
connection=None, **attrs)

The base resource. Params:

  • _synchronized โ€” this is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'image' โ€” singular form of the key for this resource.
  • resources_key = 'images' โ€” plural form of the key for this resource.
  • base_path = '/images' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • checksum โ€” hash of the image data used. The Image service uses this value for verification.
  • container_format โ€” so this one's about whether the VM image lives in a file format that also carries metadata about the actual VM. Container formats include OVF and Amazon AMI. Also? A VM image might straight up have no container format at all โ€” in which case it's just a blob of unstructured data, no thoughts, head empty ๐Ÿ’…
  • copy_from โ€” a URL to copy an image from โœจ
  • created_at โ€” the timestamp when this image was created ๐ŸŽ€
  • disk_format โ€” valid values are: aki, ari, ami, raw, iso, vhd, vdi, qcow2, or vmdk. The disk format of a VM image is the format of the underlying disk image. Virtual appliance vendors all have different formats for laying out the info contained in a VM disk image โ€” iconic of them, honestly ๐Ÿฆ‹
  • is_protected โ€” defines whether the image can be deleted. Type: bool ๐Ÿ”’
  • is_public โ€” True if this is a public image. Type: bool
  • location โ€” a location for the image identified by a URI
  • min_disk โ€” the minimum disk size in GB that is required to boot the image ๐Ÿ’พ
  • min_ram โ€” the minimum amount of RAM in MB that is required to boot the image
  • name โ€” name for the image. Note that the name of an image is not unique to a Glance node. The API cannot expect users to know the names of images owned by others ๐Ÿ‘€
  • owner โ€” the ID of the owner, or project, of the image
  • owner_id โ€” the ID of the owner, or project, of the image (backwards compat)
  • properties โ€” properties, if any, that are associated with the image
  • size โ€” the size of the image data, in bytes
  • status โ€” the image status
  • updated_at โ€” the timestamp when this image was last updated โญ

๐ŸŒธ classmethod find(session, name_or_id, ignore_missing=True, list_base_path=None, *, microversion=None, all_projects=None, **params)

Find a resource by its name or id, bestie. That's the whole vibe ๐Ÿซถ

Parameters

  • session (Adapter) โ€” the session to use for making this request.
  • name_or_id โ€” this resource's identifier, if needed by the request. The default is None.
  • ignore_missing (bool) โ€” when set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • params (dict) โ€” any additional parameters to be passed into underlying methods, such as to existing() in order to pass on URI parameters.

Returns

The Resource object matching the given name or id, or None if nothing matches ๐Ÿ˜ญ

Raises

openstack.exceptions.DuplicateResource if more than one resource is found for this request.

Raises

openstack.exceptions.NotFoundException if nothing is found and ignore_missing is False.


๐Ÿ’œ Image v2 Resources

openstack.image.v2.image

๐Ÿ‘‘ The Image Class

The Image class inherits from Resource.

โœจ class openstack.image.v2.image.Image(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'images' โ€” plural form of key for resource.
  • base_path = '/images' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource โœ…
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_patch = True โ€” allow patch operation for this resource.
  • commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. No cap, that's the rule ๐Ÿ”ฅ
  • checksum โ€” hash of the image data used. The Image service uses this value for verification.
  • container_format โ€” the container format refers to whether the VM image is in a file format that also contains metadata about the actual VM. Container formats include OVF and Amazon AMI. In addition, a VM image might not have a container format โ€” instead, the image is just a blob of unstructured data.
  • created_at โ€” the date and time when the image was created.
  • disk_format โ€” valid values are: aki, ari, ami, raw, iso, vhd, vdi, qcow2, or vmdk. The disk format of a VM image is the format of the underlying disk image. Virtual appliance vendors have different formats for laying out the information contained in a VM disk image.
  • is_hidden โ€” this field controls whether an image is displayed in the default image-list response ๐Ÿ™ˆ
  • is_protected โ€” defines whether the image can be deleted. Type: bool
  • hash_algo โ€” the algorithm used to compute a secure hash of the image data for this image ๐Ÿ”
  • hash_value โ€” the hexdigest of the secure hash of the image data computed using the algorithm whose name is the value of the os_hash_algo property.
  • min_disk โ€” the minimum disk size in GB that is required to boot the image.
  • min_ram โ€” the minimum amount of RAM in MB that is required to boot the image.
  • name โ€” the name of the image.
  • owner โ€” the ID of the owner, or project, of the image.
  • owner_id โ€” the ID of the owner, or project, of the image (backwards compat).
  • properties โ€” properties, if any, that are associated with the image.
  • size โ€” the size of the image data, in bytes.
  • store โ€” when present, Glance will attempt to store the disk image data in the backing store indicated by the value of the header. When not present, Glance will store the disk image data in the backing store that is marked default. Valid values are: file, s3, rbd, swift, cinder, gridfs, sheepdog, or vsphere ๐ŸŒˆ
  • status โ€” the image status.
  • updated_at โ€” the date and time when the image was updated.
  • virtual_size โ€” the virtual size of the image.
  • visibility โ€” the image visibility ๐Ÿ‘๏ธ
  • file โ€” the URL for the virtual machine image file.
  • locations โ€” a list of URLs to access the image file in external store. This list appears if the show_multiple_locations option is set to true in the Image service's configuration file.
  • direct_url โ€” the URL to access the image file kept in external store. It appears when you set the show_image_direct_url option to true in the Image service's configuration file.
  • url โ€” the URL to access the image file kept in external store.
  • metadata โ€” the location metadata.
  • architecture โ€” the CPU architecture that must be supported by the hypervisor ๐Ÿ–ฅ๏ธ
  • hypervisor_type โ€” the hypervisor type. Note that qemu is used for both QEMU and KVM hypervisor types.
  • instance_type_rxtx_factor โ€” optional property allows created servers to have a different bandwidth cap than that defined in the network they are attached to.
  • instance_uuid โ€” create this image. (that's genuinely all it says, bestie, I'm not hiding anything from you ๐Ÿ˜ญ)
  • needs_config_drive โ€” specifies whether the image needs a config drive. mandatory or optional (default if property is not used).
  • kernel_id โ€” the ID of an image stored in the Image service that should be used as the kernel when booting an AMI-style image.
  • os_distro โ€” the common name of the operating system distribution in lowercase.
  • os_version โ€” the operating system version as specified by the distributor.
  • needs_secure_boot โ€” Secure Boot is a security standard. When the instance starts, Secure Boot first examines software such as firmware and OS by their signature and only allows them to run if the signatures are valid ๐Ÿ”’
  • os_shutdown_timeout โ€” time for graceful shutdown.
  • ramdisk_id โ€” the ID of image stored in the Image service that should be used as the ramdisk when booting an AMI-style image.
  • vm_mode โ€” the virtual machine mode. This represents the host/guest ABI (application binary interface) used for the virtual machine.
  • hw_cpu_sockets โ€” the preferred number of sockets to expose to the guest.
  • hw_cpu_cores โ€” the preferred number of cores to expose to the guest. ๐Ÿงš
  • hw_cpu_threads โ€” the preferred number of threads to expose to the guest. ๐Ÿ’ป
  • hw_disk_bus โ€” specifies the type of disk controller to attach disk devices to. One of scsi, virtio, uml, xen, ide, or usb.
  • hw_cpu_policy โ€” used to pin the virtual CPUs (vCPUs) of instances to the host's physical CPU cores (pCPUs). ๐Ÿ“Œ
  • hw_cpu_thread_policy โ€” defines how hardware CPU threads in a simultaneous multithreading-based (SMT) architecture get used.
  • hw_rng_model โ€” adds a random-number generator device to the image's instances. ๐ŸŽฒ
  • hw_machine_type โ€” for libvirt: enables booting an ARM system using the specified machine type. For Hyper-V: specifies whether the Hyper-V instance will be a generation 1 or generation 2 VM.
  • hw_scsi_model โ€” enables the use of VirtIO SCSI (virtio-scsi) to provide block device access for compute instances; by default, instances use VirtIO Block (virtio-blk).
  • hw_serial_port_count โ€” specifies the count of serial ports that should be provided.
  • hw_video_model โ€” the video image driver used. ๐ŸŽฌ
  • hw_video_ram โ€” maximum RAM for the video image.
  • hw_watchdog_action โ€” enables a virtual hardware watchdog device that carries out the specified action if the server hangs. ๐Ÿ•
  • os_command_line โ€” the kernel command line to be used by the libvirt driver, instead of the default.
  • hw_vif_model โ€” specifies the model of virtual network interface device to use.
  • is_hw_vif_multiqueue_enabled โ€” if true, this enables the virtio-net multiqueue feature. In this case, the driver sets the number of queues equal to the number of guest vCPUs. This makes the network performance scale across a number of vCPUs. ๐ŸŒ
  • is_hw_boot_menu_enabled โ€” if true, enables the BIOS bootmenu.
  • vmware_adaptertype โ€” the virtual SCSI or IDE controller used by the hypervisor.
  • vmware_ostype โ€” a VMware GuestID which describes the operating system installed in the image.
  • has_auto_disk_config โ€” if true, the root partition on the disk is automatically resized before the instance boots. ๐Ÿ› ๏ธ
  • os_type โ€” the operating system installed on the image.
  • os_admin_user โ€” the operating system admin username.
  • hw_qemu_guest_agent โ€” a string boolean, which if "true", QEMU guest agent will be exposed to the instance.
  • os_require_quiesce โ€” if true, require quiesce on snapshot via QEMU guest agent.
  • schema โ€” the URL for the schema describing a virtual machine image. ๐Ÿ”—

  • deactivate(session) โ€” deactivate an image.
Note: only administrative users can view image locations for deactivated images. ๐Ÿ™ˆ
  • reactivate(session) โ€” reactivate an image.
Note: the image must exist in order to be reactivated.

๐Ÿ’… upload(session, *, data=None, size=None)

Upload data into an existing image. ๐Ÿซถ

Parameters:

  • session โ€” the session to use for making this request.
  • data โ€” optional data to be uploaded. If not provided, the ~Image.data attribute will be used.
  • size โ€” optional size of the data in bytes. Providing this allows Glance to pre-allocate storage and can improve upload performance. If not provided and data is a file-like object, the size will be calculated automatically.

Returns: the server response.

๐ŸŽ€ stage(session, *, data=None, size=None)

Stage binary image data into an existing image. โœจ

Parameters:

  • session โ€” the session to use for making this request.
  • data โ€” optional data to be uploaded. If not provided, the ~Image.data attribute will be used.
  • size โ€” optional size of the data in bytes. Providing this allows Glance to pre-allocate storage and can improve upload performance. If not provided and data is a file-like object, the size will be calculated automatically.

Returns: the server response.

๐ŸŒˆ import_image(session, method='glance-direct', *, uri=None, remote_region=None, remote_image_id=None, remote_service_interface=None, store=None, stores=None, all_stores=None, all_stores_must_succeed=None)

Import Image via interoperable image import process. ๐Ÿ”ฅ

โญ classmethod find

classmethod find(session, name_or_id, ignore_missing=True,
list_base_path=None, *, microversion=None, all_projects=None,
**params)

Find a resource by its name or id. ๐Ÿ”Ž

Parameters:

  • session โ€” the session to use for making this request.
  • name_or_id โ€” this resource's identifier, if needed by the request. The default is None.
  • ignore_missing โ€” when set to False, NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • list_base_path โ€” base_path to be used when you need listing resources.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” any additional parameters to be passed into underlying methods, such as to existing() in order to pass on URI parameters.

Returns: the Resource object matching the given name or id or None if nothing matches.

Raises openstack.exceptions.DuplicateResource if more than one resource is found for this request.

Raises openstack.exceptions.NotFoundException if nothing is found and ignore_missing is False.


๐Ÿฆ‹ openstack.image.v2.member

๐Ÿ’– The Member Class

The Member class inherits from Resource. ๐Ÿซถ

class openstack.image.v2.member.Member(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'members' โ€” plural form of key for resource.
  • base_path = '/images/%(image_id)s/members' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • member_id โ€” the ID of the image member. An image member is a tenant with whom the image is shared. ๐Ÿ‘ฏ
  • created_at โ€” the date and time when the member was created.
  • image_id โ€” image ID stored through the image API. Typically a UUID.
  • status โ€” the status of the image.
  • schema โ€” the URL for schema of the member.
  • updated_at โ€” the date and time when the member was updated.

๐ŸŒธ openstack.image.v2.metadef_namespace

๐ŸŽ€ The MetadefNamespace Class

The MetadefNamespace class inherits from Resource. โœจ

class
openstack.image.v2.metadef_namespace.MetadefNamespace(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'namespaces' โ€” plural form of key for resource.
  • base_path = '/metadefs/namespaces' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • delete_all_properties(session) โ€” delete all properties in a namespace. ๐Ÿงน

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” the server response. ๐Ÿ’…

delete_all_objects(session)

Delete all objects in a namespace.

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” the server response.

add_tag(session, tag)

Adds a single tag to the resource.

Parameters

  • session โ€” the session to use for making this request.
  • tag โ€” the tag as a string.

set_tags(session, tags, append=False)

Sets/Replaces all tags on the resource.

Parameters

  • session โ€” the session to use for making this request.
  • tags (list) โ€” list with tags to be set on the resource.
  • append โ€” if set to true, adds new tags to existing tags, else overwrites the existing tags with new ones.

๐Ÿฆ‹ openstack.image.v2.metadef_object

The MetadefObject Class

The MetadefObject class inherits from Resource (<#openstack.resource.Resource>). ๐Ÿซถ

class openstack.image.v2.metadef_object.MetadefObject(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'objects' โ€” plural form of key for resource.

base_path = '/metadefs/namespaces/%(namespace_name)s/objects' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

name โ€” the name of this resource.


๐ŸŒธ openstack.image.v2.metadef_property

The MetadefProperty Class

The MetadefProperty class inherits from Resource (<#openstack.resource.Resource>). โœจ

class openstack.image.v2.metadef_property.MetadefProperty(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/metadefs/namespaces/%(namespace_name)s/properties' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

namespace_name โ€” an identifier (a name) for the namespace.

name โ€” the name of the property.

type โ€” the property type.

title โ€” the title of the property.

description โ€” detailed description of the property.

operators โ€” a list of operator.

default โ€” default property description.

is_readonly โ€” indicates whether this is a read-only property.

minimum โ€” minimum allowed numerical value.

maximum โ€” maximum allowed numerical value.

enum โ€” enumerated list of property values.

pattern โ€” a regular expression (ECMA 262, http://www.ecma-international.org/publications/standards/Ecma-262.htm) that a string value must match.

min_length โ€” minimum allowed string length.

max_length โ€” maximum allowed string length.

items โ€” schema for the items in an array.

require_unique_items โ€” indicates whether all values in the array must be distinct.

min_items โ€” minimum length of an array.

max_items โ€” maximum length of an array.

allow_additional_items โ€” describes extra items, if you use tuple typing. If the value of items is an array (tuple typing) and the instance is longer than the list of schemas in items, the additional items are described by the schema in this property. If this value is false, the instance cannot be longer than the list of schemas in items. If this value is true, that is equivalent to the empty schema (anything goes).

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, **params)

This method is a generator which yields resource objects.

A re-implementation of list() (<#openstack.resource.Resource.list>) that handles glance's single, unpaginated list implementation.

Refer to list() (<#openstack.resource.Resource.list>) for full documentation including parameter, exception and return type documentation.


๐Ÿ’œ openstack.image.v2.metadef_resource_type

The MetadefResourceType Class

The MetadefResourceType class inherits from Resource (<#openstack.resource.Resource>). ๐Ÿ”ฅ

class openstack.image.v2.metadef_resource_type.MetadefResourceType(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'resource_types' โ€” plural form of key for resource.

base_path = '/metadefs/resource_types' โ€” the base part of the URI for this resource.

allow_list = True โ€” allow list operation for this resource.

name โ€” the name of metadata definition resource type.

created_at โ€” the date and time when the resource type was created.

updated_at โ€” the date and time when the resource type was updated.


The MetadefResourceTypeAssociation Class

The MetadefResourceTypeAssociation class inherits from Resource (<#openstack.resource.Resource>). ๐ŸŽ€

class openstack.image.v2.metadef_resource_type.MetadefResourceTypeAssociation(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'resource_type_associations' โ€” plural form of key for resource.

base_path = '/metadefs/namespaces/%(namespace_name)s/resource_types' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

namespace_name โ€” the name of the namespace whose details you want to see.

name โ€” the name of metadata definition resource type.

created_at โ€” the date and time when the resource type was created.

updated_at โ€” the date and time when the resource type was updated.

prefix โ€” prefix for any properties in the namespace that you want to apply to the resource type. If you specify a prefix, you must append a prefix separator, such as the colon (:) character.

properties_target โ€” some resource types allow more than one key and value pair for each instance. For example, the Image service allows both user and image metadata on volumes. The properties_target parameter enables a namespace target to remove the ambiguity.


๐Ÿฆ‹ openstack.image.v2.metadef_schema

The MetadefSchema Class

The MetadefSchema class inherits from Resource (<#openstack.resource.Resource>). ๐ŸŒˆ

class openstack.image.v2.metadef_schema.MetadefSchema(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” bestie do NOT touch this one directly, it's not meant for you ๐Ÿ’… peep new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
    • connection โ€” a reference to the Connection that's being used. It defaults to None so Resource objects can exist without an active Connection, like in unit tests, no cap. And any self._connection usage in Resource code better guard itself with a None check, fr fr.

base_path = '/schemas/metadefs' โ€” the base part of the URI for this resource. iconic little prefix โœจ

allow_fetch = True โ€” allow get operation for this resource. we love a readable resource ๐Ÿซถ

additional_properties โ€” a boolean value that indicates allows users to add custom properties.

definitions โ€” a set of definitions.

required โ€” a list of required resources.

properties โ€” schema properties. yes those are the actual words, it's giving minimalist ๐ŸŒธ


๐Ÿฆ‹ openstack.image.v2.service_info ๐Ÿฆ‹

โญ The Store Class โญ

The Store class inherits from Resource <#openstack.resource.Resource>. ok lineage slay ๐Ÿ‘‘

class openstack.image.v2.service_info.Store(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'stores' โ€” plural form of key for resource. keys but make it plural ๐Ÿ’–

base_path = '/info/stores' โ€” the base part of the URI for this resource.

allow_list = True โ€” allow list operation for this resource. lists are literally her whole thing ๐Ÿ“‹

description โ€” description of the store

is_default โ€” default

properties โ€” (yes, that's the whole description, she said what she said ๐Ÿ™ˆ)

delete_image(session, image, *, ignore_missing=False) โ€” delete image from store

Parameters

  • session โ€” the session to use for making this request.
  • image โ€” the value can be either the ID of an image or a Image <#openstack.image.v2.image.Image> instance.

Returns โ€” the result of the delete if resource found, else None.

Raises โ€” NotFoundException <#openstack.exceptions.NotFoundException> when ignore_missing if False and a nonexistent resource is attempted to be deleted. so like, if you set it to False and the thing isn't there, it's gonna yell at you ๐Ÿ˜ญ


๐ŸŽ€ The Import Info Class ๐ŸŽ€

The Import class inherits from Resource <#openstack.resource.Resource>.

class openstack.image.v2.service_info.Import(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/info/import' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” allow get operation for this resource.

import_methods โ€” import methods


๐Ÿ’œ openstack.image.v2.task ๐Ÿ’œ

๐Ÿ‘‘ The Task Class ๐Ÿ‘‘

The Task class inherits from Resource <#openstack.resource.Resource>.

class openstack.image.v2.task.Task(_synchronized=False, connection=None,
**attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'tasks' โ€” plural form of key for resource.

base_path = '/tasks' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_list = True โ€” allow list operation for this resource.

created_at โ€” the date and time when the task was created.

expires_at โ€” the date and time when the task is subject to removal. bye bestie โณ

input โ€” a JSON object specifying the input parameters to the task.

message โ€” human-readable text, possibly an empty string, usually displayed in an error situation to provide more information about what has occurred.

owner_id โ€” the ID of the owner, or project, of the task.

result โ€” a JSON object specifying the outcome of the task.

schema โ€” the URL for schema of the task.

status โ€” the status of the task.

type โ€” the type of task represented by this content.

updated_at โ€” the date and time when the task was updated.


๐ŸŒˆ KeyManager Resources ๐ŸŒˆ

๐Ÿงš openstack.key_manager.v1.container ๐Ÿงš

๐ŸŒธ The Container Class ๐ŸŒธ

The Container class inherits from Resource <#openstack.resource.Resource>.

class openstack.key_manager.v1.container.Container(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'containers' โ€” plural form of key for resource.

base_path = '/containers' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource. she does it all, main character energy โœจ

container_ref โ€” a URI for this container

container_id โ€” the ID for this container

created_at โ€” the timestamp when this container was created.

name โ€” the name of this container

secret_refs โ€” a list of references to secrets in this container

status โ€” the status of this container

type โ€” the type of this container

updated_at โ€” the timestamp when this container was updated.

consumers โ€” a party interested in this container.


๐Ÿ“ openstack.key_manager.v1.container_acl ๐Ÿ“

๐Ÿ’… The ContainerACL Class ๐Ÿ’…

The ContainerACL class inherits from Resource <#openstack.resource.Resource>.

class
openstack.key_manager.v1.container_acl.ContainerACL(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/containers/%(container_id)s/acl' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = False โ€” allow list operation for this resource. nope, not this one ๐Ÿ™…โ€โ™€๏ธ

create_opts = ... โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). the full default is literally:

CreateOpts(request_key=<Unset.UNSET: 'UNSET'>,
response_key=<Unset.UNSET: 'UNSET'>, method='PUT',
requires_id=False, response_has_body=True)

commit_method = 'PATCH' โ€” method for committing a resource. This must be PATCH if allow_patch is True. โš ๏ธ like, for real, it must be ๐Ÿ’€

requires_id = False โ€” do calls for this resource require an ID.

container_id โ€” the ID of the container this ACL belongs to

acl_ref โ€” a URI for this container ACL

read โ€” read operation settings, e.g. {'users': [str], 'project-access': bool}.

created_at โ€” the timestamp when this ACL was created (ISO 8601 format)

updated_at โ€” the timestamp when this ACL was last updated (ISO 8601 format)


๐ŸŒŸ openstack.key_manager.v1.order ๐ŸŒŸ

๐Ÿฆ‹ The Order Class ๐Ÿฆ‹

The Order class inherits from Resource <#openstack.resource.Resource>.

class openstack.key_manager.v1.order.Order(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” bestie, do NOT pass this directly, it's not for you. See new() and existing() instead, they've got you.
  • connection โ€” a reference to the Connection being used. It defaults to None so you can make Resource objects without an active Connection, like in unit tests. And heads up: if you're using self._connection inside Resource code, guard it with a None check. No cap.

resources_key = 'orders' โ€” the plural form of the key for this resource.

base_path = '/orders' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

created_at โ€” timestamp in ISO8601 format of when the order was created.

creator_id โ€” Keystone Id of the user who created the order.

meta โ€” a dictionary containing key-value parameters which specify the details of an order request.

order_ref โ€” a URI for this order.

order_id โ€” the ID of this order.

secret_ref โ€” secret href associated with the order.

secret_id โ€” secret ID associated with the order.

sub_status โ€” metadata associated with the order.

sub_status_message โ€” metadata associated with the order.

updated_at โ€” timestamp in ISO8601 format of the last time the order was updated.


๐ŸŒธ openstack.key_manager.v1.project_quota โ€” the ProjectQuota Class ๐ŸŒธ

The ProjectQuota class inherits from Resource.

class openstack.key_manager.v1.project_quota.ProjectQuota(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’–

Parameters

  • _synchronized โ€” not intended to be used directly, fr. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'project_quotas' โ€” singular form of key for resource.

resources_key = 'project_quotas' โ€” plural form of key for resource.

base_path = '/project-quotas' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

secrets โ€” contains the configured quota value of the requested project for the secret resource.

orders โ€” contains the configured quota value of the requested project for the orders resource.

containers โ€” contains the configured quota value of the requested project for the containers resource.

consumers โ€” contains the configured quota value of the requested project for the consumers resource.

cas โ€” contains the configured quota value of the requested project for the CAs resource.


๐Ÿฆ‹ openstack.key_manager.v1.quota โ€” the Quota Class ๐Ÿฆ‹

The Quota class inherits from Resource.

class openstack.key_manager.v1.quota.Quota(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'quotas' โ€” singular form of key for resource.

resources_key = 'quotas' โ€” plural form of key for resource.

base_path = '/quotas' โ€” the base part of the URI for this resource.

allow_fetch = True โ€” allow get operation for this resource.

secrets โ€” contains the effective quota value of the current project for the secret resource.

orders โ€” contains the effective quota value of the current project for the orders resource.

containers โ€” contains the effective quota value of the current project for the containers resource.

consumers โ€” contains the effective quota value of the current project for the consumers resource.

cas โ€” contains the effective quota value of the current project for the CAs resource.

Lowkey note the difference here โ€” project_quota gives you the configured values for the requested project, and quota gives you the effective values for the current project. Two different vibes entirely ๐Ÿ’…

๐Ÿ‘‘ openstack.key_manager.v1.secret โ€” the Secret Class ๐Ÿ‘‘

The Secret class inherits from Resource.

class openstack.key_manager.v1.secret.Secret(_synchronized=False, connection=None, **attrs)

The base resource ๐ŸŽ€

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resources_key = 'secrets' โ€” plural form of key for resource.

base_path = '/secrets' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

algorithm โ€” metadata provided by a user or system for informational purposes.

bit_length โ€” metadata provided by a user or system for informational purposes. Value must be greater than zero, okay? like, non-negotiable.

content_types โ€” a list of content types.

expires_at โ€” once this timestamp has past, the secret will no longer be available. it's giving expiry date, bestie ๐Ÿ˜ญ

created_at โ€” timestamp of when the secret was created.

mode โ€” the type/mode of the algorithm associated with the secret information.

name โ€” the name of the secret set by the user.

secret_ref โ€” a URI to the secret.

secret_store_id โ€” computed UUID of the secret store currently holding the payload (microversion 1.3+; JSON null when N/A).

secret_store_ref โ€” computed HREF of the secret store currently holding the payload (microversion 1.3+; JSON null when N/A).

secret_type โ€” used to indicate the type of secret being stored.

status โ€” the status of this secret.

updated_at โ€” a timestamp when this secret was updated.

payload โ€” the secret's data to be stored. payload_content_type must also be supplied if payload is included. (optional)

payload_content_type โ€” the media type for the content of the payload. (required if payload is included)

payload_content_encoding โ€” the encoding used for the payload to be able to include it in the JSON request. Currently only base64 is supported. (required if payload is encoded)

๐Ÿซถ the payload trio is a package deal โ€” include payload without payload_content_type and it's a bad time. include an encoded payload without payload_content_encoding and, again, bad time.

fetch โ€” the glow-up method โœจ

fetch(session, requires_id=True, base_path=None, error_message=None, skip_cache=False, *, resource_response_key=None, microversion=None, **params)

Get a remote resource based on this instance. literally what it says on the tin.

Parameters

  • session โ€” the session to use for making this request.
  • requires_id โ€” whether resource ID should be part of the requested URI.
  • base_path โ€” base part of the URI for fetching resources, if different from base_path.
  • error_message โ€” an error message to be returned if requested object does not exist.
  • skip_cache โ€” a boolean indicating whether optional API cache should be skipped for this invocation.
  • resource_response_key โ€” overrides the usage of self.resource_key when processing the response body.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional parameters that can be consumed.
๐Ÿ“ heads up on the signature: everything after that lone * is keyword-only, so resource_response_key and microversion have to be passed by name. no sneaky positional business, iykyk.

Returns โ€” this Resource instance, bestie. Like, the whole thing. ๐Ÿ’…

Raises MethodNotSupported (<#openstack.exceptions.MethodNotSupported>) if Resource.allow_fetch is not set to True.

Raises NotFoundException (<#openstack.exceptions.NotFoundException>) if the resource literally was not found. gone. missing. ๐Ÿ˜ญ

migrate_store(session, secret_store_id, *, microversion=None)

Okay so this one migrates your secret onto a different secret store. Moving houses but for secrets ๐Ÿššโœจ

It requires key-manager microversion 1.3. But lowkey, prefer migrate_secret_store() instead โ€” that one actually enforces the microversion and accepts UUID/URI/SecretStore. iykyk ๐Ÿซถ

Parameters

  • session โ€” the session you're using to make this request.
  • secret_store_id โ€” destination store UUID (or, plot twist, the trailing path segment of a โ€ฆ/secret-stores/<uuid> URI).
  • microversion โ€” the API microversion to use. Defaults to the negotiated microversion for this resource.

Returns โ€” None. That's it. Nothing to show off. ๐Ÿคทโ€โ™€๏ธ


๐ŸŽ€ openstack.key_manager.v1.secret_acl ๐ŸŽ€

The SecretACL Class

The SecretACL class inherits from Resource (<#openstack.resource.Resource>). iconic behaviour honestly ๐Ÿ‘‘

class openstack.key_manager.v1.secret_acl.SecretACL(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly, bestie. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. And if you're using self._connection in Resource code, protect yourself with a check for None. fr fr, protect yourself. ๐Ÿซถ

Attributes

  • base_path = '/secrets/%(secret_id)s/acl' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource. nope, not today.
  • allow_fetch = True โ€” allow get operation for this resource. yes queen.
  • allow_commit = True โ€” allow update operation for this resource. slay.
  • allow_delete = True โ€” allow delete operation for this resource. bye bestie ๐Ÿ’€
  • allow_list = False โ€” allow list operation for this resource. no listing.
  • requires_id = False โ€” do calls for this resource require an ID? apparently not.
  • secret_id โ€” the UUID of the parent secret used in the URL.
  • read โ€” ACL definition for read operations (dict).
  • acl_ref โ€” reference URL returned by PUT/PATCH.

๐Ÿฆ‹ openstack.key_manager.v1.secret_consumer ๐Ÿฆ‹

The SecretConsumer Class

class openstack.key_manager.v1.secret_consumer.SecretConsumer(_synchronized=False, connection=None, **attrs)

Bases: Resource (<#openstack.resource.Resource>)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Attributes

  • resources_key = 'consumers' โ€” plural form of key for resource. cute.
  • base_path = '/secrets/%(secret_id)s/consumers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource. โœจ
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. we love a listable queen.
  • requires_id = False โ€” do calls for this resource require an ID? no ma'am.
  • secret_id โ€” URI attributes.
  • service โ€” body attributes.
  • resource_type โ€” body attributes.
  • resource_id โ€” body attributes.

๐ŸŒธ openstack.key_manager.v1.secret_store ๐ŸŒธ

The SecretStore Class

The SecretStore class inherits from Resource (<#openstack.resource.Resource>). ๐Ÿ’œ

class openstack.key_manager.v1.secret_store.SecretStore(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Attributes

  • resources_key = 'secret_stores' โ€” plural form of key for resource.
  • base_path = '/secret-stores' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = False โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. ๐ŸŽ€
  • name โ€” the name of the secret store.
  • status โ€” the status of the secret store.
  • created_at โ€” timestamp of when the secret store was created.
  • updated_at โ€” timestamp of when the secret store was last updated.
  • secret_store_ref โ€” a URI to the secret store.
  • secret_store_id โ€” the ID of the secret store (from secret_store_ref href, or the explicit secret_store_id field on microversion 1.3+).
  • global_default โ€” flag indicating if this secret store is global default.
  • crypto_plugin โ€” the crypto plugin name.
  • secret_store_plugin โ€” the secret store plugin name.

๐ŸŒˆ Load Balancer Resources ๐ŸŒˆ

๐Ÿ’… openstack.load_balancer.v2.amphora ๐Ÿ’…

The Amphora Class

The Amphora class inherits from Resource (<#openstack.resource.Resource>). amphora is such a fun word honestly, say it out loud. amphora. ๐Ÿบ

class openstack.load_balancer.v2.amphora.Amphora(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Attributes

  • resource_key = 'amphora' โ€” singular form of key for resource.
  • resources_key = 'amphorae' โ€” plural form of key for resource. yes, amphorae. latin ate. ๐Ÿ›๏ธ
  • base_path = '/octavia/amphorae' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = False โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Fields, bestie ๐Ÿซถ

  • id โ€” the ID of the amphora.
  • loadbalancer_id โ€” the ID of the load balancer.
  • compute_id โ€” the ID of the amphora resource in the compute system.
  • lb_network_ip โ€” the management IP of the amphora.
  • vrrp_ip โ€” the address of the vrrp port on the amphora.
  • ha_ip โ€” the IP address of the Virtual IP (VIP).
  • vrrp_port_id โ€” the vrrp port's ID in the networking system.
  • ha_port_id โ€” the ID of the Virtual IP (VIP) port.
  • cert_expiration โ€” the date the certificate for the amphora expires.
  • cert_busy โ€” whether the certificate is in the process of being replaced.
  • role โ€” the role configured for the amphora. One of STANDALONE, MASTER, BACKUP.
  • status โ€” the status of the amphora. One of: BOOTING, ALLOCATED, READY, PENDING_CREATE, PENDING_DELETE, DELETED, ERROR.
  • vrrp_interface โ€” the bound interface name of the vrrp port on the amphora.
  • vrrp_id โ€” the vrrp group's ID for the amphora.
  • vrrp_priority โ€” the priority of the amphora in the vrrp group.
  • cached_zone โ€” the availability zone of a compute instance, cached at create time.
  • created_at โ€” the UTC date and timestamp when the resource was created.
  • updated_at โ€” the UTC date and timestamp when the resource was last updated.
  • image_id โ€” the ID of the glance image used for the amphora.
  • compute_flavor โ€” the ID of the compute flavor used for the amphora.

configure(session)

Configure load balancer. ๐ŸŽ›๏ธ

Update the amphora agent configuration. This will push the new configuration to the amphora agent and will update the configuration options that are mutatable.

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” None.

failover(session)

Failover load balancer. iykyk, it's giving dramatic exit but make it infrastructure ๐Ÿ’€

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” None.

๐ŸŒธ The AmphoraConfig Class ๐ŸŒธ

Okay so the AmphoraConfig class inherits from Resource <#openstack.resource.Resource> โ€” yep, that's the base class, she's the parent, we love her.

class openstack.load_balancer.v2.amphora.AmphoraConfig(_synchronized=False,
connection=None, **attrs)

It's the base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” bestie do NOT use this directly, like fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
  • connection โ€” a reference to the Connection being used. Defaults to None so that Resource objects can be used without an active Connection, like in unit tests. And listen โ€” any use of self._connection in Resource code should protect itself with a check for None. Protect yourself, queen ๐Ÿซถ

Attributes, in order, no skipping:

  • base_path = '/octavia/amphorae/%(amphora_id)s/config' โ€” the base part of the URI for this resource ๐ŸŽ€
  • allow_create = False โ€” nope, no create operation for this resource
  • allow_fetch = False โ€” no get operation either, sorry
  • allow_commit = True โ€” oh THIS one's a yes, update operation allowed
  • allow_delete = False โ€” no delete operation
  • allow_list = False โ€” and no list operation
  • allow_empty_commit = True โ€” commits happen without the header or body being dirty. Iconic, low maintenance
  • requires_id = False โ€” do calls for this resource require an ID? No ma'am
  • amphora_id โ€” the ID of the amphora ๐Ÿ“

commit(session, prepend_key=True, has_body=False, *args, **kwargs)

Commit the state of the instance to the remote resource. Slay, go off, update the world โœจ

Parameters

  • session โ€” the session to use for making this request
  • prepend_key โ€” whether the resource_key <#openstack.resource.Resource.resource_key> should be prepended in a resource creation request. Defaults to True
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults alone ๐Ÿ™ˆ
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path <#openstack.resource.Resource.base_path>
  • microversion โ€” API version to override the negotiated one
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource

Returns

This Resource instance ๐Ÿ’–

Raises

MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True. So like, don't even try it.


๐Ÿฆ‹ The AmphoraFailover Class ๐Ÿฆ‹

The AmphoraFailover class inherits from Resource <#openstack.resource.Resource>. Same base resource energy, different path, we move ๐Ÿงš

class openstack.load_balancer.v2.amphora.AmphoraFailover(_synchronized=False,
connection=None, **attrs)

It's the base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None

Attributes:

  • base_path = '/octavia/amphorae/%(amphora_id)s/failover' โ€” the base part of the URI for this resource
  • allow_create = False โ€” allow create operation for this resource
  • allow_fetch = False โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = False โ€” allow delete operation for this resource
  • allow_list = False โ€” allow list operation for this resource
  • allow_empty_commit = True โ€” commits happen without header or body being dirty
  • requires_id = False โ€” do calls for this resource require an ID
  • amphora_id โ€” the ID of the amphora

commit(session, prepend_key=True, has_body=False, *args, **kwargs)

Commit the state of the instance to the remote resource.

Parameters

  • session โ€” the session to use for making this request
  • prepend_key โ€” whether the resource_key <#openstack.resource.Resource.resource_key> should be prepended in a resource creation request. Default to True
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults
  • base_path โ€” base part of the URI for modifying resources, if different from base_path <#openstack.resource.Resource.base_path>
  • microversion โ€” API version to override the negotiated one
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource

Returns

This Resource instance.

Raises

MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True.


๐ŸŽ€ openstack.load_balancer.v2.availability_zone ๐ŸŽ€

The AvailabilityZone Class

The AvailabilityZone class inherits from Resource <#openstack.resource.Resource> โ€” she's got range, look at all those Trues โญ

class openstack.load_balancer.v2.availability_zone.AvailabilityZone(_synchronized=False,
connection=None, **attrs)

It's the base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None

Attributes:

  • resource_key = 'availability_zone' โ€” singular form of key for resource
  • resources_key = 'availability_zones' โ€” plural form of key for resource
  • base_path = '/lbaas/availabilityzones' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource โœ…
  • allow_fetch = True โ€” allow get operation for this resource โœ…
  • allow_commit = True โ€” allow update operation for this resource โœ…
  • allow_delete = True โ€” allow delete operation for this resource โœ…
  • allow_list = True โ€” allow list operation for this resource โœ…
  • name โ€” the name of the availability zone
  • description โ€” the availability zone description
  • availability_zone_profile_id โ€” the associated availability zone profile ID
  • is_enabled โ€” whether the availability zone is enabled for use or not

๐ŸŒˆ openstack.load_balancer.v2.availability_zone_profile ๐ŸŒˆ

The AvailabilityZoneProfile Class

The AvailabilityZoneProfile class inherits from Resource <#openstack.resource.Resource>. Another full-access icon, we love to see it ๐Ÿ‘‘

class openstack.load_balancer.v2.availability_zone_profile.AvailabilityZoneProfile(_synchronized=False,
connection=None, **attrs)

It's the base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None

Attributes:

  • resource_key = 'availability_zone_profile' โ€” singular form of key for resource
  • resources_key = 'availability_zone_profiles' โ€” plural form of key for resource
  • base_path = '/lbaas/availabilityzoneprofiles' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • id โ€” the ID of the availability zone profile
  • name โ€” the name of the availability zone profile
  • provider_name โ€” the provider this availability zone profile is for
  • availability_zone_data โ€” the JSON string containing the availability zone metadata. It's giving raw JSON realness, handle with care ๐Ÿซถ

๐Ÿš openstack.load_balancer.v2.flavor ๐Ÿš

The Flavor Class

The Flavor class inherits from Resource <#openstack.resource.Resource>. Yes, a load balancer flavor is a whole thing, and yes she's valid ๐Ÿ’…

class openstack.load_balancer.v2.flavor.Flavor(_synchronized=False,
connection=None, **attrs)

It's the base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>
  • connection โ€” your lil pointer to the Connection in play. It defaults to None so you can totally build Resource objects without a live connection (unit tests say hi ๐Ÿ‘‹). Heads up: if you're using self._connection inside Resource code, guard it with a None check, okay?
  • resource_key = 'flavor' โ€” the singular key for this resource โœจ
  • resources_key = 'flavors' โ€” the plural key for this resource โœจ
  • base_path = '/lbaas/flavors' โ€” the base chunk of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” green light for create, bestie ๐Ÿ’š
  • allow_fetch = True โ€” green light for get ๐Ÿซถ
  • allow_commit = True โ€” green light for update โœ๏ธ
  • allow_delete = True โ€” green light for delete ๐Ÿ—‘๏ธ
  • allow_list = True โ€” green light for list ๐Ÿ“‹
  • id โ€” the ID of the flavor ๐Ÿ†”
  • name โ€” the name of the flavor ๐Ÿท๏ธ
  • description โ€” the flavor description, iykyk ๐Ÿ“
  • flavor_profile_id โ€” the associated flavor profile ID ๐Ÿ”—
  • is_enabled โ€” whether the flavor is enabled for use or not (yes/no energy) โœ…

openstack.load_balancer.v2.flavor_profile

The FlavorProfile Class

okay so the FlavorProfile class inherits from Resource <#openstack.resource.Resource> โ€” iconic inheritance moment ๐Ÿ’…

class openstack.load_balancer.v2.flavor_profile.FlavorProfile(_synchronized=False, connection=None, **attrs)

The base resource โ€” literally the blueprint ๐Ÿงš

Parameters

  • _synchronized โ€” not meant to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'flavorprofile' โ€” the singular key for this resource ๐ŸŒธ
  • resources_key = 'flavorprofiles' โ€” the plural key for this resource ๐ŸŒธ
  • base_path = '/lbaas/flavorprofiles' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create? allowed, obviously ๐Ÿ’–
  • allow_fetch = True โ€” get? allowed ๐Ÿซถ
  • allow_commit = True โ€” update? allowed โœ๏ธ
  • allow_delete = True โ€” delete? allowed ๐Ÿ—‘๏ธ
  • allow_list = True โ€” list? allowed ๐Ÿ“‹
  • id โ€” the ID of the flavor profile ๐Ÿ†”
  • name โ€” the name of the flavor profile ๐Ÿท๏ธ
  • provider_name โ€” the provider this flavor profile is for ๐Ÿข
  • flavor_data โ€” the JSON string containing the flavor metadata ๐Ÿงพ

openstack.load_balancer.v2.health_monitor

The HealthMonitor Class

HealthMonitor inherits from Resource <#openstack.resource.Resource> โ€” it's giving "watching you breathe" energy ๐Ÿ‘€

class openstack.load_balancer.v2.health_monitor.HealthMonitor(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿงš

Parameters

  • _synchronized โ€” not intended to be used directly, fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'healthmonitor' โ€” the singular key for this resource ๐Ÿ’œ
  • resources_key = 'healthmonitors' โ€” the plural key for this resource ๐Ÿ’œ
  • base_path = '/lbaas/healthmonitors' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create is a yes ๐Ÿ’š
  • allow_list = True โ€” list is a yes ๐Ÿ“‹
  • allow_fetch = True โ€” get is a yes ๐Ÿซถ
  • allow_delete = True โ€” delete is a yes ๐Ÿ—‘๏ธ
  • allow_commit = True โ€” update is a yes โœ๏ธ
not me pointing out that allow_list sits before allow_fetch here โ€” that's the original order, keep it, no cap ๐Ÿ’€
  • created_at โ€” properties timestamp when the health monitor was created โฐ
  • delay โ€” the time, in seconds, between sending probes to members โฑ๏ธ
  • expected_codes โ€” the expected http status codes to get from a successful health check ๐ŸŽฏ
  • http_method โ€” the HTTP method that the monitor uses for requests ๐Ÿ“ฎ
  • is_admin_state_up โ€” the administrative state of the health monitor. Type: bool ๐Ÿ”›
  • max_retries โ€” the number of successful checks before changing the operating status of the member to ONLINE ๐Ÿ”
  • max_retries_down โ€” the number of allowed check failures before changing the operating status of the member to ERROR ๐Ÿ’€
  • name โ€” the health monitor name ๐Ÿท๏ธ
  • operating_status โ€” operating status of the member ๐Ÿ“Š
  • pools โ€” list of associated pools. Type: list of dicts which contain the pool IDs ๐ŸŠ
  • pool_id โ€” the ID of the associated Pool ๐Ÿ”—
  • project_id โ€” the ID of the project ๐Ÿ†”
  • provisioning_status โ€” the provisioning status of this member โš™๏ธ
  • timeout โ€” the time, in seconds, after which a health check times out โŒ›
  • type โ€” the type of health monitor ๐Ÿงฌ
  • updated_at โ€” timestamp when the member was last updated ๐Ÿ”„
  • url_path โ€” the HTTP path of the request to test the health of a member ๐Ÿ›ค๏ธ

openstack.load_balancer.v2.l7_policy

The L7Policy Class

L7Policy inherits from Resource <#openstack.resource.Resource> โ€” layer 7 decisions, main character energy ๐Ÿ‘‘

class openstack.load_balancer.v2.l7_policy.L7Policy(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿงš

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'l7policy' โ€” the singular key for this resource ๐ŸŽ€
  • resources_key = 'l7policies' โ€” the plural key for this resource ๐ŸŽ€
  • base_path = '/lbaas/l7policies' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create: slay โœ…
  • allow_list = True โ€” list: slay ๐Ÿ“‹
  • allow_fetch = True โ€” get: slay ๐Ÿซถ
  • allow_commit = True โ€” update: slay โœ๏ธ
  • allow_delete = True โ€” delete: slay ๐Ÿ—‘๏ธ
and yeah, the order is create, list, fetch, commit, delete in this one โ€” different from the others, that's just how it is, periodt ๐Ÿ’…
  • action โ€” properties the action to be taken when l7policy is matched ๐ŸŽฌ
  • created_at โ€” timestamp when the L7 policy was created โฐ
  • description โ€” the l7policy description ๐Ÿ“
  • is_admin_state_up โ€” the administrative state of the l7policy. Type: bool ๐Ÿ”›
  • listener_id โ€” the ID of the listener associated with this l7policy ๐ŸŽง
  • name โ€” the l7policy name ๐Ÿท๏ธ
  • operating_status โ€” operating status of the member ๐Ÿ“Š
  • position โ€” sequence number of this l7policy ๐Ÿ”ข
  • project_id โ€” the ID of the project this l7policy is associated with ๐Ÿ†”
  • provisioning_status โ€” the provisioning status of this l7policy โš™๏ธ
  • redirect_pool_id โ€” the ID of the pool to which the requests will be redirected ๐ŸŠ
  • redirect_prefix โ€” the URL prefix to which the requests should be redirected ๐Ÿ”€
  • redirect_url โ€” the URL to which the requests should be redirected ๐Ÿ”—
  • rules โ€” the list of L7Rules associated with the l7policy ๐Ÿ“œ
  • updated_at โ€” timestamp when the member was last updated ๐Ÿ”„

openstack.load_balancer.v2.l7_rule

The L7Rule Class

L7Rule inherits from Resource <#openstack.resource.Resource> โ€” the little rule that could, bestie ๐Ÿฆ‹

class openstack.load_balancer.v2.l7_rule.L7Rule(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿงš

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'rule' โ€” the singular key for this resource โญ
  • resources_key = 'rules' โ€” the plural key for this resource โญ
  • base_path = '/lbaas/l7policies/%(l7policy_id)s/rules' โ€” the base part of the URI for this resource. note the %(l7policy_id)s substitution โ€” it's nested inside a policy, iykyk ๐Ÿช†
  • allow_create = True โ€” create? yes ๐Ÿ’š
  • allow_list = True โ€” list? yes ๐Ÿ“‹
  • allow_fetch = True โ€” get? yes ๐Ÿซถ
  • allow_commit = True โ€” update? yes โœ๏ธ
  • allow_delete = True โ€” delete? yes ๐Ÿ—‘๏ธ
  • is_admin_state_up โ€” properties the administrative state of the l7policy. Type: bool ๐Ÿ”›
  • compare_type โ€” the comparison type that gets used with the value in this L7 rule ๐ŸŽฏ
  • created_at โ€” timestamp of when this L7 rule was created โฐ
  • key โ€” the key to use for the comparison ๐Ÿ”‘
  • l7_policy_id โ€” the ID of the l7 policy it's attached to ๐Ÿซถ
  • operating_status โ€” the operating status of this l7rule ๐Ÿ’ซ
  • project_id โ€” the ID of the project this l7policy is associated with ๐Ÿท๏ธ
  • provisioning_status โ€” the provisioning status of this l7policy ๐Ÿ“ฆ
  • type โ€” the type of L7 rule โœจ
  • updated_at โ€” timestamp of when this L7 rule was last updated ๐Ÿ”„
  • rule_value โ€” the value to be compared against โš–๏ธ

๐ŸŽง openstack.load_balancer.v2.listener

The Listener Class ๐Ÿ’–

so this one inherits from Resource (peep openstack.resource.Resource, it's the blueprint of the whole fam):

class openstack.load_balancer.v2.listener.Listener(_synchronized=False, connection=None, **attrs)

The base resource โ€” that's the whole vibe of it, no cap.

Parameters

  • _synchronized โ€” not a thing you should touch directly, bestie ๐Ÿ™ˆ see new() and existing() instead.
  • connection โ€” a reference to the Connection in use. Defaults to None so Resource objects can exist without an active Connection (think unit tests, etc.). Anything in Resource code reaching for self._connection should protect itself with a check for None โ€” like, be responsible pls ๐Ÿซก

Class attributes, coming right up:

  • resource_key = 'listener' โ€” the singular form of the key for this resource.
  • resources_key = 'listeners' โ€” the plural form of the key for this resource.
  • base_path = '/lbaas/listeners' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” creation is allowed, slay.
  • allow_fetch = True โ€” fetching is allowed.
  • allow_commit = True โ€” updating is allowed.
  • allow_delete = True โ€” deleting is allowed.
  • allow_list = True โ€” listing is allowed.

And the fields themselves:

  • allowed_cidrs โ€” a list of IPv4 or IPv6 CIDRs.
  • alpn_protocols โ€” a list of ALPN protocols.
  • connection_limit โ€” the max number of connections permitted for this load balancer. Default is infinite โ™พ๏ธ
  • created_at โ€” timestamp of when the listener was created.
  • default_pool โ€” the default pool that requests get routed to.
  • default_pool_id โ€” the ID of the default pool. It must have a compatible protocol with the listener, so don't be messy about it ๐Ÿ˜ญ
  • default_tls_container_ref โ€” a reference to a container of TLS secrets ๐Ÿ”
  • description โ€” a description for the listener.
  • is_hsts_include_subdomains โ€” defines whether the include_subdomains directive is used for HSTS or not.
  • hsts_max_age โ€” enables HTTP Strict Transport Security (HSTS) and sets the max_age directive to the given value.
  • is_hsts_preload โ€” defines whether the hsts_preload directive is used for HSTS or not.
  • insert_headers โ€” a dictionary of additional headers to insert into the HTTP header.
  • is_admin_state_up โ€” the administrative state of the listener: up True or down False. Type: bool.
  • l7_policies โ€” a list of l7policies associated with this listener.
  • load_balancer_id โ€” the ID of the parent load balancer.
  • load_balancers โ€” a list of load balancers associated with this listener. Type: list of dicts which contain the load balancer IDs.
  • name โ€” the listener's name โœจ
  • operating_status โ€” the operating status of the listener.
  • project_id โ€” the ID of the project this listener is associated with.
  • protocol โ€” the protocol of the listener, which is TCP, HTTP, HTTPS or TERMINATED_HTTPS.
  • protocol_port โ€” the port the listener listens on, e.g. 80.
  • provisioning_status โ€” the provisioning status of this listener.
  • sni_container_refs โ€” a list of references to TLS secrets. Type: list.
  • updated_at โ€” timestamp of when the listener was last updated.
  • timeout_client_data โ€” frontend client inactivity timeout, in milliseconds.
  • timeout_member_connect โ€” backend member connection timeout, in milliseconds.
  • timeout_member_data โ€” backend member inactivity timeout, in milliseconds.
  • timeout_tcp_inspect โ€” time, in milliseconds, to wait for additional TCP packets so it can inspect the content ๐Ÿ‘€
  • tls_ciphers โ€” stores a cipher string in OpenSSL format.
  • tls_versions โ€” a list of TLS protocols to be used by the listener.

The ListenerStats Class ๐Ÿ“Š

yep, this one also inherits from Resource (openstack.resource.Resource), keeping the family tradition alive:

class openstack.load_balancer.v2.listener.ListenerStats(_synchronized=False, connection=None, **attrs)

The base resource โ€” periodt.

Parameters

  • _synchronized โ€” do not use this directly, bestie ๐Ÿ™…โ€โ™€๏ธ see new() and existing().
  • connection โ€” a reference to the Connection in use. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Code using self._connection should always guard against None.

Class attributes:

  • resource_key = 'stats' โ€” singular form of the key for this resource.
  • base_path = '/lbaas/listeners/%(listener_id)s/stats' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” nope, no creating stats, they're not yours to invent ๐Ÿ’€
  • allow_fetch = True โ€” fetching? yes.
  • allow_commit = False โ€” no updating either.
  • allow_delete = False โ€” and definitely no deleting.
  • allow_list = False โ€” no listing. it's giving read-only-for-one ๐Ÿ’…

Fields:

  • listener_id โ€” the ID of the listener.
  • active_connections โ€” the currently active connections.
  • bytes_in โ€” the total bytes received.
  • bytes_out โ€” the total bytes sent.
  • request_errors โ€” the total requests that were unable to be fulfilled ๐Ÿ˜ญ
  • total_connections โ€” the total connections handled.

๐Ÿ›œ openstack.load_balancer.v2.load_balancer

The LoadBalancer Class ๐Ÿ‘‘

the big one. inherits from Resource (openstack.resource.Resource), as everything does:

class openstack.load_balancer.v2.load_balancer.LoadBalancer(_synchronized=False, connection=None, **attrs)

The base resource โ€” main character energy tbh.

Parameters

  • _synchronized โ€” not intended for direct use, friend ๐Ÿ™ˆ see new() and existing().
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, e.g. in unit tests. Any self._connection usage in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = 'loadbalancer' โ€” singular form of the key for this resource.
  • resources_key = 'loadbalancers' โ€” plural form of the key for this resource.
  • base_path = '/lbaas/loadbalancers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create: yes.
  • allow_fetch = True โ€” fetch: yes.
  • allow_commit = True โ€” update: yes.
  • allow_delete = True โ€” delete: yes.
  • allow_list = True โ€” list: yes. we love a fully-enabled resource ๐ŸŒˆ

Fields:

  • is_admin_state_up โ€” the administrative state of the load balancer. Type: bool.
  • availability_zone โ€” the name of the target Octavia availability zone.
  • created_at โ€” timestamp of when the load balancer was created.
  • description โ€” the load balancer description.
  • flavor_id โ€” the load balancer flavor ID.
  • listeners โ€” a list of listeners associated with this load balancer.
  • name โ€” the load balancer's name โœจ
  • operating_status โ€” the operating status of the load balancer.
  • pools โ€” a list of pools associated with this load balancer.
  • project_id โ€” the ID of the project this load balancer is associated with.
  • provider โ€” the provider name for the load balancer.
  • provisioning_status โ€” the provisioning status of this load balancer.
  • updated_at โ€” timestamp of when the load balancer was last updated.
  • vip_address โ€” the VIP address of the load balancer.
  • vip_network_id โ€” the VIP network ID (the docs spell it "netowrk" and honestly? iconic, we're leaving it ๐Ÿซถ).
  • vip_port_id โ€” the VIP port ID.
  • vip_subnet_id โ€” the VIP subnet ID.
  • vip_sg_ids โ€” a list of security group IDs for the VIP port.
  • additional_vips โ€” additional VIPs. yes, more of them ๐ŸŽ€

Methods:

  • failover(session) โ€” failover the load balancer.

Parameters

  • session โ€” the session to use for making this request.

Returns

  • None

The LoadBalancerStats Class ๐Ÿ“ˆ

inherits from Resource (openstack.resource.Resource), because of course it does:

class openstack.load_balancer.v2.load_balancer.LoadBalancerStats(_synchronized=False, connection=None, **attrs)

The base resource โ€” same energy as ever.

Parameters

  • _synchronized โ€” ngl bestie, don't touch this one directly ๐Ÿ™ˆ it's internal. Peep new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
    • connection โ€” a reference to the Connection in use. Defaults to None so Resource objects can exist without an active Connection (think unit tests, vibes only). Any self._connection use inside Resource code should guard itself with a None check, fr fr.

resource_key = 'stats' โ€” the singular form of the key for this resource.

base_path = '/lbaas/loadbalancers/%(lb_id)s/stats' โ€” the base part of the URI for this resource.

allow_create = False โ€” create operation? Not allowed, sorry bestie.

allow_fetch = True โ€” get operation is a yes ๐Ÿ’…

allow_commit = False โ€” update? nope.

allow_delete = False โ€” delete? also nope.

allow_list = False โ€” list? absolutely not.

lb_id โ€” the ID of the load balancer. iconic identifier behavior.

active_connections โ€” the currently active connections.

bytes_in โ€” the total bytes received.

bytes_out โ€” the total bytes sent.

request_errors โ€” the total requests that were unable to be fulfilled. ๐Ÿ˜ญ

total_connections โ€” the total connections handled.

๐Ÿ’… The LoadBalancerFailover Class

The LoadBalancerFailover class inherits from Resource <#openstack.resource.Resource>. slay.

openstack.load_balancer.v2.load_balancer.LoadBalancerFailover(_synchronized=False,
connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not meant for direct use, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ

base_path = '/lbaas/loadbalancers/%(lb_id)s/failover' โ€” the base part of the URI for this resource.

allow_create = False โ€” create operation not allowed.

allow_fetch = False โ€” get operation, also no.

allow_commit = True โ€” update operation is allowed! we love a commit ๐Ÿ’…

allow_delete = False โ€” delete operation not allowed.

allow_list = False โ€” list operation not allowed.

allow_empty_commit = True โ€” commits happen without the header or body being dirty. no notes.

requires_id = False โ€” do calls for this resource require an ID? nope, false.

lb_id โ€” the ID of the load balancer.

commit(session, prepend_key=True, has_body=False, *args, **kwargs) โ€” commit the state of the instance to the remote resource. let's go โœจ

Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” whether the resource_key <#openstack.resource.Resource.resource_key> should be prepended in a resource creation request. Defaults to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults. ๐Ÿ™ˆ
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path <#openstack.resource.Resource.base_path>.
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns This Resource instance. ๐Ÿ’–

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True. periodt.


๐ŸŒธ openstack.load_balancer.v2.member

The Member Class

The Member class inherits from Resource <#openstack.resource.Resource>. bestie she's giving full CRUD energy.

openstack.load_balancer.v2.member.Member(_synchronized=False,
connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'member' โ€” singular form of key for resource.

resources_key = 'members' โ€” plural form of key for resource.

base_path = '/lbaas/pools/%(pool_id)s/members' โ€” the base part of the URI for this resource.

allow_create = True โ€” create operation allowed ๐Ÿ’…

allow_fetch = True โ€” get operation allowed.

allow_commit = True โ€” update operation allowed.

allow_delete = True โ€” delete operation allowed.

allow_list = True โ€” list operation allowed. full set, we ate.

address โ€” the IP address of the member.

created_at โ€” timestamp when the member was created.

is_admin_state_up โ€” the administrative state of the member, which is up True or down False. Type: bool.

monitor_address โ€” IP address used to monitor this member.

monitor_port โ€” port used to monitor this member.

name โ€” name of the member.

operating_status โ€” operating status of the member.

pool_id โ€” the ID of the owning pool.

provisioning_status โ€” the provisioning status of this member.

project_id โ€” the ID of the project this member is associated with.

protocol_port โ€” the port on which the application is hosted.

subnet_id โ€” subnet ID in which to access this member.

updated_at โ€” timestamp when the member was last updated.

weight โ€” a positive integer value that indicates the relative portion of traffic that this member should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with weight of 2. math queen ๐Ÿงฎ

backup โ€” a bool value that indicates whether the member is a backup or not. Backup members only receive traffic when all non-backup members are down. lowkey the emergency contact of the pool.


๐Ÿฆ‹ openstack.load_balancer.v2.pool

The Pool Class

The Pool class inherits from Resource <#openstack.resource.Resource>. main character energy, honestly.

openstack.load_balancer.v2.pool.Pool(_synchronized=False,
connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'pool' โ€” singular form of key for resource.

resources_key = 'pools' โ€” plural form of key for resource.

base_path = '/lbaas/pools' โ€” the base part of the URI for this resource.

allow_create = True โ€” create operation allowed.

allow_list = True โ€” list operation allowed.

allow_fetch = True โ€” get operation allowed.

allow_delete = True โ€” delete operation allowed.

allow_commit = True โ€” update operation allowed.

alpn_protocols โ€” properties List of ALPN protocols.

created_at โ€” timestamp when the pool was created.

description โ€” description for the pool.

health_monitor_id โ€” Health Monitor ID.

is_admin_state_up โ€” the administrative state of the pool. Type: bool.

lb_algorithm โ€” the loadbalancing algorithm used in the pool.

listener_id โ€” ID of listener associated with this pool.

listeners โ€” list of listeners associated with this pool.

loadbalancer_id โ€” ID of load balancer associated with this pool.

loadbalancers โ€” list of loadbalancers associated with this pool.

members โ€” members associated with this pool.

name โ€” the pool name.

operating_status โ€” operating status of the pool.

project_id โ€” the ID of the project.

protocol โ€” the protocol of the pool.

provisioning_status โ€” provisioning status of the pool.

tls_ciphers โ€” stores a string of cipher strings in OpenSSL format.

session_persistence โ€” a JSON object specifying the session persistence for the pool.

tls_versions โ€” a list of TLS protocol versions to be used in by the pool.

  • updated_at โ€” timestamp of when the pool got its last glow-up โœจ
  • tls_enabled โ€” do we TLS the connections to the backend member servers? Type: bool
  • ca_tls_container_ref โ€” holds the CA certificate that the backend servers use ๐Ÿ”
  • crl_container_ref โ€” holds the revocation list file

๐Ÿฆ‹ openstack.load_balancer.v2.provider ๐Ÿฆ‹

The Provider Class

ok so the Provider class inherits from Resource <#openstack.resource.Resource> โ€” that's the family tree, no cap ๐ŸŒณ

class openstack.load_balancer.v2.provider.Provider(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not meant to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead ๐Ÿ’…
  • connection โ€” a reference to the Connection being used. Defaults to None so that Resource objects can be used without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ
  • resources_key = 'providers' โ€” plural form of the key for this resource.
  • base_path = '/lbaas/providers' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource. (nope, not happening ๐Ÿ™ˆ)
  • allow_fetch = False โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = False โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. this one slays โœจ
  • name โ€” the provider name.
  • description โ€” the provider description.

The Provider Flavor Capabilities Class

and ProviderFlavorCapabilities also inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.load_balancer.v2.provider.ProviderFlavorCapabilities(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not meant to be used directly, fr fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'flavor_capabilities' โ€” plural form of the key for this resource.
  • base_path = '/lbaas/providers/%(provider)s/flavor_capabilities' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource.
  • allow_fetch = False โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = False โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ‘‘
  • provider โ€” the provider name to query.
  • name โ€” the provider name.
  • description โ€” the provider description.

๐ŸŒˆ openstack.load_balancer.v2.quota ๐ŸŒˆ

The Quota Class

Quota inherits from Resource <#openstack.resource.Resource> โ€” the whole quota situation lives here ๐Ÿ’–

class openstack.load_balancer.v2.quota.Quota(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” do not use this directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'quota' โ€” singular form of the key for this resource.
  • resources_key = 'quotas' โ€” plural form of the key for this resource.
  • base_path = '/lbaas/quotas' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • load_balancers โ€” the maximum amount of load balancers you can have. Type: int
  • listeners โ€” the maximum amount of listeners you can create. Type: int
  • pools โ€” the maximum amount of pools you can create. Type: int
  • health_monitors โ€” the maximum amount of health monitors you can create. Type: int
  • members โ€” the maximum amount of members you can create. Type: int
  • project_id โ€” the ID of the project this quota is associated with.

๐Ÿงš Network Resources ๐Ÿงš

openstack.network.v2.address_group

The AddressGroup Class

AddressGroup inherits from Resource <#openstack.resource.Resource>. it's giving "address group extension" energy ๐ŸŒธ

class openstack.network.v2.address_group.AddressGroup(_synchronized=False, connection=None, **attrs)

Address group extension.

The base resource

Parameters

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'address_group' โ€” singular form of the key for this resource.
  • resources_key = 'address_groups' โ€” plural form of the key for this resource.
  • base_path = '/address-groups' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • id โ€” the ID of the address group.
  • name โ€” the address group name.
  • description โ€” the address group name. (yes, it literally says that in the docs, i'm not making this up ๐Ÿ˜ญ)
  • project_id โ€” the ID of the project that owns the address group.
  • tenant_id โ€” Tenant_id (deprecated attribute). โš ๏ธ deprecated, so maybe don't build your whole personality on it.
  • addresses โ€” the IP addresses of the address group.
  • add_addresses(session, addresses) โ€” add addresses into the address group.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • addresses (list) โ€” the list of address strings.

Returns the response as a AddressGroup object with updated addresses

Raises SDKException <#openstack.exceptions.SDKException> on error.

  • remove_addresses(session, addresses) โ€” remove addresses from the address group.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • addresses (list) โ€” the list of address strings.

Returns the response as a AddressGroup object with updated addresses

Raises SDKException <#openstack.exceptions.SDKException> on error.


openstack.network.v2.address_scope

The AddressScope Class

AddressScope inherits from Resource <#openstack.resource.Resource>. address scope extension, let's go ๐ŸŽ€

class openstack.network.v2.address_scope.AddressScope(_synchronized=False, connection=None, **attrs)

Address scope extension.

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'address_scope' โ€” singular form of the key for this resource.
  • resources_key = 'address_scopes' โ€” plural form of the key for this resource.
  • base_path = '/address-scopes' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. ๐Ÿ’…
  • name โ€” the address scope name.
  • project_id โ€” the ID of the project that owns the address scope.
  • tenant_id โ€” Tenant_id (deprecated attribute). โš ๏ธ same deal, deprecated!
  • ip_version โ€” the IP address family of the address scope. Type: int
  • is_shared โ€” indicates whether this address scope is shared across all projects. Type: bool

๐ŸŒˆ openstack.network.v2.agent

๐Ÿ’– The Agent Class

Okay so the Agent class inherits from Resource <#openstack.resource.Resource>, bestie. It's giving very much "base class energy."

class openstack.network.v2.agent.Agent(_synchronized=False,
connection=None, **attrs)

Neutron agent extension. Slay. And underneath it all it's literally just the base resource.

Parameters โ€” the whole squad of args:

  • _synchronized โ€” ngl you are not supposed to touch this directly. Peep new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead. ๐Ÿ’…
  • connection โ€” a reference to the Connection being used. Defaults to None so that Resource objects can vibe without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ

Class attributes, go off:

  • resource_key = 'agent' โ€” singular form of key for resource. โœจ
  • resources_key = 'agents' โ€” plural form of key for resource.
  • base_path = '/agents' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource. (Not today, bestie.)
  • allow_fetch = True โ€” allow get operation for this resource. ๐Ÿ‘‘
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Instance attributes, the main characters:

  • agent_type โ€” the type of network agent.
  • availability_zone โ€” availability zone for the network agent.
  • binary โ€” the name of the network agent's application binary. ๐Ÿ”ฅ
  • configuration โ€” network agent configuration data specific to the agent_type.
  • created_at โ€” timestamp when the network agent was created. ๐ŸŽ€
  • description โ€” the network agent description.
  • last_heartbeat_at โ€” timestamp when the network agent's heartbeat was last seen. ๐Ÿ’“
  • host โ€” the host the agent is running on.
  • is_admin_state_up โ€” the administrative state of the network agent, which is up True or down False. Type: bool. ๐Ÿฆ‹
  • is_alive โ€” whether or not the network agent is alive. Type: bool.
  • resources_synced โ€” whether or not the agent is successfully synced towards placement (the docs spell it "succesffully" and honestly? iconic of them). Agents supporting the guaranteed minimum bandwidth feature share their resource view with neutron-server, and neutron-server shares this view with placement; resources_synced represents the success of the latter. The value None means no resource view synchronization to Placement was attempted. true / false values signify the success of the last synchronization attempt. Type: bool. ๐Ÿงš
  • started_at โ€” timestamp when the network agent was last started.
  • topic โ€” the messaging queue topic the network agent subscribes to. ๐Ÿ’ฌ
  • ha_state โ€” the HA state of the L3 agent. This is one of 'active', 'standby' or 'fault' for HA routers, or None for other types of routers.
  • ha_chassis_priority โ€” the HA chassis priority for this agent in the router's HA_Chassis_Group (OVN). Higher values indicate higher priority; the highest priority chassis is the active gateway. None for non-OVN backends. Type: int. ๐Ÿ‘‘

๐Ÿซถ get_bgp_speakers_hosted_by_dragent(session)

List BGP speakers hosted by a Dynamic Routing Agent. Periodt.

Parameters:

  • session (Adapter) โ€” the session to communicate through.

Returns: a list of BgpSpeakers.

Return type: BgpSpeaker <#openstack.network.v2.bgp_speaker.BgpSpeaker>


๐Ÿฆ‹ openstack.network.v2.auto_allocated_topology

The Auto Allocated Topology Class

The Auto Allocated Topology class inherits from Resource <#openstack.resource.Resource>. (Original docs say "Toplogy" โ€” we love a typo queen.) ๐Ÿ’€

class
openstack.network.v2.auto_allocated_topology.AutoAllocatedTopology(_synchronized=False,
connection=None, **attrs)

The base resource. That's the whole vibe.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = 'auto_allocated_topology' โ€” singular form of key for resource. โœจ
  • base_path = '/auto-allocated-topology' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource. ๐Ÿ”ฅ
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = False โ€” allow list operation for this resource.

Instance attributes:

  • project_id โ€” Project ID. If project is not specified the topology will be created for the project the user is authenticated against. Will return in error if resources have not been configured correctly. To use this feature auto-allocated-topology, subnet_allocation, external-net and router extensions must be enabled and set up. ๐ŸŽ€
  • tenant_id โ€” Tenant_id (deprecated attribute). ๐Ÿ˜ญ Deprecated, so like... don't.

๐ŸŒธ openstack.network.v2.availability_zone

The AvailabilityZone Class

The AvailabilityZone class inherits from Resource <#openstack.resource.Resource>.

class
openstack.network.v2.availability_zone.AvailabilityZone(_synchronized=False,
connection=None, **attrs)

The base resource, as always bestie.

Parameters:

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ˜Œ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = 'availability_zone' โ€” singular form of key for resource.
  • resources_key = 'availability_zones' โ€” plural form of key for resource.
  • base_path = '/availability_zones' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” allow create operation for this resource.
  • allow_fetch = False โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = False โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. She only lists, and honestly? Same. ๐Ÿ’…

Instance attributes:

  • name โ€” name of the availability zone.
  • resource โ€” type of resource for the availability zone, such as network.
  • state โ€” state of the availability zone, either available or unavailable. โญ

๐Ÿ’œ openstack.network.v2.bgp_peer

The BgpPeer Class

The BgpPeer class inherits from Resource <#openstack.resource.Resource>. Peers gonna peer. ๐Ÿซถ

class openstack.network.v2.bgp_peer.BgpPeer(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. โœจ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = 'bgp_peer' โ€” singular form of key for resource.
  • resources_key = 'bgp_peers' โ€” plural form of key for resource.
  • base_path = '/bgp-peers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource. ๐Ÿ”ฅ
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource. Full menu, no cap. ๐Ÿ‘‘

Instance attributes:

  • id โ€” the Id of the BGP Peer.
  • name โ€” the BGP Peer's name.
  • project_id โ€” the ID of the project that owns the BGP Peer.
  • tenant_id โ€” Tenant_id (deprecated attribute). ๐Ÿ™ˆ
  • auth_type โ€” the authentication type for the BGP Peer, can be none or md5. none by default.
  • remote_as โ€” the remote Autonomous System number of the BGP Peer.
  • peer_ip โ€” the ip address of the Peer. ๐Ÿฆ‹

๐ŸŽ€ openstack.network.v2.bgp_speaker

The BgpSpeaker Class

The BgpSpeaker class inherits from Resource <#openstack.resource.Resource>. Speaker of the house, literally.

class openstack.network.v2.bgp_speaker.BgpSpeaker(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. ๐Ÿ’…
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. If you use self._connection in Resource code, protect it with a check for None. ๐Ÿซถ

Class-level keys, bestie โ€” these are the ones doing the heavy lifting โœจ:

  • resource_key = 'bgp_speaker' โ€” singular form of key for resource.
  • resources_key = 'bgp_speakers' โ€” plural form of key for resource.
  • base_path = '/bgp-speakers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

And the attrs, slay ๐Ÿ’…:

  • id โ€” the Id of the BGP Speaker.
  • name โ€” the BGP speaker's name.
  • project_id โ€” the ID of the project that owns the BGP Speaker.
  • tenant_id โ€” Tenant_id (deprecated attribute).
  • ip_version โ€” the IP version (4 or 6) of the BGP Speaker.
  • advertise_floating_ip_host_routes โ€” whether to enable or disable the advertisement of floating ip host routes by the BGP Speaker. True by default.
  • advertise_tenant_networks โ€” whether to enable or disable the advertisement of tenant network routes by the BGP Speaker. True by default.
  • local_as โ€” the local Autonomous System number of the BGP Speaker.
  • networks โ€” a list of network IDs to which the BGP Speaker is associated.

Methods time, no cap ๐Ÿ”ฅ:

  • add_bgp_peer(session, peer_id) โ€” add BGP Peer to a BGP Speaker.
    • Parameters:
      • session (Adapter) โ€” the session to communicate through.
      • peer_id โ€” id of the peer to associate with the speaker.
    • Returns: a dictionary as the API Reference describes it.
    • Raises: SDKException <#openstack.exceptions.SDKException> on error.
  • remove_bgp_peer(session, peer_id) โ€” remove BGP Peer from a BGP Speaker.
    • Parameters:
      • session (Adapter) โ€” the session to communicate through.
      • peer_id โ€” the ID of the peer to disassociate from the speaker.
    • Raises: SDKException <#openstack.exceptions.SDKException> on error.
  • add_gateway_network(session, network_id) โ€” add Network to a BGP Speaker.
    • Param session: The session to communicate through.
    • Parameters:
      • network_id โ€” the ID of the network to associate with the speaker.
    • Returns: a dictionary as the API Reference describes it.
  • remove_gateway_network(session, network_id) โ€” delete Network from a BGP Speaker.
    • Parameters:
      • session (Adapter) โ€” the session to communicate through.
      • network_id โ€” the ID of the network to disassociate from the speaker.
  • get_advertised_routes(session) โ€” list routes advertised by a BGP Speaker.
    • Parameters: session (Adapter) โ€” the session to communicate through.
    • Returns: the response as a list of routes (cidr/nexthop pair advertised by the BGP Speaker.
    • Raises: SDKException <#openstack.exceptions.SDKException> on error.
  • get_bgp_dragents(session) โ€” list Dynamic Routing Agents hosting a specific BGP Speaker.
    • Parameters: session (Adapter) โ€” the session to communicate through.
    • Returns: the response as a list of dragents hosting a specific BGP Speaker.
    • Return type: Agent <#openstack.network.v2.agent.Agent>
    • Raises: SDKException <#openstack.exceptions.SDKException> on error.
  • add_bgp_speaker_to_dragent(session, bgp_agent_id) โ€” add BGP Speaker to a Dynamic Routing Agent.
    • Parameters:
      • session (Adapter) โ€” the session to communicate through.
      • bgp_agent_id โ€” the id of the dynamic routing agent to which add the speaker.
  • remove_bgp_speaker_from_dragent(session, bgp_agent_id) โ€” delete BGP Speaker from a Dynamic Routing Agent.
    • Parameters:
      • session (Adapter) โ€” the session to communicate through.
      • bgp_agent_id โ€” the id of the dynamic routing agent from which remove the speaker.

๐ŸŒˆ openstack.network.v2.bgpvpn ๐ŸŒˆ

๐Ÿ‘‘ The BgpVpn Class ๐Ÿ‘‘

The BgpVpn class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.bgpvpn.BgpVpn(_synchronized=False,
       connection=None, **attrs)

The base resource ๐Ÿซถ

  • Parameters:
    • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
    • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class-level keys, iconic behavior โœจ:

  • resource_key = 'bgpvpn' โ€” singular form of key for resource.
  • resources_key = 'bgpvpns' โ€” plural form of key for resource.
  • base_path = '/bgpvpn/bgpvpns' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Attrs, bestie ๐Ÿ’–:

  • id โ€” the Id of the BGPVPN.
  • name โ€” the BGPVPN's name.
  • project_id โ€” the ID of the project that owns the BGPVPN.
  • tenant_id โ€” Tenant_id (deprecated attribute).
  • route_distinguishers โ€” list of route distinguisher strings.
  • route_targets โ€” Route Targets that will be both imported and used for export.
  • import_targets โ€” additional Route Targets that will be imported.
  • export_targets โ€” additional Route Targets that will be used for export.
  • local_pref โ€” the default BGP LOCAL_PREF of routes that will be advertised to the BGPVPN.
  • vni โ€” the globally-assigned VXLAN vni for the BGP VPN.
  • type โ€” selection of the type of VPN and the technology behind it. Allowed values are l2 or l3.

๐Ÿฆ‹ openstack.network.v2.bgpvpn_network_association ๐Ÿฆ‹

โœจ The BgpVpnNetworkAssociation Class โœจ

The BgpVpnNetworkAssociation class inherits from Resource <#openstack.resource.Resource>.

class
openstack.network.v2.bgpvpn_network_association.BgpVpnNetworkAssociation(_synchronized=False,
       connection=None, **attrs)

The base resource ๐ŸŽ€

  • Parameters:
    • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
    • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class-level keys, periodt ๐Ÿ’…:

  • resource_key = 'network_association' โ€” singular form of key for resource.
  • resources_key = 'network_associations' โ€” plural form of key for resource.
  • base_path = '/bgpvpn/bgpvpns/%(bgpvpn_id)s/network_associations' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

Attrs, lowkey essential ๐ŸŒธ:

  • id โ€” the Id of the BGPVPN.
  • bgpvpn_id โ€” the ID of the BGPVPN who owns Network Association.
  • project_id โ€” the ID of the project that owns the BGPVPN.
  • tenant_id โ€” Tenant_id (deprecated attribute).
  • network_id โ€” the ID of a Neutron network with which to associate the BGP VPN.

๐ŸŽ€ openstack.network.v2.bgpvpn_port_association ๐ŸŽ€

๐Ÿ’œ The BgpVpnPortAssociation Class ๐Ÿ’œ

The BgpVpnPortAssociation class inherits from Resource <#openstack.resource.Resource>.

class
openstack.network.v2.bgpvpn_port_association.BgpVpnPortAssociation(_synchronized=False,
       connection=None, **attrs)

The base resource ๐Ÿงš

  • Parameters:
    • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
    • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • connection โ€” a reference to the Connection that's being used. It defaults to None so you can still use Resource objects when there's no live connection (unit tests, bestie, we've all been there). Real talk: any use of self._connection inside Resource code has to guard itself with a None check. ๐Ÿ’…
  • resource_key = 'port_association' โ€” the singular key for this resource.
  • resources_key = 'port_associations' โ€” the plural key for this resource.
  • base_path = '/bgpvpn/bgpvpns/%(bgpvpn_id)s/port_associations' โ€” the base chunk of the URI for this resource.
  • allow_create = True โ€” yes, you can create with this one.
  • allow_fetch = True โ€” yes, you can get it.
  • allow_commit = True โ€” yes, updates are allowed.
  • allow_delete = True โ€” yes, deletion's on the menu.
  • allow_list = True โ€” and yes, you can list them too. full package, no notes โœจ
  • id โ€” the Id of the BGPVPN.
  • bgpvpn_id โ€” the ID of the BGPVPN that owns the Network Association.
  • project_id โ€” the ID of the project that owns the BGPVPN.
  • tenant_id โ€” tenant_id, which is a deprecated attribute, jsyk.
  • port_id โ€” the ID of a Neutron Port you're associating the BGP VPN with.
  • advertise_fixed_ips โ€” a boolean flag that controls whether the fixed IPs of a port get advertised to the BGPVPN (default: true).
  • routes โ€” a list of routes, where each route is a dict with at least a type key, and that key can be prefix or bgpvpn. For the prefix type, the IP prefix (v4 or v6) you want to advertise goes in the prefix key. For the bgpvpn type, the bgpvpn_id key says which BGPVPN to readvertise routes from.

๐ŸŒˆ openstack.network.v2.bgpvpn_router_association

The BgpVpnRouterAssociation Class ๐ŸŽ€

Okay so the BgpVpnRouterAssociation class inherits from Resource <#openstack.resource.Resource>. iconic behaviour, honestly.

class openstack.network.v2.bgpvpn_router_association.BgpVpnRouterAssociation(_synchronized=False, connection=None, **attrs)
This is the base resource, bestie.

Parameters ๐Ÿซถ

  • _synchronized โ€” not meant for direct use, okay? Go look at new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
  • connection โ€” a reference to the Connection that's being used. Defaults to None so Resource objects work without an active connection, like in unit tests. And fr, any self._connection usage in Resource code should protect itself with a None check.
  • resource_key = 'router_association' โ€” the singular key for this resource.
  • resources_key = 'router_associations' โ€” the plural key for this resource.
  • base_path = '/bgpvpn/bgpvpns/%(bgpvpn_id)s/router_associations' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” creation? allowed.
  • allow_fetch = True โ€” fetching? allowed.
  • allow_commit = True โ€” committing updates? allowed.
  • allow_delete = True โ€” deleting? allowed.
  • allow_list = True โ€” listing? allowed. we love a resource that does it all ๐Ÿ’–
  • id โ€” the Id of the BGPVPN.
  • bgpvpn_id โ€” the ID of the BGPVPN that owns the Network Association.
  • project_id โ€” the ID of the project that owns the BGPVPN.
  • tenant_id โ€” tenant_id, a deprecated attribute.
  • router_id โ€” the ID of a Neutron router you're associating the BGP VPN with.
  • advertise_extra_routes โ€” a boolean flag controlling whether the routes listed in the routes attribute of the router get advertised to the BGPVPN (default: true).

๐Ÿฆ‹ openstack.network.v2.extension

The Extension Class โœจ

The Extension class inherits from Resource <#openstack.resource.Resource>. slay.

class openstack.network.v2.extension.Extension(_synchronized=False, connection=None, **attrs)
The base resource, obviously.

Parameters ๐Ÿ’œ

  • _synchronized โ€” nope, not for direct use. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection in use. Defaults to None so Resource objects can exist without an active connection, like in unit tests. Any self._connection usage in Resource code must protect itself with a None check.
  • resource_key = 'extension' โ€” singular key for the resource.
  • resources_key = 'extensions' โ€” plural key for the resource.
  • base_path = '/extensions' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” get operation allowed. (No create/commit/delete here, just so we're clear ๐Ÿ‘€)
  • allow_list = True โ€” list operation allowed.
  • alias โ€” an alias the extension is known under.
  • description โ€” text describing what the extension actually does.
  • links โ€” links pertaining to this extension.
  • name โ€” the name of this extension.
  • updated_at โ€” timestamp of when the extension was last updated.

๐Ÿ“ openstack.network.v2.flavor

The Flavor Class ๐ŸŒธ

The Flavor class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.flavor.Flavor(_synchronized=False, connection=None, **attrs)
The base resource.

Parameters ๐ŸŽ€

  • _synchronized โ€” not intended for direct use, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active connection, like in unit tests. Uses of self._connection in Resource code should protect themselves with a None check.
  • resource_key = 'flavor' โ€” singular key for this resource.
  • resources_key = 'flavors' โ€” plural key for this resource.
  • base_path = '/flavors' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” creation allowed.
  • allow_fetch = True โ€” get allowed.
  • allow_commit = True โ€” update allowed.
  • allow_delete = True โ€” delete allowed.
  • allow_list = True โ€” list allowed. all the green checks, we stan ๐ŸŒˆ
  • description โ€” the description for the flavor.
  • is_enabled โ€” sets the enabled flag.
  • name โ€” the name of the flavor.
  • service_type โ€” the service type this flavor applies to.
  • service_profile_ids โ€” IDs of the service profiles associated with this flavor.

๐Ÿ’€ openstack.network.v2.floating_ip

The FloatingIP Class ๐Ÿงš

The FloatingIP class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.floating_ip.FloatingIP(_synchronized=False, connection=None, **attrs)
The base resource, as ever.

Parameters ๐Ÿ”ฅ

  • _synchronized โ€” please don't use this directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active connection, like in unit tests. Any self._connection use in Resource code should guard itself with a None check.
  • resource_key = 'floatingip' โ€” singular key for this resource.
  • resources_key = 'floatingips' โ€” plural key for this resource.
  • base_path = '/floatingips' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create: allowed.
  • allow_fetch = True โ€” fetch: allowed.
  • allow_commit = True โ€” commit: allowed.
  • allow_delete = True โ€” delete: allowed.
  • allow_list = True โ€” list: allowed.
  • created_at โ€” timestamp of when the floating IP was created.
  • description โ€” the floating IP's description.
  • dns_domain โ€” the DNS domain.
  • dns_name โ€” the DNS name.
  • fixed_ip_address โ€” the fixed IP address associated with the floating IP. Heads up: if you're planning to associate the floating IP with a fixed IP at creation time, you must indicate the identifier of the internal port. And if that internal port has multiple associated IP addresses, the service just picks the first one โ€” unless you explicitly pass the fixed_ip_address parameter to choose a specific IP. so specific, love that for you ๐Ÿ’…
  • floating_ip_address โ€” the floating IP address.
  • name โ€” plot twist: the Floating IP object doesn't have a name attribute, so the IP address gets set as the name, letting a user find a floating IP by UUID or IP address using find_ip. workaround queen ๐Ÿ‘‘
  • floating_network_id โ€” the ID of the network associated with the floating IP.
  • port_details โ€” read-only. The details of the port this floating IP associates with. Only present if the fip-port-details extension is loaded. Type: a dict with keys name, network_id, mac_address, admin_state_up, status, device_id, device_owner.
  • port_id โ€” the port ID.
  • qos_policy_id โ€” the ID of the QoS policy that's attached to the floating IP ๐Ÿ’…
  • project_id โ€” the ID of the project this floating IP is associated with
  • tenant_id โ€” Tenant_id (deprecated attribute) โš ๏ธ like, it's still there, but it's giving legacy vibes
  • router_id โ€” the ID of an associated router
  • status โ€” the floating IP status. Value is ACTIVE or DOWN
  • updated_at โ€” timestamp at which the floating IP was last updated
  • subnet_id โ€” the Subnet ID associated with the floating IP

๐Ÿซถ openstack.network.v2.health_monitor

The HealthMonitor Class โœจ

Okay so the HealthMonitor class inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.network.v2.health_monitor.HealthMonitor(_synchronized=False, connection=None, **attrs)
The base resource ๐ŸŽ€

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ‘€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’–
  • resource_key = 'healthmonitor' โ€” singular form of key for resource
  • resources_key = 'healthmonitors' โ€” plural form of key for resource
  • base_path = '/lbaas/healthmonitors' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • delay โ€” the time, in seconds, between sending probes to members โฑ๏ธ
  • expected_codes โ€” expected HTTP codes for a passing HTTP(S) monitor
  • http_method โ€” the HTTP method that the monitor uses for requests
  • is_admin_state_up โ€” the administrative state of the health monitor, which is up True or down False. Type: bool
  • max_retries โ€” maximum consecutive health probe tries
  • name โ€” name of the health monitor
  • pool_ids โ€” list of pools associated with this health monitor. Type: list of dicts which contain the pool IDs
  • pool_id โ€” the ID of the pool associated with this health monitor
  • project_id โ€” the ID of the project this health monitor is associated with
  • tenant_id โ€” Tenant_id (deprecated attribute) โš ๏ธ
  • timeout โ€” the maximum number of seconds for a monitor to wait for a connection to be established before it times out. This value must be less than the delay value ๐Ÿšจ
  • type โ€” the type of probe sent by the load balancer to verify the member state, which is PING, TCP, HTTP, or HTTPS
  • url_path โ€” path portion of URI that will be probed if type is HTTP(S)

๐Ÿฆ‹ openstack.network.v2.listener

The Listener Class โœจ

The Listener class inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.network.v2.listener.Listener(_synchronized=False, connection=None, **attrs)
The base resource ๐ŸŽ€

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ‘€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’–
  • resource_key = 'listener' โ€” singular form of key for resource
  • resources_key = 'listeners' โ€” plural form of key for resource
  • base_path = '/lbaas/listeners' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • connection_limit โ€” the maximum number of connections permitted for this load balancer. Default is infinite โ™พ๏ธ
  • default_pool_id โ€” ID of default pool. Must have compatible protocol with listener ๐Ÿ”ฅ
  • default_tls_container_ref โ€” a reference to a container of TLS secrets ๐Ÿ”
  • description โ€” description for the listener
  • is_admin_state_up โ€” the administrative state of the listener, which is up True or down False. Type: bool
  • load_balancer_ids โ€” list of load balancers associated with this listener. Type: list of dicts which contain the load balancer IDs
  • load_balancer_id โ€” the ID of the load balancer associated with this listener
  • name โ€” name of the listener
  • project_id โ€” the ID of the project this listener is associated with
  • protocol โ€” the protocol of the listener, which is TCP, HTTP, HTTPS or TERMINATED_HTTPS
  • protocol_port โ€” port the listener will listen to, e.g. 80
  • sni_container_refs โ€” a list of references to TLS secrets. Type: list

๐ŸŒˆ openstack.network.v2.load_balancer

The LoadBalancer Class โœจ

The LoadBalancer class inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.network.v2.load_balancer.LoadBalancer(_synchronized=False, connection=None, **attrs)
The base resource ๐ŸŽ€

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ‘€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’–
  • resource_key = 'loadbalancer' โ€” singular form of key for resource
  • resources_key = 'loadbalancers' โ€” plural form of key for resource
  • base_path = '/lbaas/loadbalancers' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource
  • description โ€” description for the load balancer
  • is_admin_state_up โ€” the administrative state of the load balancer, which is up True or down False. Type: bool
  • listener_ids โ€” list of listeners associated with this load balancer. Type: list of dicts which contain the listener IDs
  • name โ€” name of the load balancer ๐Ÿ‘‘
  • operating_status โ€” status of load_balancer operating, e.g. ONLINE, OFFLINE
  • pool_ids โ€” list of pools associated with this load balancer. Type: list of dicts which contain the pool IDs
  • project_id โ€” the ID of the project this load balancer is associated with
  • tenant_id โ€” Tenant_id (deprecated attribute) โš ๏ธ
  • provider โ€” the name of the provider
  • provisioning_status โ€” status of load balancer provisioning, e.g. ACTIVE, INACTIVE
  • vip_address โ€” the IP address of the VIP ๐Ÿ’…
  • vip_port_id โ€” the ID of the port for the VIP
  • vip_subnet_id โ€” the ID of the subnet on which to allocate the VIP address

โญ openstack.network.v2.local_ip

The LocalIP Class โœจ

The LocalIP class inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.network.v2.local_ip.LocalIP(_synchronized=False, connection=None, **attrs)
Local IP extension. ๐ŸŽ€
The base resource ๐Ÿซถ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ‘€
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’–
  • resource_key = 'local_ip' โ€” singular form of key for resource
  • resources_key = 'local_ips' โ€” plural form of key for resource
  • base_path = '/local_ips' โ€” the base part of the URI for this resource
  • allow_create = True โ€” allow create operation for this resource
  • allow_fetch = True โ€” allow get operation for this resource
  • allow_commit = True โ€” allow update operation for this resource
  • allow_delete = True โ€” allow delete operation for this resource
  • allow_list = True โ€” allow list operation for this resource ๐ŸŒธ
  • created_at โ€” the timestamp of when this floating IP got made โœจ
  • description โ€” the local ip's lil description ๐ŸŽ€
  • id โ€” the ID of the local ip, bestie
  • ip_mode โ€” the local ip's ip-mode ๐Ÿ’…
  • local_ip_address โ€” the Local IP address, literally
  • local_port_id โ€” the ID of the port that owns the local ip ๐Ÿซถ
  • name โ€” the local ip name, iconic
  • network_id โ€” the ID of the network that owns the local ip ๐ŸŒธ
  • project_id โ€” the ID of the project that owns the local ip ๐Ÿ’–
  • revision_number โ€” the local ip revision number, no cap
  • updated_at โ€” the timestamp of when this floating IP was last updated โญ

openstack.network.v2.local_ip_association

The LocalIPAssociation Class

Okay so the LocalIPAssociation class inherits from Resource <#openstack.resource.Resource> โ€” yes, that's the base resource vibe ๐Ÿ’ซ.

class openstack.network.v2.local_ip_association.LocalIPAssociation(_synchronized=False, connection=None, **attrs)

It's the Local IP extension, periodt.

The base resource

Parameters

  • _synchronized โ€” bestie, this is not meant to be used directly ๐Ÿ™ˆ. Go look at new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead.
  • connection โ€” a reference to the Connection that's being used. It defaults to None so Resource objects can be used without an active Connection (like in unit tests, yk). Any use of self._connection in Resource code should protect itself with a None check. ๐Ÿ’…
  • resource_key = 'port_association' โ€” the singular form of the key for this resource ๐ŸŒˆ
  • resources_key = 'port_associations' โ€” the plural form of the key for this resource โœจ
  • base_path = '/local_ips/%(local_ip_id)s/port_associations' โ€” the base part of the URI for this resource ๐Ÿ”ฅ
  • allow_create = True โ€” green light for the create operation on this resource
  • allow_fetch = True โ€” green light for the get operation on this resource
  • allow_commit = True โ€” green light for the update operation on this resource
  • allow_delete = True โ€” green light for the delete operation on this resource
  • allow_list = True โ€” green light for the list operation on this resource ๐Ÿ‘‘
  • fixed_port_id โ€” the fixed port ID ๐Ÿฆ‹
  • fixed_ip โ€” the fixed IP, simple as that
  • host โ€” the Host ๐Ÿ“
  • local_ip_address โ€” the local ip address ๐Ÿ’œ
  • local_ip_id โ€” the ID of the Local IP address, slay

openstack.network.v2.metering_label

The MeteringLabel Class

And the MeteringLabel class inherits from Resource <#openstack.resource.Resource> too, obvi ๐Ÿ’–.

class openstack.network.v2.metering_label.MeteringLabel(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” nope, not for direct use ๐Ÿ™ˆ. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection in use. Defaults to None so Resource objects work without an active Connection (unit tests, yk). Code using self._connection should guard against None. ๐Ÿ’…
  • resource_key = 'metering_label' โ€” the singular form of the key for this resource ๐ŸŒธ
  • resources_key = 'metering_labels' โ€” the plural form of the key for this resource โญ
  • base_path = '/metering/metering-labels' โ€” the base part of the URI for this resource ๐ŸŽ€
  • allow_create = True โ€” create operation allowed, go off
  • allow_fetch = True โ€” get operation allowed
  • allow_commit = True โ€” update operation allowed
  • allow_delete = True โ€” delete operation allowed
  • allow_list = True โ€” list operation allowed, periodt
  • description โ€” the description of the metering label โœจ
  • name โ€” the name of the metering label ๐Ÿ’ซ
  • project_id โ€” the ID of the project this metering label is associated with ๐Ÿซถ
  • tenant_id โ€” Tenant_id (heads up: this is a deprecated attribute ๐Ÿ’€)
  • is_shared โ€” tells you whether this label is shared across all projects. Type: bool ๐Ÿ‘‘

openstack.network.v2.metering_label_rule

The MeteringLabelRule Class

MeteringLabelRule also inherits from Resource <#openstack.resource.Resource>, as one does ๐ŸŒˆ.

class openstack.network.v2.metering_label_rule.MeteringLabelRule(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” do not use this directly, bestie ๐Ÿ™ˆ. Check new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection (unit tests vibe). self._connection users should protect against None. ๐Ÿ’…
  • resource_key = 'metering_label_rule' โ€” the singular form of the key for this resource ๐Ÿ’–
  • resources_key = 'metering_label_rules' โ€” the plural form of the key for this resource ๐Ÿฆ‹
  • base_path = '/metering/metering-label-rules' โ€” the base part of the URI for this resource ๐ŸŒธ
  • allow_create = True โ€” create operation allowed
  • allow_fetch = True โ€” get operation allowed
  • allow_commit = True โ€” update operation allowed
  • allow_delete = True โ€” delete operation allowed
  • allow_list = True โ€” list operation allowed ๐Ÿ’…
  • direction โ€” ingress or egress: the direction in which the metering label rule is applied. Default: "ingress" ๐Ÿงš
  • is_excluded โ€” specifies whether the remote_ip_prefix will be excluded from the traffic counters of the metering label, ie: so you don't count the traffic of a specific IP address of a range. Default: False, Type: bool ๐Ÿ”ฅ
  • metering_label_id โ€” the metering label ID to associate with this metering label rule ๐Ÿ’œ
  • project_id โ€” the ID of the project this metering label rule is associated with ๐ŸŽ€
  • tenant_id โ€” Tenant_id (heads up: deprecated attribute ๐Ÿ’€)
  • remote_ip_prefix โ€” the remote IP prefix to be associated with this metering label rule โญ
  • source_ip_prefix โ€” the source IP prefix to be associated with this metering label rule ๐ŸŒˆ
  • destination_ip_prefix โ€” the destination IP prefix to be associated with this metering label rule ๐Ÿ‘‘

openstack.network.v2.ndp_proxy

The NDPProxy Class

The NDPProxy class inherits from Resource <#openstack.resource.Resource> because that's the family tree ๐Ÿ’ซ.

class openstack.network.v2.ndp_proxy.NDPProxy(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not intended for direct use ๐Ÿ™ˆ. Peep new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Any self._connection usage in Resource code should check for None. ๐Ÿ’…
  • resource_key = 'ndp_proxy' โ€” the singular form of the key for this resource โœจ
  • resources_key = 'ndp_proxies' โ€” the plural form of the key for this resource ๐ŸŒธ
  • base_path = '/ndp_proxies' โ€” the base part of the URI for this resource ๐ŸŽ€
  • allow_create = True โ€” create operation allowed
  • allow_fetch = True โ€” get operation allowed
  • allow_commit = True โ€” update operation allowed
  • allow_delete = True โ€” delete operation allowed
  • allow_list = True โ€” list operation allowed, iykyk
  • created_at โ€” the timestamp of when the NDP proxy was created ๐ŸŒŸ
  • description โ€” the description ๐Ÿ’…
  • id โ€” the ID of the NDP proxy
  • ip_address โ€” the internal IP address ๐Ÿฆ‹
  • name โ€” the name of this resource ๐Ÿ“
  • port_id โ€” the ID of internal port ๐Ÿ’œ
  • project_id โ€” the ID of the project that owns the NDP proxy ๐ŸŒˆ
  • revision_number โ€” the NDP proxy revision number
  • router_id โ€” the ID of Router ๐Ÿ‘‘
  • updated_at โ€” the timestamp of when the NDP proxy was last updated โญ

openstack.network.v2.network

The Network Class

And here's the big one: the Network class inherits from Resource <#openstack.resource.Resource> ๐Ÿ’–.

class openstack.network.v2.network.Network(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” again, not for direct use, bestie ๐Ÿ™ˆ. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a None check. ๐Ÿ’…
  • resource_key = 'network' โ€” the singular form of the key for this resource โœจ
  • resources_key = 'networks' โ€” the plural form of the key for this resource ๐ŸŒธ
  • base_path = '/networks' โ€” the base part of the URI for this resource ๐ŸŽ€
  • allow_create = True โ€” create operation allowed for this resource
  • allow_fetch = True โ€” green light for the get operation on this resource ๐Ÿซถ
  • allow_commit = True โ€” green light for the update operation on this resource โœจ
  • allow_delete = True โ€” green light for the delete operation on this resource ๐Ÿ’…
  • allow_list = True โ€” green light for the list operation on this resource ๐ŸŽ€
  • availability_zone_hints โ€” the availability zone hints used when scheduling the network. Type: list of availability zone names ๐ŸŒธ
  • availability_zones โ€” the availability zones for the network. Type: list of availability zone names โญ
  • created_at โ€” timestamp of when the network was created โฐ
  • description โ€” the network description ๐Ÿ“
  • dns_domain โ€” the DNS domain that's associated ๐Ÿฆ‹
  • ipv4_address_scope_id โ€” the ID of the IPv4 address scope for the network ๐Ÿ”ข
  • ipv6_address_scope_id โ€” the ID of the IPv6 address scope for the network ๐Ÿ”ข
  • is_admin_state_up โ€” the administrative state of the network: up is True, down is False. Type: bool ๐Ÿ‘‘
  • is_default โ€” whether this is the default external network or not. Type: bool ๐ŸŒˆ
  • is_port_security_enabled โ€” the port security status: enabled is True, disabled is False. Type: bool. Default: False. Available for multiple provider extensions ๐Ÿ”
  • is_router_external โ€” whether the router is external or not. Type: bool. Default: False ๐Ÿšช
  • is_shared โ€” says whether this network is shared across all projects. By default, only administrative users can change this value. Type: bool ๐Ÿค
  • mtu โ€” read-only. The maximum transmission unit (MTU) of the network resource ๐Ÿ“
  • name โ€” the network name ๐Ÿท๏ธ
  • project_id โ€” the ID of the project this network is associated with ๐Ÿ—‚๏ธ
  • provider_network_type โ€” the type of physical network that maps to this network resource. Like, for example, flat, vlan, vxlan, or gre. Available for multiple provider extensions ๐Ÿ›ฐ๏ธ
  • provider_physical_network โ€” the physical network where this network object is actually implemented. Available for multiple provider extensions ๐ŸŒ
  • provider_segmentation_id โ€” an isolated segment ID on the physical network. The provider network type defines the segmentation model. Available for multiple provider extensions ๐Ÿงฉ
  • pvlan โ€” indicates if PVLAN is enabled for the network ๐Ÿ”’
  • qos_policy_id โ€” the ID of the QoS policy attached to the port ๐ŸŽš๏ธ
  • segments โ€” a list of provider segment objects. Available for multiple provider extensions ๐Ÿ“š
  • status โ€” the network status ๐Ÿ’ซ
  • subnet_ids โ€” the associated subnet IDs. Type: list of strs of the subnet IDs ๐Ÿงต
  • updated_at โ€” timestamp of when the network was last updated ๐Ÿ”„
  • is_vlan_transparent โ€” indicates the VLAN transparency mode of the network ๐Ÿซง
  • is_vlan_qinq โ€” indicates the VLAN QinQ mode of the network ๐Ÿซง

๐ŸŒˆ openstack.network.v2.network_ip_availability

๐Ÿ’– The NetworkIPAvailability Class

The NetworkIPAvailability class inherits from Resource. No cap, it's literally just a Resource with a glow-up โœจ

class openstack.network.v2.network_ip_availability.NetworkIPAvailability(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ”ฎ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing(). iykyk ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. Very "protect your peace" of it ๐Ÿ’…
  • resource_key = 'network_ip_availability' โ€” the singular form of the key for the resource ๐Ÿ”‘
  • resources_key = 'network_ip_availabilities' โ€” the plural form of the key for the resource ๐Ÿ”‘โœจ
  • base_path = '/network-ip-availabilities' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = False โ€” create operation? Not on this resource, bestie ๐Ÿšซ
  • allow_fetch = True โ€” get operation? Yep, allowed ๐Ÿซถ
  • allow_commit = False โ€” update operation? Nope ๐Ÿšซ
  • allow_delete = False โ€” delete operation? Also nope ๐Ÿšซ
  • allow_list = True โ€” list operation? Absolutely yes ๐ŸŽ€
  • network_id โ€” network ID to use when listing network IP availability ๐Ÿ†”
  • network_name โ€” the network name for that particular network IP availability ๐Ÿท๏ธ
  • subnet_ip_availability โ€” the Subnet IP Availability of all subnets of a network. Type: list ๐Ÿ“‹
  • project_id โ€” the ID of the project this network IP availability is associated with ๐Ÿ—‚๏ธ
  • tenant_id โ€” tenant_id (deprecated attribute ๐Ÿ˜ญ yes, deprecated, keep that in mind)
  • total_ips โ€” the total IPs of a network. Type: int ๐Ÿ”ข
  • used_ips โ€” the used or consumed IPs of a network. Type: int ๐Ÿ”ข
  • ip_availability_details โ€” the detailed IP availability of a network, holding the total_ips_in_subnet, total_ips_in_allocation_pool, used_ips_in_subnet and used_ips_in_allocation_pool keys. Requires the network-ip-availability-details extension. Type: dict ๐Ÿงฌ

๐Ÿฆ‹ openstack.network.v2.network_segment_range

๐ŸŒธ The NetworkSegmentRange Class

The NetworkSegmentRange class inherits from Resource.

class openstack.network.v2.network_segment_range.NetworkSegmentRange(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ”ฎ

Parameters

  • _synchronized โ€” not intended to be used directly, fr. See new() and existing() ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'network_segment_range' โ€” singular form of the key for the resource ๐Ÿ”‘
  • resources_key = 'network_segment_ranges' โ€” plural form of the key for the resource ๐Ÿ”‘โœจ
  • base_path = '/network_segment_ranges' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create? yes ๐Ÿซถ
  • allow_fetch = True โ€” get? yes โœจ
  • allow_commit = True โ€” update? yes ๐Ÿ’…
  • allow_delete = True โ€” delete? yes ๐ŸŽ€
  • allow_list = True โ€” list? yes โญ
  • name โ€” the network segment range name ๐Ÿท๏ธ
  • default โ€” the network segment range is loaded from the host configuration file. Type: bool ๐Ÿ“„
  • shared โ€” the network segment range is shared with other projects. Type: bool ๐Ÿค
  • project_id โ€” the ID of the project associated with this network segment range ๐Ÿ—‚๏ธ
  • network_type โ€” the type of network associated with this network segment range, such as geneve, gre, vlan or vxlan ๐Ÿ›ฐ๏ธ
  • physical_network โ€” the name of the physical network associated with this network segment range ๐ŸŒ
  • minimum โ€” the minimum segmentation ID for this network segment range. The network type defines the segmentation model: VLAN ID for vlan network type, and tunnel ID for geneve, gre and vxlan network types. Type: int โฌ‡๏ธ
  • maximum โ€” the maximum segmentation ID for this network segment range. The network type defines the segmentation model: VLAN ID for vlan network type, and tunnel ID for geneve, gre and vxlan network types. Type: int โฌ†๏ธ
  • used โ€” mapping of which segmentation ID in the range is used by which project. Type: dict ๐Ÿ—บ๏ธ
  • available โ€” list of available segmentation IDs in this network segment range. Type: list โœ…

๐ŸŽ€ openstack.network.v2.pool

๐Ÿ‘‘ The Pool Class

The Pool class inherits from Resource.

class openstack.network.v2.pool.Pool(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ”ฎ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing() ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'pool' โ€” singular form of the key for the resource ๐Ÿ”‘
  • resources_key = 'pools' โ€” plural form of the key for the resource ๐Ÿ”‘โœจ
  • base_path = '/lbaas/pools' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create operation? allowed ๐Ÿซถ
  • allow_fetch = True โ€” get operation? allowed โœจ
  • allow_commit = True โ€” update operation? allowed ๐Ÿ’…
  • allow_delete = True โ€” delete operation? allowed ๐ŸŽ€
  • allow_list = True โ€” list operation? allowed โญ
  • description โ€” description for the pool ๐Ÿ“
  • health_monitor_id โ€” the ID of the associated health monitors ๐Ÿฉบ
  • health_monitor_ids โ€” the IDs of the health monitors that are, like, attached to this pool (that's the LBaaS v1 ones, bestie, vintage ๐Ÿ’…).
  • health_monitor_status โ€” the statuses of those associated health monitors. vibes check on the monitors โœจ
  • is_admin_state_up โ€” the admin state of the pool: up = True, down = False. Type: bool
  • load_balancer_id โ€” ID of the load balancer that's associated with this pool.
  • member_ids โ€” list of members that belong to the pool. Type: list of dicts which contain the member IDs
  • name โ€” pool name. and no, it does NOT have to be unique, so go off I guess ๐Ÿ™ˆ
  • project_id โ€” the ID of the project this pool is associated with.
  • tenant_id โ€” Tenant_id (deprecated attribute). it's giving legacy, don't use it.
  • protocol โ€” the protocol of the pool, which is TCP, HTTP, or HTTPS.
  • provider โ€” the provider name of the load balancer service.
  • status โ€” human readable description of the status.
  • status_description โ€” the status of the network.
  • subnet_id โ€” the subnet on which the members of the pool will be located.
  • session_persistence โ€” the session persistence algorithm that should be used (if any). Type: dict with keys type and cookie_name
  • virtual_ip_id โ€” the ID of the virtual IP (VIP) address. very VIP of it ๐Ÿ‘‘

openstack.network.v2.pool_member

The PoolMember Class

the PoolMember class inherits from Resource <#openstack.resource.Resource>. family tree slay ๐ŸŒˆ

class openstack.network.v2.pool_member.PoolMember(_synchronized=False, connection=None, **attrs)

the base resource

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. please don't touch this one ๐Ÿ™
  • connection โ€” reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, like in unit tests ngl. any use of self._connection in Resource code should protect itself with a check for None. periodt ๐Ÿ’…

class attributes:

  • resource_key = 'member' โ€” singular form of key for resource.
  • resources_key = 'members' โ€” plural form of key for resource.
  • base_path = '/lbaas/pools/%(pool_id)s/members' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

attributes, the main characters:

  • pool_id โ€” the ID of the owning pool.
  • address โ€” the IP address of the pool member.
  • is_admin_state_up โ€” the admin state of the pool member: up = True, down = False. Type: bool
  • name โ€” name of the pool member.
  • project_id โ€” the ID of the project this pool member is associated with.
  • tenant_id โ€” Tenant_id (deprecated attribute). yeah. that one. ๐Ÿ’€
  • protocol_port โ€” the port on which the application is hosted.
  • subnet_id โ€” subnet ID in which to access this pool member.
  • weight โ€” a positive integer value that indicates the relative portion of traffic that this member should receive from the pool. for example, a member with a weight of 10 receives five times as much traffic as a member with weight of 2. math is mathing, bestie ๐Ÿ“

openstack.network.v2.port

The Port Class

the Port class inherits from Resource <#openstack.resource.Resource>. ๐Ÿฆ‹

class openstack.network.v2.port.Port(_synchronized=False, connection=None, **attrs)

the base resource

Parameters

  • _synchronized โ€” not intended to be used directly! see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. defaults to None so Resource objects can be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None. same deal as always ๐Ÿซถ

class attributes:

  • resource_key = 'port' โ€” singular form of key for resource.
  • resources_key = 'ports' โ€” plural form of key for resource.
  • base_path = '/ports' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.

attributes, and there areโ€ฆ a lot of them ๐Ÿ˜ญ:

  • allowed_address_pairs โ€” allowed address pairs list. dictionary key ip_address is required and key mac_address is optional. don't forget the required one!!
  • binding_host_id โ€” the ID of the host where the port is allocated. in some cases, different implementations can run on different hosts.
  • binding_profile โ€” a dictionary that enables the application running on the specified host to pass and receive vif port-specific information to the plug-in. Type: dict
  • binding_vif_details โ€” read-only. a dictionary that enables the application to pass information about functions that the Networking API provides. to enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False. Type: dict
  • binding_vif_type โ€” read-only. the vif type for the specified port.
  • binding_vnic_type โ€” the vnic type that is bound to the neutron port.

in POST and PUT operations, specify a value of normal (virtual nic), direct (pci passthrough), or macvtap (virtual interface with a tap-like software interface). these values support SR-IOV PCI passthrough networking. the ML2 plug-in supports the vnic_type.

in GET operations, the binding:vnic_type extended attribute is visible to only port owners and administrative users. so if you can't see it, that's why, bestie ๐Ÿ‘€

  • created_at โ€” timestamp when the port was created.
  • data_plane_status โ€” underlying data plane status of this port.
  • description โ€” the port description.
  • device_id โ€” device ID of this port.
  • device_owner โ€” device owner of this port (e.g. network:dhcp).
  • dns_assignment โ€” DNS assignment for the port.
  • dns_domain โ€” DNS domain assigned to the port.
  • dns_name โ€” DNS name for the port.
  • extra_dhcp_opts โ€” extra DHCP options.
  • fixed_ips โ€” IP addresses for the port. includes the IP address and subnet ID.
  • is_admin_state_up โ€” the admin state of the port: up = True, down = False. Type: bool
  • is_port_security_enabled โ€” the port security status: enabled = True, disabled = False. Type: bool Default: False
  • mac_address โ€” the MAC address of an allowed address pair.
  • name โ€” the port name.
  • network_id โ€” the ID of the attached network.
  • numa_affinity_policy โ€” the NUMA affinity policy defined for this port.
  • project_id โ€” the ID of the project who owns the network. only administrative users can specify a project ID other than their own. so don't try it if that's not you ๐Ÿ”ฅ
  • tenant_id โ€” Tenant_id (deprecated attribute). the sequel nobody asked for ๐Ÿ’€
  • propagate_uplink_status โ€” whether to propagate uplink status of the port. Type: bool
  • pvlan_type โ€” the PVLAN type of the port. can be Promiscuous, Isolated or Community.
  • pvlan_community โ€” the PVLAN community name. only needed if pvlan_type is Community. conditional queen ๐Ÿ’…
  • qos_policy_id โ€” the ID of the QoS policy attached to the port.
  • security_group_ids โ€” the IDs of any attached security groups. Type: list of strs of the security group IDs
  • status โ€” the port status. value is ACTIVE or DOWN.
  • trunk_details โ€” read-only. the trunk referring to this parent port and its subports. present for trunk parent ports if the trunk-details extension is loaded. Type: dict with keys: trunk_id, sub_ports. sub_ports is a list of dicts with keys: port_id, segmentation_type, segmentation_id, mac_address nested dicts go brrr โœจ
  • trusted โ€” status of the trusted VIF setting. this value is added to the binding:profile field and passed to services which needs, it, like Nova.
  • updated_at โ€” timestamp when the port was last updated.

openstack.network.v2.qos_bandwidth_limit_rule

The QoSBandwidthLimitRule Class

the QoSBandwidthLimitRule class inherits from Resource <#openstack.resource.Resource>. and that's where this part leaves you, bestie โ€” more incoming ๐ŸŽ€

class openstack.network.v2.qos_bandwidth_limit_rule.QoSBandwidthLimitRule(_synchronized=False, connection=None, **attrs)

Bestie it's the base resource โ€” that's genuinely the whole description, no cap. ๐Ÿ’…

Parameters ๐Ÿซถ

  • _synchronized โ€” okay so do not use this one directly, fr. Peep new() and existing() instead (the page keeps pointing at openstack.resource.Resource.new and openstack.resource.Resource.existing).
  • connection โ€” the reference to the Connection being used. Defaults to None so you can have Resource objects with no live connection at all (unit tests love this, lowkey iconic). And if you're writing Resource code with self._connection, protect yourself with a check for None first. ๐Ÿ‘‘
  • resource_key = 'bandwidth_limit_rule' โ€” singular form of the key for the resource.
  • resources_key = 'bandwidth_limit_rules' โ€” plural form of the key for the resource.
  • base_path = '/qos/policies/%(qos_policy_id)s/bandwidth_limit_rules' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation? allowed, slay.
  • allow_fetch = True โ€” get operation? allowed ๐Ÿ’–
  • allow_commit = True โ€” update operation? allowed โœจ
  • allow_delete = True โ€” delete operation? allowed ๐Ÿ—‘๏ธ
  • allow_list = True โ€” list operation? allowed ๐ŸŽ€

Attributes, because yes there are more:

  • qos_policy_id โ€” the ID of the QoS policy who owns the rule.
  • max_kbps โ€” maximum bandwidth, in kbps.
  • max_burst_kbps โ€” maximum burst bandwidth, in kbps.
  • direction โ€” traffic direction from the project point of view: 'egress' or 'ingress'.

๐Ÿฆ‹ openstack.network.v2.qos_dscp_marking_rule

The QoSDSCPMarkingRule Class

The QoSDSCPMarkingRule class inherits from Resource (that's openstack.resource.Resource in the link, iykyk).

class openstack.network.v2.qos_dscp_marking_rule.QoSDSCPMarkingRule(_synchronized=False, connection=None, **attrs)

Again: the base resource. Iconic of it honestly.

Parameters ๐ŸŒธ

  • _synchronized โ€” not for direct use, bestie, I'm begging. Go through new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing) instead.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active connection (unit tests, we love you). Any self._connection use in Resource code should guard itself with a None check. ๐Ÿ’œ
  • resource_key = 'dscp_marking_rule' โ€” singular form of the key for the resource.
  • resources_key = 'dscp_marking_rules' โ€” plural form of the key for the resource.
  • base_path = '/qos/policies/%(qos_policy_id)s/dscp_marking_rules' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create: allowed โญ
  • allow_fetch = True โ€” get: allowed โญ
  • allow_commit = True โ€” update: allowed โญ
  • allow_delete = True โ€” delete: allowed โญ
  • allow_list = True โ€” list: allowed โญ
  • qos_policy_id โ€” the ID of the QoS policy who owns the rule.
  • dscp_mark โ€” the DSCP mark field. That's it, that's the field. ๐Ÿ’€

๐ŸŒˆ openstack.network.v2.qos_minimum_bandwidth_rule

The QoSMinimumBandwidthRule Class

The QoSMinimumBandwidthRule class inherits from Resource (openstack.resource.Resource).

class openstack.network.v2.qos_minimum_bandwidth_rule.QoSMinimumBandwidthRule(_synchronized=False, connection=None, **attrs)

Say it with me: the base resource.

Parameters ๐ŸŽ€

  • _synchronized โ€” nope, don't touch it directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active connection (hello, unit tests). Any use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'minimum_bandwidth_rule' โ€” singular form of the key for the resource.
  • resources_key = 'minimum_bandwidth_rules' โ€” plural form of the key for the resource.
  • base_path = '/qos/policies/%(qos_policy_id)s/minimum_bandwidth_rules' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation allowed.
  • allow_fetch = True โ€” get operation allowed.
  • allow_commit = True โ€” update operation allowed.
  • allow_delete = True โ€” delete operation allowed.
  • allow_list = True โ€” list operation allowed.
  • qos_policy_id โ€” the ID of the QoS policy who owns the rule.
  • min_kbps โ€” minimum bandwidth, in kbps.
  • direction โ€” traffic direction from the project point of view. Valid values: 'egress'. Just the one, she's exclusive. ๐Ÿ’…

๐Ÿงš openstack.network.v2.qos_minimum_packet_rate_rule

The QoSMinimumPacketRateRule Class

The QoSMinimumPacketRateRule class inherits from Resource (openstack.resource.Resource).

class openstack.network.v2.qos_minimum_packet_rate_rule.QoSMinimumPacketRateRule(_synchronized=False, connection=None, **attrs)

The base resource. Periodt.

Parameters ๐Ÿ“

  • _synchronized โ€” not intended for direct use, bestie. Check new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None, which is what lets Resource objects exist without an active connection โ€” like in unit tests. If Resource code uses self._connection, it should protect itself with a check for None.
  • resource_key = 'minimum_packet_rate_rule' โ€” singular form of the key for the resource.
  • resources_key = 'minimum_packet_rate_rules' โ€” plural form of the key for the resource.
  • base_path = '/qos/policies/%(qos_policy_id)s/minimum_packet_rate_rules' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation allowed.
  • allow_fetch = True โ€” get operation allowed.
  • allow_commit = True โ€” update operation allowed.
  • allow_delete = True โ€” delete operation allowed.
  • allow_list = True โ€” list operation allowed.
  • direction โ€” traffic direction from the project point of view. Valid values: ('any', 'egress', 'ingress') โ€” she's got options, main character energy.
  • min_kpps โ€” minimum packet rate, in kpps.
  • qos_policy_id โ€” the ID of the QoS policy who owns the rule.

๐Ÿ”ฅ openstack.network.v2.qos_packet_rate_limit_rule

The QoSPacketRateLimitRule Class

The QoSPacketRateLimitRule class inherits from Resource (openstack.resource.Resource).

class openstack.network.v2.qos_packet_rate_limit_rule.QoSPacketRateLimitRule(_synchronized=False, connection=None, **attrs)

Base resource, we been knew. ๐Ÿ’–

Parameters ๐Ÿ™ˆ

  • _synchronized โ€” yeah no, not directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'packet_rate_limit_rule' โ€” singular form of the key for the resource.
  • resources_key = 'packet_rate_limit_rules' โ€” plural form of the key for the resource.
  • base_path = '/qos/policies/%(qos_policy_id)s/packet_rate_limit_rules' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation allowed.
  • allow_fetch = True โ€” get operation allowed.
  • allow_commit = True โ€” update operation allowed.
  • allow_delete = True โ€” delete operation allowed.
  • allow_list = True โ€” list operation allowed.
  • qos_policy_id โ€” the ID of the QoS policy who owns the rule.
  • max_kpps โ€” maximum packet rate, in kpps.
  • max_burst_kpps โ€” maximum burst packet rate, in kpps.

๐Ÿ‘‘ openstack.network.v2.qos_policy

The QoSPolicy Class

The QoSPolicy class inherits from Resource (openstack.resource.Resource). Yes queen, the big one.

class openstack.network.v2.qos_policy.QoSPolicy(_synchronized=False, connection=None, **attrs)

And once more with feeling: the base resource.

Parameters ๐Ÿซถ

  • _synchronized โ€” this is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'policy' โ€” singular form of the key for the resource.
  • resources_key = 'policies' โ€” plural form of the key for the resource.
  • base_path = '/qos/policies' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” green light for the delete operation on this resource. ๐Ÿ—‘๏ธ
  • allow_list = True โ€” and yep, you can list it too. We stay permissive.
  • name โ€” the QoS policy name. ๐Ÿ“›
  • project_id โ€” the ID of the project who owns the network. Heads up though: only administrative users can specify a project ID that isn't their own. ๐Ÿ‘€
  • tenant_id โ€” Tenant_id (deprecated attribute). She's old, she's deprecated, she's still in the docs, so here she stays. ๐Ÿ’€
  • description โ€” the QoS policy description. ๐Ÿ“
  • is_default โ€” indicates whether this QoS policy is the default policy for this project. Type: bool ๐Ÿ‘‘
  • is_shared โ€” indicates whether this QoS policy is shared across all projects. Type: bool ๐ŸŒ
  • rules โ€” list of QoS rules applied to this QoS policy. ๐Ÿ“‹

set_tags(session, tags)

Sets/replaces all tags on the resource. Not "adds" โ€” replaces. Like, the whole tag list, gone, swapped. So maybe don't do that to your fave resource unless you mean it, bestie. ๐Ÿ˜ญ

Parameters:

  • session โ€” the session to use for making this request.
  • tags (list) โ€” list with tags to be set on the resource.

๐Ÿฆ‹ openstack.network.v2.qos_rule_type

The QoSRuleType Class

The QoSRuleType class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.qos_rule_type.QoSRuleType(_synchronized=False,
connection=None, **attrs)

The base resource. Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ›ก๏ธ
  • resource_key = 'rule_type' โ€” singular form of the key for this resource.
  • resources_key = 'rule_types' โ€” plural form of the key for this resource.
  • base_path = '/qos/rule-types' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” nope, no creating these.
  • allow_fetch = True โ€” fetching? absolutely, go off. โœจ
  • allow_commit = False โ€” no updating either.
  • allow_delete = False โ€” and no deleting. Read-only energy, honestly iconic.
  • allow_list = True โ€” but listing is fully allowed. ๐ŸŒˆ
  • type โ€” QoS rule type name.
  • drivers โ€” list of QoS backend drivers supporting this QoS rule type. ๐Ÿš—

๐ŸŽ€ openstack.network.v2.quota

The Quota Class

The Quota class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.quota.Quota(_synchronized=False,
connection=None, **attrs)

The base resource. Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿ”Œ
  • resource_key = 'quota' โ€” singular form of the key for this resource.
  • resources_key = 'quotas' โ€” plural form of the key for this resource.
  • base_path = '/quotas' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” get operation? allowed. ๐Ÿ’–
  • allow_commit = True โ€” update operation? allowed.
  • allow_delete = True โ€” delete operation? allowed, queen. ๐Ÿ‘‘
  • allow_list = True โ€” list operation? allowed.
  • check_limit โ€” flag to check the quota usage before setting the new limit. Type: bool ๐Ÿšฆ
  • floating_ips โ€” the maximum amount of floating IPs you can have. Type: int
  • health_monitors โ€” the maximum amount of health monitors you can create. Type: int
  • listeners โ€” the maximum amount of listeners you can create. Type: int
  • load_balancers โ€” the maximum amount of load balancers you can create. Type: int
  • l7_policies โ€” the maximum amount of L7 policies you can create. Type: int
  • networks โ€” the maximum amount of networks you can create. Type: int
  • pools โ€” the maximum amount of pools you can create. Type: int
  • ports โ€” the maximum amount of ports you can create. Type: int
  • project_id โ€” the ID of the project these quota values are for.
  • tenant_id โ€” Tenant_id (deprecated attribute). Still deprecated, still here. ๐Ÿ’€
  • rbac_policies โ€” the maximum amount of RBAC policies you can create. Type: int
  • router_routes โ€” the maximum amount of router routes you can create. Type: int
  • routers โ€” the maximum amount of routers you can create. Type: int
  • subnets โ€” the maximum amount of subnets you can create. Type: int
  • subnet_pools โ€” the maximum amount of subnet pools you can create. Type: int
  • security_group_rules โ€” the maximum amount of security group rules you can create. Type: int
  • security_groups โ€” the maximum amount of security groups you can create. Type: int

๐Ÿ’œ openstack.network.v2.rbac_policy

The RBACPolicy Class

The RBACPolicy class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.rbac_policy.RBACPolicy(_synchronized=False,
connection=None, **attrs)

The base resource. Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ
  • resource_key = 'rbac_policy' โ€” singular form of the key for this resource.
  • resources_key = 'rbac_policies' โ€” plural form of the key for this resource.
  • base_path = '/rbac-policies' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation? allowed. โœจ
  • allow_fetch = True โ€” get operation? allowed.
  • allow_commit = True โ€” update operation? allowed.
  • allow_delete = True โ€” delete operation? allowed.
  • allow_list = True โ€” list operation? allowed. Full send, all five. ๐Ÿ”ฅ
  • object_id โ€” ID of the object that this RBAC policy affects.
  • target_project_id โ€” the ID of the project this RBAC will be enforced.
  • project_id โ€” the owner project ID.
  • tenant_id โ€” Tenant_id (deprecated attribute). ๐Ÿ™ˆ
  • object_type โ€” type of the object that this RBAC policy affects.
  • action โ€” action for the RBAC policy.

๐ŸŒธ openstack.network.v2.router

The Router Class

The Router class inherits from Resource <#openstack.resource.Resource>.

class openstack.network.v2.router.Router(_synchronized=False,
connection=None, **attrs)

The base resource. Parameters:

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿงš
  • resource_key = 'router' โ€” singular form of the key for this resource.
  • resources_key = 'routers' โ€” plural form of the key for this resource.
  • base_path = '/routers' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create operation? allowed. ๐ŸŽ€
  • allow_fetch = True โ€” get operation? allowed.
  • allow_commit = True โ€” update operation? allowed.
  • allow_delete = True โ€” delete operation? allowed.
  • allow_list = True โ€” list operation? allowed. The full set, no notes. ๐Ÿ’…
  • availability_zone_hints โ€” availability zone hints to use when scheduling the router. Type: list of availability zone names ๐Ÿ—บ๏ธ
  • availability_zones โ€” availability zones for the router. Type: list of availability zone names
  • created_at โ€” timestamp when the router was created.
  • description โ€” the router description. ๐Ÿ“
  • enable_ndp_proxy โ€” the ndp proxy state of the router.
  • evpn_vni โ€” the EVPN VNI associated with the router, or None if EVPN is not configured. Type: int
  • external_gateway_info โ€” the network_id, for the external gateway. Type: dict
  • flavor_id โ€” the ID of the flavor.
  • is_admin_state_up โ€” the administrative state of the router, which is up True or down False. Type: bool โฌ†๏ธโฌ‡๏ธ
  • is_distributed โ€” the distributed state of the router, which is distributed True or not False. Type: bool
  • is_ha โ€” the highly-available state of the router: highly available True or not False. Type: bool ๐ŸŒธ
  • name โ€” the router's name, bestie.
  • project_id โ€” the ID of the project this router is associated with.
  • tenant_id โ€” Tenant_id (deprecated attribute). ๐Ÿ’€ yeah she's old, noted.
  • revision_number โ€” revision number of the router. Type: int
  • routes โ€” the extra routes configuration for the router.
  • status โ€” the router status.
  • updated_at โ€” timestamp when the router was created.
  • add_interface(session, **body) โ€” add an internal interface to a logical router. ๐Ÿซถ

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.

Raises SDKException <#openstack.exceptions.SDKException> on error.

  • remove_interface(session, **body) โ€” remove an internal interface from a logical router.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.

Raises SDKException <#openstack.exceptions.SDKException> on error.

  • add_extra_routes(session, body) โ€” add extra routes to a logical router. โœจ

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the request body as documented in the api-ref.

Returns the response as a Router object with the added extra routes.

Raises SDKException <#openstack.exceptions.SDKException> on error.

  • remove_extra_routes(session, body) โ€” remove extra routes from a logical router.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the request body as documented in the api-ref.

Returns the response as a Router object with the extra routes left.

Raises SDKException <#openstack.exceptions.SDKException> on error.

  • add_gateway(session, **body) โ€” add an external gateway to a logical router.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.

  • remove_gateway(session, **body) โ€” remove an external gateway from a logical router.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.

  • add_external_gateways(session, body) โ€” add external gateways to a router. ๐Ÿฆ‹

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.

  • update_external_gateways(session, body) โ€” update external gateways of a router.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.

  • remove_external_gateways(session, body) โ€” remove external gateways from a router.

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body (dict) โ€” the body requested to be updated on the router.

Returns the body of the response as a dictionary.


๐ŸŒˆ openstack.network.v2.security_group

๐ŸŽ€ The SecurityGroup Class

okay so the SecurityGroup class inherits from Resource <#openstack.resource.Resource> โ€” classic inheritance moment, we love to see it ๐Ÿ’…

class openstack.network.v2.security_group.SecurityGroup(_synchronized=False, connection=None, **attrs)

The base resource. ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ
  • resource_key = 'security_group' โ€” singular form of key for resource.
  • resources_key = 'security_groups' โ€” plural form of key for resource.
  • base_path = '/security-groups' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • created_at โ€” timestamp when the security group was created.
  • description โ€” the security group description.
  • name โ€” the security group name.
  • stateful โ€” whether the security group is stateful or not.
  • project_id โ€” the ID of the project this security group is associated with.
  • security_group_rules โ€” a list of SecurityGroupRule <#openstack.network.v2.security_group_rule.SecurityGroupRule> objects. Type: list ๐ŸŒธ
  • tenant_id โ€” the ID of the project this security group is associated with.
  • updated_at โ€” timestamp when the security group was last updated.
  • is_shared โ€” indicates whether this Security Group is shared across all projects. Type: bool

๐ŸŒˆ openstack.network.v2.security_group_rule

๐ŸŽ€ The SecurityGroupRule Class

and the SecurityGroupRule class also inherits from Resource <#openstack.resource.Resource> โ€” family business fr fr ๐Ÿ’–

class openstack.network.v2.security_group_rule.SecurityGroupRule(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'security_group_rule' โ€” singular form of key for resource.
  • resources_key = 'security_group_rules' โ€” plural form of key for resource.
  • base_path = '/security-group-rules' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = False โ€” allow update operation for this resource. nope, no updating this one ๐Ÿ™ˆ
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • created_at โ€” timestamp when the security group rule was created.
  • description โ€” the security group rule description.
  • direction โ€” ingress or egress: the direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming ingress traffic for that instance. An egress rule is applied to traffic leaving the instance. ๐Ÿšชโœจ
  • ether_type โ€” must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
  • port_range_max โ€” the maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
  • port_range_min โ€” the minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
  • project_id โ€” the ID of the project this security group rule is associated with.
  • protocol โ€” the protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp. ๐Ÿ”ฅ
  • remote_group_id โ€” The remote security group ID to be associated with this security group rule. You can specify either remote_group_id or remote_address_group_id or remote_ip_prefix.
  • remote_address_group_id โ€” The remote address group ID to be associated with this security group rule. You can specify either remote_group_id or remote_address_group_id or remote_ip_prefix.
  • remote_ip_prefix โ€” The remote IP prefix to be associated with this security group rule. You can specify either remote_group_id or remote_address_group_id or remote_ip_prefix. This attribute matches the specified IP prefix as the source or destination IP address of the IP packet depending on direction.
  • security_group_id โ€” The security group ID to associate with this security group rule.
  • tenant_id โ€” The ID of the project this security group rule is associated with.
  • updated_at โ€” Timestamp when the security group rule was last updated.

๐ŸŒธ openstack.network.v2.segment

The Segment Class

The Segment class inherits from Resource.

class openstack.network.v2.segment.Segment(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'segment' โ€” Singular form of key for resource.
  • resources_key = 'segments' โ€” Plural form of key for resource.
  • base_path = '/segments' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • description โ€” The segment description.
  • name โ€” The segment name.
  • network_id โ€” The ID of the network associated with this segment.
  • network_type โ€” The type of network associated with this segment, such as flat, geneve, gre, local, vlan or vxlan.
  • physical_network โ€” The name of the physical network associated with this segment.
  • segmentation_id โ€” The segmentation ID for this segment. The network type defines the segmentation model, VLAN ID for vlan network type and tunnel ID for geneve, gre and vxlan network types. Type: int.

๐ŸŽ€ openstack.network.v2.service_profile

The ServiceProfile Class

The ServiceProfile class inherits from Resource.

class openstack.network.v2.service_profile.ServiceProfile(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'service_profile' โ€” Singular form of key for resource.
  • resources_key = 'service_profiles' โ€” Plural form of key for resource.
  • base_path = '/service_profiles' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • description โ€” Description of the service flavor profile.
  • driver โ€” Provider driver for the service flavor profile.
  • is_enabled โ€” Sets enabled flag.
  • meta_info โ€” Metainformation of the service flavor profile.
  • project_id โ€” The owner project ID.
  • tenant_id โ€” Tenant_id (deprecated attribute).

๐Ÿฆ‹ openstack.network.v2.service_provider

The Service Provider Class

The ServiceProvider class inherits from Resource.

class openstack.network.v2.service_provider.ServiceProvider(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resources_key = 'service_providers' โ€” Plural form of key for resource.
  • base_path = '/service-providers' โ€” The base part of the URI for this resource.
  • allow_create = False โ€” Allow create operation for this resource.
  • allow_fetch = False โ€” Allow get operation for this resource.
  • allow_commit = False โ€” Allow update operation for this resource.
  • allow_delete = False โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • service_type โ€” Service type (FIREWALL, FLAVORS, METERING, QOS, etc..).
  • name โ€” Name of the service type.
  • is_default โ€” The default value of service type.

๐Ÿ’œ openstack.network.v2.sfc_flow_classifier

The SfcFlowClassifier Class

The SfcFlowClassifier class inherits from Resource.

class openstack.network.v2.sfc_flow_classifier.SfcFlowClassifier(_synchronized=False,
connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() and existing().
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'flow_classifier' โ€” Singular form of key for resource.
  • resources_key = 'flow_classifiers' โ€” Plural form of key for resource.
  • base_path = '/sfc/flow_classifiers' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • description โ€” Human-readable description for the resource.
  • name โ€” Human-readable name of the resource. Default is an empty string.
  • protocol โ€” The IP protocol can be represented by a string, an integer, or null. Valid values: any (0), ah (51), dccp (33), egp (8), esp (50), gre (47), icmp (1), icmpv6 (58), igmp (2), ipip (4), ipv6-encap (41), ipv6-frag (44), ipv6-icmp (58), ipv6-nonxt (59), ipv6-opts (60), ipv6-route (43), ospf (89), pgm (113), rsvp (46), sctp (132), tcp (6), udp (17), udplite (136), vrrp (112).
  • source_port_range_min โ€” Minimum source protocol port.
  • source_port_range_max โ€” Maximum source protocol port.
  • destination_port_range_min โ€” Minimum destination protocol port.
  • destination_port_range_max โ€” Maximum destination protocol port.
  • source_ip_prefix โ€” The source IP prefix.
  • destination_ip_prefix โ€” The destination IP prefix.
  • logical_source_port โ€” The UUID of the source logical port.
  • logical_destination_port โ€” The UUID of the destination logical port.
  • l7_parameters โ€” A dictionary of L7 parameters, in the form of logical_source_network: uuid, logical_destination_network: uuid.
  • summary โ€” Summary field of a Flow Classifier, composed of the protocol, source protocol port, destination protocol port, logical_source_port, logical_destination_port and l7_parameters.
  • tenant_id โ€” Tenant_id (deprecated attribute).

๐ŸŒˆ openstack.network.v2.sfc_port_chain

The SfcPortChain Class

The SfcPortChain class inherits from Resource.

openstack.network.v2.sfc_port_chain โ€” the SfcPortChain Class ๐Ÿ’…

Lowkey obsessed with this one. It inherits from Resource (iykyk).

class openstack.network.v2.sfc_port_chain.SfcPortChain(_synchronized=False, connection=None, **attrs)

โœจ The base resource

Parameters โ€” yes bestie, same two as always:

  • _synchronized โ€” do not use this directly, fr fr. Peep new() and existing() instead.
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection (think unit tests ๐Ÿงช). Any use of self._connection inside Resource code should protect itself with a None check.

The class attributes, no cap:

  • resource_key = 'port_chain' โ€” the singular form of the key for this resource.
  • resources_key = 'port_chains' โ€” the plural form, periodt.
  • base_path = '/sfc/port_chains' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” create is allowed.
  • allow_fetch = True โ€” get is allowed.
  • allow_commit = True โ€” update is allowed.
  • allow_delete = True โ€” delete is allowed.
  • allow_list = True โ€” list is allowed. all five? she ate.

And the actual data fields:

  • description โ€” human-readable description for the resource.
  • name โ€” human-readable name of the resource. Default is an empty string.
  • port_pair_groups โ€” list of port-pair-group UUIDs.
  • flow_classifiers โ€” list of flow-classifier UUIDs.
  • chain_parameters โ€” a dictionary of chain parameters; correlation values can be mpls and nsh, symmetric can be True or False.
  • tenant_id โ€” Tenant_id (deprecated attribute โš ๏ธ she's old, we still list her).

openstack.network.v2.sfc_port_pair โ€” the SfcPortPair Class ๐Ÿฆ‹

Inherits from Resource, obviously.

class openstack.network.v2.sfc_port_pair.SfcPortPair(_synchronized=False, connection=None, **attrs)

โœจ The base resource

Parameters:

  • _synchronized โ€” not for direct use, bestie. See new() and existing().
  • connection โ€” reference to the Connection in play. Defaults to None so Resource objects can chill without an active Connection, like in unit tests. Guard any self._connection usage in Resource code with a None check.

Class attributes:

  • resource_key = 'port_pair' โ€” singular key form.
  • resources_key = 'port_pairs' โ€” plural key form.
  • base_path = '/sfc/port_pairs' โ€” base part of the URI.
  • allow_create = True
  • allow_fetch = True
  • allow_commit = True
  • allow_delete = True
  • allow_list = True โ€” every operation green-lit, we love a flexible queen ๐Ÿ‘‘

Fields:

  • description โ€” human-readable description for the resource.
  • name โ€” human-readable name. Default is an empty string.
  • ingress โ€” the UUID of the ingress Neutron port.
  • egress โ€” the UUID of the egress Neutron port.
  • service_function_parameters โ€” a dictionary of service function parameters. correlation values can be mpls and nsh; weight can be an int.
  • tenant_id โ€” Tenant_id (deprecated attribute).

openstack.network.v2.sfc_port_pair_group โ€” the SfcPortPairGroup Class ๐ŸŽ€

Inherits from Resource.

class openstack.network.v2.sfc_port_pair_group.SfcPortPairGroup(_synchronized=False, connection=None, **attrs)

โœจ The base resource

Parameters:

  • _synchronized โ€” seriously, don't touch it directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None, so Resource objects work without an active Connection (unit tests, hii ๐Ÿ‘‹). self._connection in Resource code should check for None first.

Class attributes:

  • resource_key = 'port_pair_group' โ€” singular key form.
  • resources_key = 'port_pair_groups' โ€” plural key form.
  • base_path = '/sfc/port_pair_groups' โ€” base part of the URI.
  • allow_create = True
  • allow_fetch = True
  • allow_commit = True
  • allow_delete = True
  • allow_list = True

Fields:

  • description โ€” human-readable description for the resource.
  • name โ€” human-readable name. Default is an empty string.
  • port_pairs โ€” list of port-pair UUIDs.
  • port_pair_group_parameters โ€” dictionary of port pair group parameters, shaped like lb_fields: list of regex (eth|ip|tcp|udp)_(src|dst), and ppg_n_tuple_mapping: ingress_n_tuple or egress_n_tuple. The ingress or egress tuple is a dict with these keys: source_ip_prefix, destination_ip_prefix, source_port_range_min, source_port_range_max, destination_port_range_min, destination_port_range_max. (Yeah it's a lot โ€” copy them exact, bestie.)
  • is_tap_enabled โ€” True if passive Tap service functions support is enabled; default is False.
  • tenant_id โ€” Tenant_id (deprecated attribute).

openstack.network.v2.sfc_service_graph โ€” the SfcServiceGraph Class ๐ŸŒˆ

Inherits from Resource. Main character energy, honestly.

class openstack.network.v2.sfc_service_graph.SfcServiceGraph(_synchronized=False, connection=None, **attrs)

โœจ The base resource

Parameters:

  • _synchronized โ€” not intended for direct use. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a None check.

Class attributes:

  • resource_key = 'service_graph' โ€” singular key form.
  • resources_key = 'service_graphs' โ€” plural key form.
  • base_path = '/sfc/service_graphs' โ€” base part of the URI.
  • allow_create = True
  • allow_fetch = True
  • allow_commit = True
  • allow_delete = True
  • allow_list = True

Fields:

  • description โ€” human-readable description for the resource.
  • name โ€” human-readable name. Default is an empty string.
  • port_chains โ€” a dictionary where the key is the source port chain and the value is a list of destination port chains.
  • tenant_id โ€” Tenant_id (deprecated attribute).

openstack.network.v2.subnet โ€” the Subnet Class ๐Ÿซถ

The icon herself. Inherits from Resource.

class openstack.network.v2.subnet.Subnet(_synchronized=False, connection=None, **attrs)

โœจ The base resource

Parameters:

  • _synchronized โ€” do not use directly, please and thank you. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = 'subnet' โ€” singular key form for the resource.
  • resources_key = 'subnets' โ€” plural key form for the resource.
  • base_path = '/subnets' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create for this resource.
  • allow_fetch = True โ€” allow get for this resource.
  • allow_commit = True โ€” allow update for this resource.
  • allow_delete = True โ€” allow delete for this resource.
  • allow_list = True โ€” allow list for this resource.

Fields (get comfy, there's a bunch):

  • allocation_pools โ€” list of allocation pools, each of which has a start and an end address for this subnet.
  • cidr โ€” the CIDR.
  • created_at โ€” timestamp when the subnet was created.
  • description โ€” the subnet description.
  • dns_nameservers โ€” a list of DNS nameservers.
  • dns_publish_fixed_ip โ€” whether to publish DNS records for fixed IPs.
  • gateway_ip โ€” the gateway IP address.
  • host_routes โ€” a list of host routes.

okay so the subnet attributes finish out like this:

  • ip_version โ€” the IP version, which is 4 or 6. Type: int
  • ipv6_address_mode โ€” the IPv6 address modes which are 'dhcpv6-stateful', 'dhcpv6-stateless' or 'slaac'.
  • ipv6_ra_mode โ€” the IPv6 router advertisements modes which can be 'slaac', 'dhcpv6-stateful', 'dhcpv6-stateless'.
  • is_dhcp_enabled โ€” set to True if DHCP is enabled and False if DHCP is disabled. Type: bool
  • name โ€” the subnet name.
  • network_id โ€” the ID of the attached network.
  • prefix_length โ€” the prefix length to use for subnet allocation from a subnet pool
  • project_id โ€” the ID of the project this subnet is associated with.
  • tenant_id โ€” Tenant_id (deprecated attribute). โš ๏ธ
  • segment_id โ€” the ID of the segment this subnet is associated with.
  • service_types โ€” service types for this subnet
  • subnet_pool_id โ€” the subnet pool ID from which to obtain a CIDR.
  • updated_at โ€” timestamp when the subnet was last updated.
  • use_default_subnet_pool โ€” whether to use the default subnet pool to obtain a CIDR.

๐ŸŒธ openstack.network.v2.subnet_pool ๐ŸŒธ

๐Ÿ’… The SubnetPool Class

the SubnetPool class inherits from Resource. periodt.

class openstack.network.v2.subnet_pool.SubnetPool(_synchronized=False,
connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'subnetpool' โ€” singular form of key for resource. โœจ
  • resources_key = 'subnetpools' โ€” plural form of key for resource.
  • base_path = '/subnetpools' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • address_scope_id โ€” the ID of the address scope associated with the subnet pool.
  • created_at โ€” timestamp when the subnet pool was created.
  • default_prefix_length โ€” the length of the prefix to allocate when the cidr or prefixlen attributes are omitted when creating a subnet. Type: int
  • default_quota โ€” a per-project quota on the prefix space that can be allocated from the subnet pool for project subnets. For IPv4 subnet pools, default_quota is measured in units of /32. For IPv6 subnet pools, default_quota is measured units of /64. All projects that use the subnet pool have the same prefix quota applied. Type: int
  • description โ€” the subnet pool description.
  • ip_version โ€” Read-only. the IP address family of the list of prefixes. Type: int
  • is_default โ€” whether or not this is the default subnet pool. Type: bool
  • is_shared โ€” indicates whether this subnet pool is shared across all projects. Type: bool
  • maximum_prefix_length โ€” the maximum prefix length that can be allocated from the subnet pool. Type: int
  • minimum_prefix_length โ€” the minimum prefix length that can be allocated from the subnet pool. Type: int
  • name โ€” the subnet pool name.
  • project_id โ€” the ID of the project that owns the subnet pool.
  • tenant_id โ€” Tenant_id (deprecated attribute). โš ๏ธ
  • prefixes โ€” a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Type: list
  • revision_number โ€” revision number of the subnet pool. Type: int
  • updated_at โ€” timestamp when the subnet pool was last updated.

๐Ÿงš subnet_onboard(session, **body)

onboard network subnets into a subnet pool. it's giving admin magic โœจ

Parameters

  • session (Adapter) โ€” the session to communicate through.
  • body โ€” the request body (network_id).

Returns โ€” the response body as a dictionary.

Raises โ€” SDKException on error.


๐Ÿฆ‹ openstack.network.v2.tap_flow ๐Ÿฆ‹

๐Ÿ’– The TapFlow Class

the TapFlow class inherits from Resource.

class openstack.network.v2.tap_flow.TapFlow(_synchronized=False,
connection=None, **attrs)

Tap Flow

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'tap_flow' โ€” singular form of key for resource.
  • resources_key = 'tap_flows' โ€” plural form of key for resource.
  • base_path = '/taas/tap_flows' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • id โ€” the ID of the tap flow.
  • name โ€” the tap flow's name.
  • description โ€” the tap flow's description.
  • project_id โ€” the ID of the project that owns the tap flow.
  • tenant_id โ€” Tenant_id (deprecated attribute). โš ๏ธ
  • tap_service_id โ€” the id of the tap_service with which the tap flow is associated
  • direction โ€” the direction of the tap flow.
  • status โ€” the status for the tap flow.
  • source_port โ€” the id of the port the tap flow is associated with

๐ŸŒˆ openstack.network.v2.tap_mirror ๐ŸŒˆ

๐ŸŽ€ The TapMirror Class

the TapMirror class inherits from Resource.

class openstack.network.v2.tap_mirror.TapMirror(_synchronized=False,
connection=None, **attrs)

Tap Mirror

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'tap_mirror' โ€” singular form of key for resource.
  • resources_key = 'tap_mirrors' โ€” plural form of key for resource.
  • base_path = '/taas/tap_mirrors' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • id โ€” the ID of the Tap Mirror.
  • name โ€” the Tap Mirror name.
  • description โ€” the Tap Mirror description.
  • project_id โ€” the ID of the project that owns the Tap Mirror.
  • tenant_id โ€” Tenant_id (deprecated attribute). โš ๏ธ
  • port_id โ€” the id of the port the Tap Mirror is associated with
  • directions โ€” the status for the tap service.
  • remote_ip โ€” the destination IP address of the Tap Mirror
  • mirror_type โ€” the type of the Tap Mirror, it can be gre or erspanv1

๐ŸŒŸ openstack.network.v2.tap_service ๐ŸŒŸ

๐Ÿซถ The TapService Class

the TapService class inherits from Resource.

class openstack.network.v2.tap_service.TapService(_synchronized=False,
connection=None, **attrs)

Tap Service

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'tap_service' โ€” the singular form of the key for this resource, iykyk โœจ
  • resources_key = 'tap_services' โ€” and the plural form of the key for the resource ๐ŸŽ€
  • base_path = '/taas/tap_services' โ€” the base part of the URI for this resource, literally just that ๐Ÿ’…
  • allow_create = True โ€” yep, create operations are allowed on this one ๐Ÿซถ
  • allow_fetch = True โ€” and get operations too, no cap
  • allow_commit = True โ€” update operations? allowed. slay โœจ
  • allow_delete = True โ€” delete operations also on the menu ๐Ÿ’€
  • allow_list = True โ€” and listing, obviously, it's giving full permissions ๐ŸŒˆ
  • id โ€” the ID of the tap service ๐Ÿ”ฅ
  • name โ€” the tap service name ๐ŸŒธ
  • description โ€” the tap service description ๐ŸŽ€
  • project_id โ€” the ID of the project that owns the tap service ๐Ÿ‘‘
  • tenant_id โ€” Tenant_id, and bestie it's a deprecated attribute, so likeโ€ฆ noted ๐Ÿ’€
  • port_id โ€” the id of the port the tap service is associated with ๐Ÿฆ‹
  • status โ€” the status for the tap service โญ

๐Ÿฆ‹ VPNaaS Resources ๐Ÿฆ‹

๐ŸŒธ openstack.network.v2.vpn_endpoint_group ๐ŸŒธ

The VpnEndpointGroup Class โœจ

The VpnEndpointGroup class inherits from Resource <#openstack.resource.Resource>. Inheritance, we love to see it ๐Ÿ’–

class openstack.network.v2.vpn_endpoint_group.VpnEndpointGroup(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly, fr fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. It defaults to None so that Resource objects can be used without an active Connection, like in unit tests ๐Ÿงš. Any use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'endpoint_group' โ€” singular form of key for resource โœจ
  • resources_key = 'endpoint_groups' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/vpn/endpoint-groups' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • allow_create = True โ€” allow create operation for this resource ๐Ÿซถ
  • allow_fetch = True โ€” allow get operation for this resource ๐ŸŒธ
  • allow_commit = True โ€” allow update operation for this resource โœจ
  • allow_delete = True โ€” allow delete operation for this resource ๐Ÿ’€
  • allow_list = True โ€” allow list operation for this resource โญ
  • description โ€” human-readable description for the resource ๐Ÿ’–
  • endpoints โ€” list of endpoints of the same type, for the endpoint group. The values will depend on type ๐Ÿฆ‹
  • name โ€” human-readable name of the resource. Default is an empty string ๐ŸŽ€
  • tenant_id โ€” Tenant_id, and yes it's a deprecated attribute ๐Ÿ’€
  • type โ€” the type of the endpoints in the group. A valid value is subnet, cidr, network, router, or vlan. Only subnet and cidr are supported at this moment, so don't get cute with the others ๐Ÿ™ˆ

๐Ÿ’œ openstack.network.v2.vpn_ike_policy ๐Ÿ’œ

The VpnIkePolicy Class โœจ

The VpnIkePolicy class inherits from Resource <#openstack.resource.Resource>. iconic behavior ๐Ÿ‘‘

class openstack.network.v2.vpn_ike_policy.VpnIkePolicy(_synchronized=False, connection=None, **attrs)

VPN IKE policy extension. ๐Ÿ”ฅ

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests ๐Ÿงš. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'ikepolicy' โ€” singular form of key for resource โœจ
  • resources_key = 'ikepolicies' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/vpn/ikepolicies' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • allow_create = True โ€” allow create operation for this resource ๐Ÿซถ
  • allow_fetch = True โ€” allow get operation for this resource ๐ŸŒธ
  • allow_commit = True โ€” allow update operation for this resource โœจ
  • allow_delete = True โ€” allow delete operation for this resource ๐Ÿ’€
  • allow_list = True โ€” allow list operation for this resource โญ
  • ike_version โ€” the IKE version. A valid value is v1 or v2. Default is v1 ๐Ÿฆ‹
  • name โ€” human-readable name of the resource. Default is an empty string ๐ŸŽ€
  • project_id โ€” the ID of the project ๐Ÿ‘‘
  • phase1_negotiation_mode โ€” the IKE mode. A valid value is main, which is the default ๐Ÿ’…

๐ŸŽ€ openstack.network.v2.vpn_ipsec_policy ๐ŸŽ€

The VpnIpsecPolicy Class โœจ

The VpnIpsecPolicy class inherits from Resource <#openstack.resource.Resource>. we stan a class hierarchy ๐Ÿ’–

class openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” not intended to be used directly, fr fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests ๐Ÿงš. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'ipsecpolicy' โ€” singular form of key for resource โœจ
  • resources_key = 'ipsecpolicies' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/vpn/ipsecpolicies' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • allow_create = True โ€” allow create operation for this resource ๐Ÿซถ
  • allow_fetch = True โ€” allow get operation for this resource ๐ŸŒธ
  • allow_commit = True โ€” allow update operation for this resource โœจ
  • allow_delete = True โ€” allow delete operation for this resource ๐Ÿ’€
  • allow_list = True โ€” allow list operation for this resource โญ
  • encapsulation_mode โ€” the encapsulation mode. A valid value is tunnel or transport ๐Ÿฆ‹
  • name โ€” human-readable name of the resource. Default is an empty string ๐ŸŽ€
  • project_id โ€” the ID of the project ๐Ÿ‘‘
  • phase1_negotiation_mode โ€” the IKE mode. A valid value is main, which is the default ๐Ÿ’…
  • transform_protocol โ€” the transform protocol. A valid value is ESP, AH, or AH-ESP ๐Ÿ”ฅ

๐ŸŒˆ openstack.network.v2.vpn_ipsec_site_connection ๐ŸŒˆ

The VpnIPSecSiteConnection Class โœจ

The VpnIPSecSiteConnection class inherits from Resource <#openstack.resource.Resource>. long name but she's valid ๐Ÿ’…

class openstack.network.v2.vpn_ipsec_site_connection.VpnIPSecSiteConnection(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests ๐Ÿงš. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'ipsec_site_connection' โ€” singular form of key for resource โœจ
  • resources_key = 'ipsec_site_connections' โ€” plural form of key for resource ๐ŸŽ€
  • base_path = '/vpn/ipsec-site-connections' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • allow_create = True โ€” allow create operation for this resource ๐Ÿซถ
  • allow_fetch = True โ€” allow get operation for this resource ๐ŸŒธ
  • allow_commit = True โ€” allow update operation for this resource โœจ
  • allow_delete = True โ€” allow delete operation for this resource ๐Ÿ’€
  • allow_list = True โ€” allow list operation for this resource โญ
  • dpd โ€” a dictionary with dead peer detection (DPD) protocol controls ๐Ÿ’€ (the acronym really said ๐Ÿ’€)
  • ikepolicy_id โ€” the ID of the IKE policy ๐Ÿฆ‹
  • ipsecpolicy_id โ€” the ID of the IPsec policy ๐Ÿฆ‹
  • peer_address โ€” the peer gateway public IPv4 or IPv6 address or FQDN ๐ŸŒธ
  • name โ€” human-readable name of the resource. Default is an empty string ๐ŸŽ€
  • project_id โ€” the ID of the project ๐Ÿ‘‘
  • psk โ€” the pre-shared key. A valid value is any string ๐Ÿ”ฅ
  • route_mode โ€” the route mode. A valid value is static, which is the default ๐Ÿ’…
  • status โ€” the site connection status โญ
  • vpnservice_id โ€” the ID of the VPN service ๐Ÿซถ

๐Ÿ‘‘ openstack.network.v2.vpn_service ๐Ÿ‘‘

The VpnService Class โœจ

The VpnService class inherits from Resource <#openstack.resource.Resource>. main character energy, honestly ๐Ÿ’–

class openstack.network.v2.vpn_service.VpnService(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” not intended to be used directly, fr. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests ๐Ÿงš. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’…
  • resource_key = 'vpnservice' โ€” singular form of key for resource โœจ
  • resources_key = 'vpnservices' โ€” the plural form of the key for this resource, bestie โœจ
  • base_path = '/vpn/vpnservices' โ€” the base part of the URI for this resource, slay ๐ŸŽ€
  • allow_create = True โ€” create operation? allowed, periodt ๐Ÿ’…
  • allow_fetch = True โ€” get operation? also allowed, we love to see it ๐Ÿ’–
  • allow_commit = True โ€” update operation? green light, no cap ๐ŸŸข
  • allow_delete = True โ€” delete operation? yes babes, go off ๐Ÿ”ฅ
  • allow_list = True โ€” list operation? obviously, she contains multitudes โญ
  • description โ€” a human-readable description for the vpnservice, literally just words for humans ๐Ÿซถ
  • external_v4_ip โ€” the external IPv4 address that's used for the VPN service ๐ŸŒˆ
  • external_v6_ip โ€” the external IPv6 address that's used for the VPN service, her sibling ๐Ÿฆ‹
  • is_admin_state_up โ€” the administrative state of the vpnservice, which is up True or down False. Type: bool ๐Ÿ‘‘
  • name โ€” the vpnservice name, iconic as always ๐Ÿ’œ
  • router_id โ€” ID of the router into which the VPN service is inserted ๐Ÿ”Œ
  • project_id โ€” the ID of the project this vpnservice is associated with ๐Ÿท๏ธ
  • tenant_id โ€” Tenant_id (deprecated attribute). It's giving vintage, but deprecated is deprecated, so note it and move on ๐Ÿ™ˆ
  • status โ€” the vpnservice status, her current mood basically ๐Ÿ’€
  • subnet_id โ€” the ID of the subnet on which the tenant wants the vpnservice ๐ŸŒธ

๐Ÿงš Orchestration Resources ๐Ÿงš

๐ŸŽ€ openstack.orchestration.v1.resource

The Resource Class

The Resource class inherits from Resource <#openstack.resource.Resource>. Family tree: noted ๐Ÿ’…

class openstack.orchestration.v1.resource.Resource(_synchronized=False, connection=None, **attrs)
The base resource, aka the blueprint every other bb takes after ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> instead, bestie, don't touch it ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None โš ๏ธ
  • resource_key = 'resource' โ€” singular form of key for resource โœจ
  • resources_key = 'resources' โ€” plural form of key for resource, matching set ๐ŸŒˆ
  • base_path = '/stacks/%(stack_name)s/%(stack_id)s/resources' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = False โ€” create operation? not for this one, she said no ๐Ÿšซ
  • allow_list = True โ€” list operation? yes ma'am ๐Ÿ’–
  • allow_delete = False โ€” delete operation? nope ๐Ÿ™…
  • allow_commit = False โ€” update operation? also nope, we respect the boundaries ๐Ÿ’…
  • links โ€” a list of dictionaries containing links relevant to the resource ๐Ÿ”—
  • logical_resource_id โ€” ID of the logical resource, usually the literal name of the resource as it appears in the stack template ๐Ÿ“
  • name โ€” name of the resource, short and sweet ๐ŸŽ€
  • physical_resource_id โ€” ID of the physical resource (if any) that backs up the resource. For example, it contains a nova server ID if the resource is a nova server ๐Ÿ–ฅ๏ธ
  • required_by โ€” a list of resource names that depend on this resource. This property facilitates the deduction of resource dependencies. Type: list ๐Ÿง 
  • resource_type โ€” a string representation of the resource type ๐Ÿ”ค
  • status โ€” a string representing the status the resource is currently in ๐Ÿ“Š
  • status_reason โ€” a string that explains why the resource is in its current status. The "why tho" field, honestly ๐Ÿ˜ญ
  • updated_at โ€” timestamp of the last update made to the resource ๐Ÿ•ฐ๏ธ

๐Ÿฆ‹ openstack.orchestration.v1.software_config

The SoftwareConfig Class

The SoftwareConfig class inherits from Resource <#openstack.resource.Resource>. Another nepo baby, but make it config ๐Ÿ’œ

class openstack.orchestration.v1.software_config.SoftwareConfig(_synchronized=False, connection=None, **attrs)
The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None โš ๏ธ
  • resource_key = 'software_config' โ€” singular form of key for resource โœจ
  • resources_key = 'software_configs' โ€” plural form of key for resource ๐ŸŒˆ
  • base_path = '/software_configs' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create operation? absolutely, go off ๐Ÿ”ฅ
  • allow_list = True โ€” list operation? yes babes ๐Ÿ’–
  • allow_fetch = True โ€” get operation? mhm ๐Ÿซถ
  • allow_delete = True โ€” delete operation? she can, and she will ๐Ÿ’…
  • allow_commit = False โ€” update operation? not here, no thank you ๐Ÿšซ
  • create_opts = CreateOpts(request_key=None, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create() โš™๏ธ
  • config โ€” configuration script or manifest that defines which configuration is performed ๐Ÿ“œ
  • created_at โ€” the date and time when the software config resource was created ๐Ÿ•ฐ๏ธ
  • group โ€” a string indicating the namespace used for grouping software configs ๐Ÿ—‚๏ธ
  • inputs โ€” a list of schemas each representing an input this software config expects ๐Ÿ“ฅ
  • name โ€” name of the software config ๐ŸŽ€
  • options โ€” a string that contains options that are specific to the configuration management tool that this resource uses ๐Ÿ”ง
  • outputs โ€” a list of schemas each representing an output this software config produces ๐Ÿ“ค

โญ openstack.orchestration.v1.software_deployment

The SoftwareDeployment Class

The SoftwareDeployment class inherits from Resource <#openstack.resource.Resource>. Okay deploy queen ๐Ÿ‘‘

class openstack.orchestration.v1.software_deployment.SoftwareDeployment(_synchronized=False, connection=None, **attrs)
The base resource โœจ

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None โš ๏ธ
  • resource_key = 'software_deployment' โ€” singular form of key for resource โœจ
  • resources_key = 'software_deployments' โ€” plural form of key for resource ๐ŸŒˆ
  • base_path = '/software_deployments' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ
  • allow_create = True โ€” create operation? yup ๐Ÿ’–
  • allow_list = True โ€” list operation? yup ๐Ÿซถ
  • allow_fetch = True โ€” get operation? yup ๐ŸŒธ
  • allow_delete = True โ€” delete operation? yup, she's thorough ๐Ÿ’…
  • allow_commit = True โ€” update operation? also yup, full send ๐Ÿ”ฅ
  • create_opts = CreateOpts(request_key=None, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create() โš™๏ธ
  • action โ€” the stack action that triggers this deployment resource ๐ŸŽฌ
  • config_id โ€” the UUID of the software config resource that runs when applying to the server ๐Ÿ†”
  • input_values โ€” a map containing the names and values of all inputs to the config ๐Ÿ—บ๏ธ
  • output_values โ€” a map containing the names and values from the deployment ๐Ÿ“ค
  • server_id โ€” the UUID of the compute server to which the configuration applies ๐Ÿ–ฅ๏ธ
  • stack_user_project_id โ€” the ID of the authentication project which can also perform operations on this deployment ๐Ÿ”‘
  • status โ€” current status of the software deployment ๐Ÿ“Š
  • status_reason โ€” error description for the last status change. Like, what went wrong and why ๐Ÿ˜ญ
  • created_at โ€” the date and time when the software deployment resource was created ๐Ÿ•ฐ๏ธ
  • updated_at โ€” the date and time when the software deployment resource was created (yes, that's literally what the original says, we're not editing it, fr fr) ๐Ÿ™ˆ
commit(session, prepend_key=False, *args, **kwargs)
Commit the state of the instance to the remote resource. Sending her off into the world ๐Ÿ•Š๏ธ

Parameters

  • session โ€” the session to use for making this request ๐ŸŒ
  • prepend_key โ€” whether the resource_key <#openstack.resource.Resource.resource_key> should be prepended in a resource creation request. Default to True ๐Ÿ—๏ธ
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults ๐Ÿ”
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path <#openstack.resource.Resource.base_path>.
  • microversion โ€” the API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns โ€” this Resource instance. ๐Ÿซถ

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True.


๐ŸŒˆ openstack.orchestration.v1.stack

๐Ÿ’œ The Stack Class

okay so the Stack class lowkey inherits from Resource <#openstack.resource.Resource>, which is giving "child of a legend" energy fr fr.

class openstack.orchestration.v1.stack.Stack(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters:

  • _synchronized โ€” this is not intended to be used directly, bestie. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. It defaults to None so that Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'stack' โ€” singular form of key for resource.
  • resources_key = 'stacks' โ€” plural form of key for resource.
  • base_path = '/stacks' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allow create operation for this resource.
  • allow_list = True โ€” allow list operation for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • create_opts = CreateOpts(request_key=None, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). very much "configure, don't rewrite" energy โœจ
  • capabilities โ€” placeholder for AWS compatible template listing capabilities required by the stack.
  • created_at โ€” timestamp of the stack creation.
  • description โ€” a text description of the stack.
  • deleted โ€” a list of resource objects that will be deleted if a stack update is performed.
  • deleted_at โ€” timestamp of the stack deletion.
  • environment โ€” a JSON environment for the stack.
  • environment_files โ€” an ordered list of names for environment files found in the files dict.
  • files โ€” additional files referenced in the template or the environment.
  • files_container โ€” name of the container in swift that has child templates and environment files.
  • is_rollback_disabled โ€” whether the stack will support a rollback operation on stack create/update failures. Type: bool
  • links โ€” a list of dictionaries containing links relevant to the stack.
  • name โ€” name of the stack.
  • notification_topics โ€” placeholder for future extensions where stack related events can be published.
  • outputs โ€” a list containing output keys and values from the stack, if any.
  • owner_id โ€” the ID of the owner stack if any.
  • parameters โ€” a dictionary containing the parameter names and values for the stack.
  • parent_id โ€” the ID of the parent stack if any.
  • replaced โ€” a list of resource objects that will be replaced if a stack update is performed.
  • status โ€” a string representation of the stack status, e.g. CREATE_COMPLETE.
  • status_reason โ€” a text explaining how the stack transits to its current status.
  • tags โ€” a list of strings used as tags on the stack.
  • template โ€” a dict containing the template use for stack creation.
  • template_description โ€” stack template description text. Currently contains the same text as that of the description property.
  • template_url โ€” a string containing the URL where a stack template can be found.
  • timeout_mins โ€” stack operation timeout in minutes.
  • unchanged โ€” a list of resource objects that will remain unchanged if a stack update is performed.
  • updated โ€” a list of resource objects that will have their properties updated in place if a stack update is performed.
  • updated_at โ€” timestamp of last update on the stack.
  • user_project_id โ€” the ID of the user project created for this stack.

commit(session, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None, preview=False, **kwargs)

Commit the state of the instance to the remote resource. like, actually push it up there ๐Ÿ’…

Parameters:

  • session โ€” the session to use for making this request.
  • prepend_key โ€” whether the resource_key <#openstack.resource.Resource.resource_key> should be prepended in a resource creation request. Defaults to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults.
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path <#openstack.resource.Resource.base_path>.
  • microversion โ€” the API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns โ€” this Resource instance.

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True.


export(session)

Export a stack data ๐ŸŽ€

Parameters:

  • session โ€” the session to use for making this request.

Returns โ€” a dictionary containing the stack data.


suspend(session)

Suspend a stack ๐Ÿ˜ด

Parameters:

  • session โ€” the session to use for making this request

Returns โ€” None


resume(session)

Resume a stack โญ (wake up bestie, we're going back in)

Parameters:

  • session โ€” the session to use for making this request

Returns โ€” None


fetch(session, requires_id=True, base_path=None, error_message=None, skip_cache=False, *, resolve_outputs=True, **params)

Get a remote resource based on this instance. ๐Ÿ”ฅ

Parameters:

  • session โ€” the session to use for making this request.
  • requires_id โ€” whether resource ID should be part of the requested URI.
  • base_path โ€” base part of the URI for fetching resources, if it's different from base_path <#openstack.resource.Resource.base_path>.
  • error_message โ€” an error message to be returned if requested object does not exist.
  • skip_cache โ€” a boolean indicating whether optional API cache should be skipped for this invocation.
  • resource_response_key โ€” overrides the usage of self.resource_key when processing the response body.
  • microversion โ€” the API version to override the negotiated one.
  • params โ€” additional parameters that can be consumed.

Returns โ€” this Resource instance.

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_fetch is not set to True.

Raises NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found.


classmethod find(session, name_or_id, ignore_missing=True, list_base_path=None, *, microversion=None, all_projects=None, **params)

Find a resource by its name or id. ๐Ÿ•ต๏ธโ€โ™€๏ธ the scavenger hunt but make it API

Parameters:

  • session (Adapter) โ€” the session to use for making this request.
  • name_or_id โ€” this resource's identifier, if needed by the request. The default is None.
  • ignore_missing (bool) โ€” when set to False, NotFoundException <#openstack.exceptions.NotFoundException> will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
  • params (dict) โ€” literally any extra params you want passed down into the underlying methods, like into existing() when you're trying to hand off URI parameters. ๐Ÿซถ

Returns โ€” the Resource object that matches the name or id you gave it, or None if nothing matches. Ngl, None is a real possibility here. ๐Ÿ˜ญ

Raises openstack.exceptions.DuplicateResource โ€” if more than one resource comes back for this request. Like, bestie, pick one. ๐Ÿ’€

Raises openstack.exceptions.NotFoundException โ€” if nothing is found and ignore_missing is False.


๐Ÿ’œ openstack.orchestration.v1.stack_environment

๐ŸŽ€ The StackEnvironment Class

The StackEnvironment class inherits from Resource. Iconic inheritance moment, we love to see it. ๐Ÿ‘‘

class openstack.orchestration.v1.stack_environment.StackEnvironment(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” okay so this one is not meant to be used directly, fr fr. See new() and existing() instead.
  • connection โ€” a reference to the Connection being used. Defaults to None so Resource objects can vibe without an active Connection, like in unit tests. And any use of self._connection in Resource code should protect itself with a check for None. Lowkey important. ๐Ÿซถ

base_path = '/stacks/%(stack_name)s/%(stack_id)s/environment' โ€” the base part of the URI for this resource.

allow_create = False โ€” allow create operation for this resource.

allow_list = False โ€” allow list operation for this resource.

allow_fetch = True โ€” allow get operation for this resource. โœ…

allow_delete = False โ€” allow delete operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

name โ€” name of the stack where the template is referenced.

id โ€” ID of the stack where the template is referenced.

encrypted_param_names โ€” a list of parameter names whose values are encrypted. ๐Ÿคซ

event_sinks โ€” a list of event sinks.

parameter_defaults โ€” a map of parameters and their default values defined for the stack.

parameters โ€” a map of parametes defined in the stack template. (Yes, "parametes" โ€” that's the original spelling, I'm not touching it, I'm just the messenger ๐Ÿ’…)

resource_registry โ€” a map containing customized resource definitions.


๐Ÿฆ‹ openstack.orchestration.v1.stack_event

๐ŸŒธ The StackEvent Class

The StackEvent class inherits from Resource.

class openstack.orchestration.v1.stack_event.StackEvent(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/stacks/%(stack_name)s/%(stack_id)s/events' โ€” the base part of the URI for this resource.

resources_key = 'events' โ€” plural form of key for resource.

allow_create = False โ€” allow create operation for this resource.

allow_list = True โ€” allow list operation for this resource. ๐Ÿ—’๏ธ

allow_fetch = True โ€” allow get operation for this resource.

allow_delete = False โ€” allow delete operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

event_time โ€” the date and time when the event was created. โฐ

id โ€” the ID of the event object.

links โ€” a list of dictionaries containing links relevant to the stack. ๐Ÿ”—

logical_resource_id โ€” the ID of the logical stack resource.

physical_resource_id โ€” the ID of the stack physical resource.

resource_name โ€” the name of the resource.

resource_status โ€” the status of the resource.

resource_status_reason โ€” the reason for the current stack resource state.


๐Ÿงš openstack.orchestration.v1.stack_files

๐Ÿ“ The StackFiles Class

The StackFiles class inherits from Resource.

class openstack.orchestration.v1.stack_files.StackFiles(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not for direct use, babes. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/stacks/%(stack_name)s/%(stack_id)s/files' โ€” the base part of the URI for this resource.

allow_create = False โ€” allow create operation for this resource.

allow_list = False โ€” allow list operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_delete = False โ€” allow delete operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

name โ€” name of the stack where the template is referenced.

id โ€” ID of the stack where the template is referenced.

๐Ÿ’… fetch(session, requires_id=False, base_path=None, *args, **kwargs)

Get a remote resource based on this instance. Go get it, girl. ๐Ÿ”ฅ

Parameters

  • session โ€” the session to use for making this request.
  • requires_id โ€” whether resource ID should be part of the requested URI.
  • base_path โ€” base part of the URI for fetching resources, if different from base_path.
  • error_message โ€” an error message to be returned if the requested object does not exist.
  • skip_cache โ€” a boolean indicating whether the optional API cache should be skipped for this invocation.
  • resource_response_key โ€” overrides the usage of self.resource_key when processing the response body.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional parameters that can be consumed.

Returns โ€” this Resource instance. ๐Ÿซถ

Raises MethodNotSupported โ€” if Resource.allow_fetch is not set to True.

Raises NotFoundException โ€” if the resource was not found. ๐Ÿ˜ญ


โญ openstack.orchestration.v1.stack_template

๐ŸŒˆ The StackTemplate Class

The StackTemplate class inherits from Resource.

class openstack.orchestration.v1.stack_template.StackTemplate(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” genuinely not meant to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/stacks/%(stack_name)s/%(stack_id)s/template' โ€” the base part of the URI for this resource.

allow_create = False โ€” allow create operation for this resource.

allow_list = False โ€” allow list operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_delete = False โ€” allow delete operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

name โ€” name of the stack where the template is referenced.

stack_id โ€” ID of the stack where the template is referenced.

description โ€” the description specified in the template.

heat_template_version โ€” the version of the orchestration HOT template.

outputs โ€” key and value that contain output data.

parameters โ€” key and value pairs that contain template parameters.

resources โ€” key and value pairs that contain definition of resources in the template.


๐ŸŽ€ openstack.orchestration.v1.template

๐Ÿ‘‘ The Template Class

The Template class inherits from Resource.

class openstack.orchestration.v1.template.Template(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” this is not intended to be used directly, okay? See new() and existing().
  • connection โ€” the hookup to the Connection being used. Defaults to None so you can totally use Resource objects with no live Connection hanging around (unit tests, we're looking at you ๐Ÿ‘€). If you're poking at self._connection inside Resource code, guard it with a None check, bestie โ€” non-negotiable ๐Ÿซถ
  • allow_create = False โ€” nope, no creating with this resource.
  • allow_list = False โ€” no listing either.
  • allow_fetch = False โ€” fetch? blocked, sorry babe.
  • allow_delete = False โ€” deleting is a no.
  • allow_commit = False โ€” and no updating. Very "look don't touch" of it ๐Ÿ’…
  • description โ€” the description that was specified in the template.
  • parameters โ€” key and value pairs holding the template parameters.
  • parameter_groups โ€” a list of parameter groups, and each one contains a list of parameter names.

๐Ÿ—„๏ธ Object Store Resources ๐Ÿ—„๏ธ

๐Ÿ’พ openstack.object_store.v1.account

โœจ The Account Class โœจ โ€” it inherits from Resource (peep <#openstack.resource.Resource>).

class openstack.object_store.v1.account.Account(metadata=None, **attrs)

Processes and saves the metadata we already know at creation time, periodt.

  • base_path = '/' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” get operation? allowed, slay.
  • allow_commit = True โ€” update operation? also allowed.
  • allow_head = True โ€” head operation? you bet.
  • account_bytes_used โ€” the total number of bytes stored in Object Storage for this account.
  • account_container_count โ€” how many containers there are.
  • account_object_count โ€” how many objects live in the account.
  • meta_temp_url_key โ€” the secret key value for temporary URLs. If it's not set, this header just isn't returned by the operation. ๐Ÿ™ˆ
  • meta_temp_url_key_2 โ€” a second secret key value for temporary URLs. Same deal: not set = header not returned.
  • timestamp โ€” the timestamp of the transaction. โฐ
  • requires_id = False โ€” does this resource need an ID for its calls? No ma'am.
set_temp_url_key(session, key, secondary=False)

Sets the temporary url key for the account. ๐Ÿ”‘

Parameters

  • session โ€” the adapter to use for making this request.
  • key โ€” the text of the key to use.
  • secondary โ€” whether this should set the secondary key (defaults to False).

๐Ÿงบ openstack.object_store.v1.container

โœจ The Container Class โœจ โ€” inherits from Resource (see <#openstack.resource.Resource>).

class openstack.object_store.v1.container.Container(metadata=None, **attrs)

Processes and saves the metadata known at creation stage.

  • base_path = '/' โ€” the base part of the URI for this resource.
  • pagination_key = 'X-Account-Container-Count' โ€” the key used for pagination links.
  • allow_create = True โ€” creating? green light.
  • allow_fetch = True โ€” fetching? green light.
  • allow_commit = True โ€” updating? green light.
  • allow_delete = True โ€” deleting? green light.
  • allow_list = True โ€” listing? green light.
  • allow_head = True โ€” heading? green light. The whole traffic system said yes ๐Ÿšฆ
  • name โ€” the name of the container.
  • count โ€” how many objects are in the container.
  • bytes โ€” the total number of bytes stored in Object Storage for the container.
  • object_count โ€” the number of objects.
  • bytes_used โ€” the count of bytes used in total.
  • timestamp โ€” the timestamp of the transaction.
  • is_newest โ€” if set to True, Object Storage queries all replicas to return the most recent one. If you omit this header, Object Storage responds faster once it finds one valid replica. Because setting this to True is more expensive for the back end, use it only when it is absolutely needed. Type: bool.
  • read_ACL โ€” the ACL that grants read access. If it's not set, this header isn't returned by the operation.
  • write_ACL โ€” the ACL that grants write access. Same thing: not set, not returned.
  • sync_to โ€” the destination for container synchronization. Not set? Not returned, bestie.
  • sync_key โ€” the secret key for container synchronization. Also not returned when unset.
  • versions_location โ€” enables versioning on this container. The value is the name of another container. You must UTF-8-encode and then URL-encode the name before you include it in the header. To disable versioning, set the header to an empty string. โš ๏ธ Do the encoding, fr fr.
  • history_location โ€” enables versioning on the container.
  • content_type โ€” the MIME type of the list of names.
  • is_content_type_detected โ€” if set to true, Object Storage guesses the content type based on the file extension and ignores whatever was sent in the Content-Type header, if present. Type: bool.
  • storage_policy โ€” the storage policy used by the container. Heads up: it is not possible to change the policy of an existing container. Choose once, choose well ๐Ÿ’€
  • if_none_match โ€” in combination with Expect: 100-Continue, specify an "If-None-Match: *" header to query whether the server already has a copy of the object before any data is sent.
  • meta_temp_url_key โ€” the secret key value for temporary URLs. If not set, this header isn't returned by the operation.
  • meta_temp_url_key_2 โ€” a second secret key value for temporary URLs. Also not returned when unset.
classmethod new(**kwargs)

Creates a new instance of this resource. ๐ŸŽ€

When creating the instance, set the _synchronized parameter of Resource to False to say "hey, this resource does not exist on the server side yet." That marks every attribute passed in **attrs as "dirty" on the resource, and thereforely tracks them as necessary in subsequent calls like update(). Lowkey important.

Parameters

  • attrs โ€” each of the named arguments will be set as attributes on the resulting Resource object. These should correspond to either Body or Header values on this resource.
set_temp_url_key(session, key, secondary=False)

Sets the temporary url key for a container. ๐Ÿ”

Parameters

  • session โ€” the session to use for making this request.
  • container โ€” the value can be the name of a container or a Container instance.
  • key โ€” the text of the key to use.
  • secondary โ€” whether this should set the second key (defaults to False).

๐Ÿ“ฆ openstack.object_store.v1.obj

โœจ The Object Class โœจ โ€” inherits from Resource (check <#openstack.resource.Resource>).

class openstack.object_store.v1.obj.Object(data=None, **attrs)

Processes and saves the metadata known at creation stage.

  • base_path = '/%(container)s' โ€” the base part of the URI for this resource.
  • pagination_key = 'X-Container-Object-Count' โ€” the key used for pagination links.
  • allow_create = True โ€” creation: allowed.
  • allow_fetch = True โ€” fetching: allowed.
  • allow_commit = True โ€” updating: allowed.
  • allow_delete = True โ€” deletion: allowed.
  • allow_list = True โ€” listing: allowed.
  • allow_head = True โ€” heading: allowed. Iconic behaviour only. ๐Ÿ‘‘
  • container โ€” the unique name for the container.
  • name โ€” the unique name for the object.
  • is_newest โ€” if set to True, Object Storage queries all replicas to return the most recent one. If you omit this header, Object Storage responds faster after it finds one valid replica. Because setting this header to True is more expensive for the back end, use it only when it's absolutely needed. Type: bool.
  • range โ€” TODO(briancurtin) there's a lot of content here... ๐Ÿ˜ญ (yes that's literally the note, we don't make the rules)
  • if_match โ€” see <http://www.ietf.org/rfc/rfc2616.txt>.
  • if_none_match โ€” in combination with Expect: 100-Continue, specify an "If-None-Match: *" header to query whether the server already has a copy of the object before any data is sent.
  • if_modified_since โ€” see <http://www.ietf.org/rfc/rfc2616.txt>.
  • if_unmodified_since โ€” see <http://www.ietf.org/rfc/rfc2616.txt>.
  • signature โ€” used with temporary URLs to sign the request. For more info about temporary URLs, see OpenStack Object Storage API v1 Reference.
  • expires_at โ€” used with temporary URLs to specify the expiry time of the signature. For more info about temporary URLs, see OpenStack Object Storage API v1 Reference.
  • manifest โ€” if present, this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects, in the form container/prefix. ๐Ÿฆ‹
  • multipart_manifest โ€” okay so if you include the multipart-manifest=get query parameter and the object is a large object, you do not get the object contents back. Instead, the manifest is returned in the X-Object-Manifest response header for dynamic large objects, or in the response body for static large objects. โœจ
  • content_length โ€” lowkey important: HEAD operations do not return content. However, in this operation the value in the Content-Length header is not the size of the response body. Instead it contains the size of the object, in bytes.
  • content_type โ€” the MIME type of the object. ๐Ÿ’…
  • accept_ranges โ€” the type of ranges that the object accepts.
  • etag โ€” bestie, listen. For objects smaller than 5 GB, this value is the MD5 checksum of the object content. The value is not quoted. For manifest objects, this value is the MD5 checksum of the concatenated string of MD5 checksums and ETags for each of the segments in the manifest, and not the MD5 checksum of the content that was downloaded. Also the value is enclosed in double-quote characters. You are strongly recommended to compute the MD5 checksum of the response body as it is received and compare this value with the one in the ETag header. If they differ, the content was corrupted, so retry the operation. ๐Ÿ˜ญ
  • is_static_large_object โ€” set to True if this object is a static large object manifest object. Type: bool. ๐Ÿซถ
  • content_encoding โ€” if set, the value of the Content-Encoding metadata. If not set, this header is not returned by this operation.
  • content_disposition โ€” if set, specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default. If not set, this header is not returned by this operation.
  • delete_after โ€” specifies the number of seconds after which the object is removed. Internally, the Object Storage system stores this value in the X-Delete-At metadata item. โณ
  • delete_at โ€” if set, the time when the object will be deleted by the system in the format of a UNIX Epoch timestamp. If not set, this header is not returned by this operation.
  • object_manifest โ€” if set, this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix.
  • timestamp โ€” the timestamp of the transaction.
  • last_modified_at โ€” the date and time that the object was created or the last time that the metadata was changed.
  • transfer_encoding โ€” set to chunked to enable chunked transfer encoding. If used, do not set the Content-Length header to a non-zero value.
  • is_content_type_detected โ€” if set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present. Type: bool.
  • copy_from โ€” if set, this is the name of an object used to create the new object by copying the X-Copy-From object. The value is in form {container}/{object}. You must UTF-8-encode and then URL-encode the names of the container and object before you include them in the header. Using PUT with X-Copy-From has the same effect as using the COPY operation to copy an object. ๐Ÿ”ฅ
  • symlink_target โ€” if present, this is a symlink object. The value is the relative path of the target object in the format <container>/<object>.
  • symlink_target_account โ€” if present, and X-Symlink-Target is present, then this is a cross-account symlink to an object in the account specified in the value.
  • access_control_allow_origin โ€” CORS for RAX (deviating from standard). Thatโ€™s the whole note, no cap. ๐ŸŒˆ

๐Ÿ› ๏ธ create(session, prepend_key=True, base_path=None, **params)

Create a remote resource based on this instance. ๐Ÿ’–

Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” DEPRECATED Configure create_opts instead. Whether the resource_key should be prepended in a resource creation request. Default to True.
  • base_path โ€” base part of the URI for creating resources, if different from base_path <#openstack.resource.Resource.base_path>.
  • resource_request_key โ€” DEPRECATED Configure create_opts instead. Overrides the usage of resource_key <#openstack.resource.Resource.resource_key> when prepending a key to the request body. Ignored if prepend_key is false.
  • resource_response_key โ€” DEPRECATED Configure create_opts instead. Overrides the usage of resource_key <#openstack.resource.Resource.resource_key> when processing response bodies. Ignored if prepend_key is false.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional params to pass.

Returns

This Resource instance. ๐ŸŽ€

Raises

MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_create is not set to True.


๐ŸŒธ Placement v1 Resources

๐Ÿงš openstack.placement.v1.allocation

The Allocation Class

The Allocation class inherits from Resource <#openstack.resource.Resource>. ๐Ÿซถ

class openstack.placement.v1.allocation.Allocation(_synchronized=False, connection=None, **attrs)

Allocations for a single consumer.

Allocations are records representing resources that have been assigned and used by a consumer of those resources. The consumer is identified by its UUID, which serves as the resource ID in the URL (/allocations/{consumer_uuid}).

An allocation maps resource providers to the resources consumed from them. Each entry in the allocations dict is keyed by resource provider UUID and contains a resources sub-dict mapping resource class names to quantities.

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = None โ€” singular form of key for resource.
  • resources_key = None โ€” plural form of key for resource.
  • base_path = '/allocations' โ€” the base part of the URI for this resource.
  • allow_fetch = True โ€” allow get operation for this resource.
  • allow_commit = True โ€” allow update operation for this resource.
  • allow_delete = True โ€” allow delete operation for this resource.
  • allocations โ€” a dictionary of resource allocations keyed by resource provider UUID. Each value is a dict with a resources key mapping resource class names to quantities, e.g. {"DISK_GB": 4, "VCPU": 2}. Setting this to an empty dict removes all allocations for the consumer. ๐Ÿ’€
  • consumer_generation โ€” the generation of the consumer. Should be set to None when indicating that the caller expects the consumer does not yet exist.
  • consumer_type โ€” a string that consists of numbers, A-Z, and _ describing what kind of consumer is creating, or has created, allocations using a quantity of inventory. The string is determined by the client when writing allocations and it is up to the client to ensure correct choices amongst collaborating services. For example, the compute service may choose to type some consumers 'INSTANCE' and others 'MIGRATION'.
  • project_id โ€” the UUID of a project.
  • user_id โ€” the UUID of a user.

๐ŸŽ€ classmethod set(session, allocations)

Set allocations for multiple consumers in a single atomic request. โœจ

Parameters

  • session โ€” the session to use for making this request.
  • allocations โ€” a dict keyed by consumer UUID; see set_allocations() for the expected structure of each value.

Raises

ConflictException <#openstack.exceptions.ConflictException> if any resource provider or consumer generation does not match, or if there is insufficient inventory. ๐Ÿ˜ญ


๐Ÿฆ‹ openstack.placement.v1.allocation_candidate

The AllocationCandidate Class

The AllocationCandidate class inherits from Resource <#openstack.resource.Resource>. ๐Ÿ’œ

class openstack.placement.v1.allocation_candidate.AllocationCandidate(_synchronized=False, connection=None, **attrs)

A single candidate set of allocations.

Represents one entry from allocation_requests in the placement allocation candidates response, with the corresponding provider_summaries data filtered to only the resource providers referenced by this candidate. ๐ŸŒŸ

An AllocationCandidate contains enough info to fire off an update_allocation() call: the allocations dict maps resource provider UUIDs โ†’ the resources you're requesting from each one, and provider_summaries hands you the capacity + trait deets for those providers so you can actually pick between candidates. ๐Ÿ’…

The base resource โœจ

Parameters

  • _synchronized โ€” bestie do NOT use this directly, fr. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without a live Connection (think unit tests). Any use of self._connection in Resource code should guard itself with a None check. ๐Ÿซถ

resource_key = None โ€” singular form of the key for this resource.

resources_key = None โ€” plural form of the key for this resource.

base_path = '/allocation_candidates' โ€” the base part of the URI for this resource.

requires_id = False โ€” do calls for this resource require an ID? (Nope, not this one.)

allow_list = True โ€” list operation is allowed for this resource. ๐Ÿ‘‘

mappings โ€” a dict mapping request-group suffixes โ†’ the list of resource provider UUIDs that satisfy that group. Available from microversion 1.34.

provider_summaries โ€” a dict keyed by resource provider UUID, holding capacity + trait info for each provider referenced in allocations. This is derived from the top-level provider_summaries field in the API response, filtered down to only the providers relevant to this candidate. ๐ŸŽ€

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, **params)

This method is a generator which yields resource objects. โœจ

It's a re-implementation of list() that handles the allocation candidates response format. The API returns a single dict with allocation_requests (a list) and provider_summaries (a shared dict keyed by resource provider UUID). This method yields one AllocationCandidate per entry in allocation_requests, with provider_summaries filtered to only the resource providers referenced by that candidate.

Head over to list() for the full docs โ€” parameters, exceptions, return types, the whole thing. ๐Ÿ“š


๐ŸŒธ openstack.placement.v1.resource_class ๐ŸŒธ

The ResourceClass Class

The ResourceClass class inherits from Resource.

class openstack.placement.v1.resource_class.ResourceClass(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’–

Parameters

  • _synchronized โ€” not meant for direct use, bestie. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a None check.

resource_key = None โ€” singular form of key for resource.

resources_key = 'resource_classes' โ€” plural form of key for resource.

base_path = '/resource_classes' โ€” the base part of the URI for this resource.

allow_create = True โ€” create operation allowed.

allow_fetch = True โ€” get operation allowed.

allow_commit = True โ€” update operation allowed.

allow_delete = True โ€” delete operation allowed.

allow_list = True โ€” list operation allowed. ๐Ÿฆ‹

allow_empty_commit = True โ€” commits happen even without header or body being dirty.

name โ€” the name of this resource. ๐Ÿ’ซ


๐Ÿ‘‘ openstack.placement.v1.resource_provider ๐Ÿ‘‘

The ResourceProvider Class

The ResourceProvider class inherits from Resource.

class openstack.placement.v1.resource_provider.ResourceProvider(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not for direct use, see new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, e.g. in unit tests. Use of self._connection in Resource code should protect itself with a None check.

resource_key = None โ€” singular form of key for resource.

resources_key = 'resource_providers' โ€” plural form of key for resource.

base_path = '/resource_providers' โ€” the base part of the URI for this resource.

allow_create = True โ€” create operation allowed.

allow_fetch = True โ€” get operation allowed.

allow_commit = True โ€” update operation allowed.

allow_delete = True โ€” delete operation allowed.

allow_list = True โ€” list operation allowed. ๐ŸŒˆ

aggregates โ€” Aggregates.

id โ€” the UUID of a resource provider.

generation โ€” a consistent view marker that assists with managing concurrent resource provider updates. ๐ŸŽ€

links โ€” links pertaining to this flavor. It's a list of dictionaries, each including the keys href and rel.

name โ€” the name of this resource provider.

parent_provider_id โ€” the UUID of the immediate parent of the resource provider.

root_provider_id โ€” read-only UUID of the top-most provider in this provider tree.

usages โ€” Resource class usage counts for this resource provider. ๐Ÿ’œ


commit(session, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None, **kwargs)

Commit the state of the instance to the remote resource.

Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults.
  • base_path โ€” base part of the URI for modifying resources, if different from base_path.
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns โ€” this Resource instance.

Raises MethodNotSupported if Resource.allow_commit is not set to True. ๐Ÿ˜ญ


set_inventories(session, inventories, resource_provider_generation)

Replace ALL the inventory records for the resource provider. Like, all of them. ๐Ÿซถ

Parameters

  • session โ€” the session to use for making this request.
  • inventories โ€” a dict mapping resource class names โ†’ inventory configuration dicts. Pass an empty dict to remove all inventories.
  • resource_provider_generation โ€” the generation of the resource provider; used to detect concurrent updates.

Returns โ€” the resource provider with the updated generation.

Raises ConflictException if the generation doesn't match, or if there are active allocations against an inventory being removed. โš ๏ธ


delete_inventories(session)

Delete all inventory records for the resource provider.

Parameters

  • session โ€” the session to use for making this request.

Raises ConflictException if there are active allocations against the resource provider. ๐Ÿ’€


fetch_usages(session)

Fetch resource usage counts for the resource provider.

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” the resource provider with usages populated. โœจ


fetch_aggregates(session)

List aggregates set on the resource provider.

Parameters

  • session โ€” the session to use for making this request.

Returns โ€” the resource provider with aggregates populated. ๐ŸŒธ


set_aggregates(session, aggregates=None)

Replaces aggregates on the resource provider.

Parameters

  • session โ€” the session to use for making this request.
  • aggregates (list) โ€” List of aggregates.

Returns: The resource provider with updated aggregates populated.


๐Ÿฆ‹ openstack.placement.v1.resource_provider_allocation

The ResourceProviderAllocation Class

The ResourceProviderAllocation class inherits from Resource (the openstack.resource.Resource one, iykyk).

class openstack.placement.v1.resource_provider_allocation.ResourceProviderAllocation(_synchronized=False, connection=None, **attrs)

The base resource โ€” thatโ€™s literally what it is, bestie.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = None โ€” Singular form of key for resource.
  • resources_key = None โ€” Plural form of key for resource.
  • base_path = '/resource_providers/%(resource_provider_id)s/allocations' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • resource_provider_id โ€” The UUID of a resource provider.
  • consumer_id โ€” The UUID of the consumer.
  • resource_provider_generation โ€” A consistent view marker that assists with the management of concurrent resource provider updates.
  • consumer_generation โ€” The generation of the consumer. Available from microversion 1.28.
  • resources โ€” A dictionary of resource class names to the amount allocated to this consumer from this resource provider.
classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, **params)

This method is a generator which yields resource objects.

A re-implementation of list() (the openstack.resource.Resource.list one) that handles placement's single, unpaginated list implementation.

Refer to list() (openstack.resource.Resource.list) for full documentation including parameter, exception and return type documentation.


๐ŸŒˆ openstack.placement.v1.resource_provider_inventory

The ResourceProviderInventory Class

The ResourceProviderInventory class inherits from Resource (the openstack.resource.Resource one).

class openstack.placement.v1.resource_provider_inventory.ResourceProviderInventory(_synchronized=False, connection=None, **attrs)

The base resource โ€” yes, base resource energy.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = None โ€” Singular form of key for resource.
  • resources_key = None โ€” Plural form of key for resource.
  • base_path = '/resource_providers/%(resource_provider_id)s/inventories' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • resource_provider_id โ€” The UUID of a resource provider.
  • resource_class โ€” The name of the resource class.
  • resource_provider_generation โ€” A consistent view marker that assists with the management of concurrent resource provider updates.
  • allocation_ratio โ€” It is used in determining whether consumption of the resource of the provider can exceed physical constraints.
  • max_unit โ€” A maximum amount any single allocation against an inventory can have.
  • min_unit โ€” A minimum amount any single allocation against an inventory can have.
  • reserved โ€” The amount of the resource a provider has reserved for its own use.
  • step_size โ€” A representation of the divisible amount of the resource that may be requested. For example, step_size = 5 means that only values divisible by 5 (5, 10, 15, etc.) can be requested.
  • total โ€” The actual amount of the resource that the provider can accommodate.
commit(session, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None, **kwargs)

Commit the state of the instance to the remote resource.

Parameters

  • session โ€” The session to use for making this request.
  • prepend_key โ€” Whether the resource_key (openstack.resource.Resource.resource_key) should be prepended in a resource creation request. Default to True.
  • retry_on_conflict โ€” Whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.
  • base_path โ€” Base part of the URI for modifying resources, if different from base_path (openstack.resource.Resource.base_path).
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” Attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns: This Resource instance.

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_commit is not set to True.

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, **params)

This method is a generator which yields resource objects.

A re-implementation of list() (the openstack.resource.Resource.list one) that handles placement's single, unpaginated list implementation.

Refer to list() (openstack.resource.Resource.list) for full documentation including parameter, exception and return type documentation.


๐Ÿ’œ openstack.placement.v1.resource_provider_trait

The ResourceProviderTrait Class

The ResourceProviderTrait class inherits from Resource (the openstack.resource.Resource one).

class openstack.placement.v1.resource_provider_trait.ResourceProviderTrait(_synchronized=False, connection=None, **attrs)

The base resource โ€” base resource, no cap.

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() (openstack.resource.Resource.new) and existing() (openstack.resource.Resource.existing).
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = None โ€” Singular form of key for resource.
  • resources_key = None โ€” Plural form of key for resource.
  • base_path = '/resource_providers/%(resource_provider_id)s/traits' โ€” The base part of the URI for this resource.
  • requires_id = False โ€” Do calls for this resource require an ID.
  • commit_method = 'PUT' โ€” Method for committing a resource. This must be PATCH if allow_patch is True.
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • resource_provider_id โ€” The UUID of a resource provider.
  • resource_provider_generation โ€” A consistent view marker that assists with the management of concurrent resource provider updates.
  • traits โ€” Traits.
commit(session, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None, **kwargs)

Commit the state of the instance to the remote resource.

Parameters

  • session โ€” The session to use for making this request.
  • prepend_key โ€” Whether the resource_key (openstack.resource.Resource.resource_key) should be prepended in a resource creation request. Default to True.
  • retry_on_conflict โ€” Whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.
  • base_path โ€” Base part of the URI for modifying resources, if different from base_path (openstack.resource.Resource.base_path).
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” the attributes you're passing when you update the resource. These bad boys should line up with either Body or Header values on the resource. no random extras, bestie ๐ŸŽ€

Returns

This Resource instance. same one, freshly updated ๐Ÿ’…

Raises MethodNotSupported if Resource.allow_commit is not set to True. so if that flag's off, it's giving forbidden energy and nothing happens ๐Ÿ˜ญ

fetch(session, requires_id=False, base_path=None, error_message=None, skip_cache=False, *, resource_response_key=None, microversion=None, **params)

Grab a remote resource based on this instance. like, go get it โœจ

Parameters

  • session โ€” the session you're using to make this request.
  • requires_id โ€” whether the resource ID should be part of the requested URI.
  • base_path โ€” the base part of the URI for fetching resources, in case it's different from base_path on Resource.
  • error_message โ€” an error message that gets returned if the object you asked for doesn't exist.
  • skip_cache โ€” a boolean, and it says whether the optional API cache should be skipped for this particular invocation.
  • resource_response_key โ€” overrides how self.resource_key is used when processing the response body.
  • microversion โ€” the API version to override the negotiated one with.
  • params โ€” extra parameters that can be consumed.

Returns

This Resource instance. ๐Ÿ’–

Raises MethodNotSupported if Resource.allow_fetch is not set to True.

Raises NotFoundException if the resource was literally not found. gone, missing, not in the building ๐Ÿ™ˆ


openstack.placement.v1.trait

The Trait Class

The Trait class inherits from Resource. family tree moment ๐ŸŒธ

class openstack.placement.v1.trait.Trait(_synchronized=False, connection=None, **attrs)

The base resource. yes, that's the whole description, and honestly? iconic ๐Ÿ’…

Parameters

  • _synchronized โ€” not intended to be used directly. go look at new() and existing() instead, bestie.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection โ€” like in unit tests. any use of self._connection inside Resource code should protect itself with a check for None. protective energy fr fr ๐Ÿซถ

resource_key = None โ€” singular form of key for resource.

resources_key = None โ€” plural form of key for resource.

base_path = '/traits' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

create_opts

CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='PUT', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)

Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). slay, no code duplication ๐Ÿ”ฅ

name โ€” the name of this resource.

create(session, prepend_key=True, base_path=None, *, microversion=None, **kwargs)

Create a remote resource based on this instance. make it exist โœจ

Parameters

  • session โ€” the session to use for making this request.
  • prepend_key โ€” DEPRECATED, configure create_opts instead. whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • base_path โ€” base part of the URI for creating resources, if different from base_path on Resource.
  • resource_request_key โ€” DEPRECATED, configure create_opts instead. overrides the usage of resource_key when prepending a key to the request body. ignored if prepend_key is false.
  • resource_response_key โ€” DEPRECATED, configure create_opts instead. overrides the usage of resource_key when processing response bodies. ignored if prepend_key is false.
  • microversion โ€” the API version to override the negotiated one with.
  • params โ€” additional params to pass.

Returns

This Resource instance. ๐Ÿ’œ

Raises MethodNotSupported if Resource.allow_create is not set to True.

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, **params)

Okay so this method is a generator that yields resource objects. ๐Ÿฆ‹

It's a re-implementation of list() that handles the list of strings (as opposed to a list of objects) that this call returns. different shape, same vibe.

Refer to list() for the full documentation, including parameter, exception and return type docs. iykyk ๐Ÿ“š


openstack.placement.v1.usage

The Usage Class

The Usage class inherits from Resource. ๐Ÿงš

class openstack.placement.v1.usage.Usage(_synchronized=False, connection=None, **attrs)

Resource usage for one consumer type within a project. it's giving receipts, but make them structured ๐Ÿ’…

Represents one entry from the usages dict returned by GET /usages. Every entry is keyed by consumer type (e.g. INSTANCE, MIGRATION) and contains:

  • consumer_count โ€” the number of consumers of that type with active allocations in the project.
  • resources โ€” a dict of resource class name to total amount consumed across all consumers of that type.

Available from placement microversion 1.38. Call usages() to retrieve instances. note that, bestie, it's a real requirement โญ

The base resource.

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. any use of self._connection in Resource code should protect itself with a check for None.

resource_key = None โ€” singular form of key for resource.

resources_key = None โ€” plural form of key for resource.

base_path = '/usages' โ€” the base part of the URI for this resource.

requires_id = False โ€” do calls for this resource require an ID. nope!

allow_list = True โ€” allow list operation for this resource.

consumer_type โ€” the consumer type string, e.g. INSTANCE or MIGRATION.

consumer_count โ€” the number of consumers of this type with active allocations.

resources โ€” a dict of resource class name to total amount consumed across all consumers of this type, e.g. {"VCPU": 2, "DISK_GB": 5}. ๐Ÿ’–

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, *, microversion=None, **params)

This method is a generator which yields resource objects. ๐ŸŒˆ

It's a re-implementation of list() that handles the GET /usages response format. The API returns a single usages dict keyed by consumer type, and this method yields one Usage per entry, with the per-resource-class amounts packed into the resources field. unpacking the vibes, one entry at a time ๐ŸŽ€

Refer to list() for the full documentation, including parameter, exception and return type documentation.


Shared File System service resources

openstack.shared_file_system.v2.availability_zone

The AvailabilityZone Class

The AvailabilityZone class inherits from Resource. ๐Ÿ’…

class openstack.shared_file_system.v2.availability_zone.AvailabilityZone(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” not intended to be used directly. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. any use of self._connection in Resource code should protect itself with a check for None. ๐Ÿซถ

resource_key = 'availability_zone' โ€” singular form of key for resource.

resources_key = 'availability_zones' โ€” plural form of key for resource.

base_path = '/availability-zones' โ€” the base part of the URI for this resource.

allow_create = False โ€” allow create operation for this resource. nope, can't make these ๐Ÿ’€

allow_fetch = False โ€” allow get operation for this resource.

  • allow_commit = False โ€” nope, this resource does not do updates. not today ๐Ÿ’…
    • allow_delete = False โ€” and no deletes either, sorry bestie ๐Ÿ™ˆ
    • allow_list = True โ€” listing though? yes bestie, list away โœจ
    • id โ€” Properties. The ID of the availability zone ๐Ÿ†”
    • name โ€” the name of the availability zone ๐Ÿท๏ธ
    • created_at โ€” date and time the availability zone was created at โฐ
    • updated_at โ€” date and time the availability zone was last updated at ๐Ÿ”„

openstack.shared_file_system.v2.limit

The Limit Class ๐Ÿ’€

The Limit class inherits from Resource <#openstack.resource.Resource>.

class openstack.shared_file_system.v2.limit.Limit(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” this is not intended to be used directly, okay? see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿซถ
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests, fr. Any use of self._connection in Resource code should protect itself with a check for None ๐Ÿ”ฅ

resources_key = 'limits' โ€” plural form of key for resource ๐Ÿ“š

base_path = '/limits' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ

  • allow_create = False โ€” no creating this one ๐Ÿ™…โ€โ™€๏ธ
  • allow_fetch = False โ€” no fetching either ๐Ÿ˜ญ
  • allow_commit = False โ€” no updating, not today ๐Ÿ’…
  • allow_delete = False โ€” no deleting, periodt โœ‹
  • allow_list = True โ€” listing? absolutely, go off ๐Ÿ‘‘
  • allow_head = False โ€” head is a no ๐Ÿšซ

Then the properties, and there are so many of them:

  • maxTotalReplicaGigabytes โ€” Properties. The maximum number of replica gigabytes that are allowed in a project ๐Ÿ’พ
  • maxTotalShares โ€” the total maximum number of shares that are allowed in a project ๐Ÿ“ฆ
  • maxTotalShareGigabytes โ€” the total maximum number of share gigabytes that are allowed in a project ๐Ÿ’ฝ
  • maxTotalShareNetworks โ€” the total maximum number of share-networks that are allowed in a project ๐ŸŒ
  • maxTotalShareSnapshots โ€” the total maximum number of share snapshots that are allowed in a project ๐Ÿ“ธ
  • maxTotalShareReplicas โ€” the maximum number of share replicas that is allowed ๐Ÿชž
  • maxTotalSnapshotGigabytes โ€” the total maximum number of snapshot gigabytes that are allowed in a project ๐Ÿ—„๏ธ
  • totalReplicaGigabytesUsed โ€” the total number of replica gigabytes used in a project by share replicas ๐Ÿ“Š
  • totalShareGigabytesUsed โ€” the total number of gigabytes used in a project by shares ๐Ÿ’ฟ
  • totalSharesUsed โ€” the total number of created shares in a project ๐Ÿงฎ
  • totalShareNetworksUsed โ€” the total number of created share-networks in a project ๐Ÿ•ธ๏ธ
  • totalShareSnapshotsUsed โ€” the total number of created share snapshots in a project ๐Ÿ–ผ๏ธ
  • totalSnapshotGigabytesUsed โ€” the total number of gigabytes used in a project by snapshots ๐Ÿ’พ
  • totalShareReplicasUsed โ€” the total number of created share replicas in a project ๐Ÿ”

openstack.shared_file_system.v2.quota_class_set

The QuotaClassSet Class ๐ŸŽ€

The QuotaClassSet class inherits from Resource <#openstack.resource.Resource> and can be used to query quota class ๐Ÿ’–

class openstack.shared_file_system.v2.quota_class_set.QuotaClassSet(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” not intended to be used directly, bestie. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐ŸŒธ
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

base_path = '/quota-class-sets' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ

resource_key = 'quota_class_set' โ€” singular form of key for resource 1๏ธโƒฃ

  • allow_create = False โ€” no create ๐Ÿ™…โ€โ™€๏ธ
  • allow_fetch = True โ€” fetch? yes please โœจ
  • allow_commit = True โ€” commit/update, absolutely ๐Ÿ’…
  • allow_delete = False โ€” delete? nope ๐Ÿ™ˆ
  • allow_list = False โ€” no listing ๐Ÿ˜ญ
  • allow_head = False โ€” and no head ๐Ÿšซ

Properties time โœจ

  • id โ€” Properties. A quota_class_set id ๐Ÿ†”
  • share_groups โ€” the maximum number of share groups ๐Ÿ‘ฏ
  • share_group_snapshots โ€” the maximum number of share group snapshots ๐Ÿ“ธ
  • snapshots โ€” the total maximum number of shares that are allowed in a project (yes, that's exactly what it says ๐Ÿ˜ญ)
  • snapshot_gigabytes โ€” the maximum number of snapshot gigabytes that are allowed in a project ๐Ÿ’พ
  • shares โ€” the total maximum number of snapshot gigabytes that are allowed in a project (again โ€” that's literally what the original says, i'm just the messenger ๐Ÿ’€)
  • share_networks โ€” the maximum number of share-networks that are allowed in a project ๐ŸŒ
  • share_replicas โ€” the maximum number of share replicas that is allowed ๐Ÿชž
  • gigabytes โ€” the total maximum number of share gigabytes that are allowed in a project. You cannot request a share that exceeds the allowed gigabytes quota โš ๏ธ
  • replica_gigabytes โ€” the maximum number of replica gigabytes that are allowed in a project. You cannot create a share, share replica, manage a share or extend a share if it is going to exceed the allowed replica gigabytes quota ๐Ÿšจ
  • per_share_gigabytes โ€” the number of gigabytes per share allowed in a project ๐Ÿ“
  • backups โ€” the total maximum number of share backups that are allowed in a project ๐Ÿ—‚๏ธ
  • backup_gigabytes โ€” the total maximum number of backup gigabytes that are allowed in a project ๐Ÿ’ฝ

openstack.shared_file_system.v2.quota__set

The QuotaSet Class ๐Ÿ‘‘

The QuotaSet class inherits from Resource <#openstack.resource.Resource> and can be used to query quotas ๐Ÿ’–

class openstack.shared_file_system.v2.quota_set.QuotaSet(_synchronized=False, connection=None, **attrs)

The base resource ๐ŸŒŸ

Parameters

  • _synchronized โ€” not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿฆ‹
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

resource_key = 'quota_set' โ€” singular form of key for resource 1๏ธโƒฃ

resources_key = 'quota_sets' โ€” plural form of key for resource ๐Ÿ“š

base_path = '/quota-sets/%(project_id)s' โ€” the base part of the URI for this resource ๐Ÿ›ฃ๏ธ

  • allow_create = False โ€” no create ๐Ÿ™…โ€โ™€๏ธ
  • allow_list = False โ€” no list ๐Ÿ˜ญ

Properties, get comfy ๐Ÿ’…

  • gigabytes โ€” Properties. The number of gigabytes allowed for each project ๐Ÿ’พ
  • snapshots โ€” the number of snapshots allowed for each project ๐Ÿ“ธ
  • shares โ€” the number of shares allowed for each project ๐Ÿ“ฆ
  • snapshot_gigabytes โ€” the number of gigabytes for the snapshots allowed for each project ๐Ÿ’ฝ
  • share_groups โ€” the number of share groups allowed for each project or user ๐Ÿ‘ฏ
  • share_group_snapshots โ€” the number of share group snapshots allowed for each project or user ๐Ÿ–ผ๏ธ
  • share_networks โ€” the number of share networks allowed for each project ๐ŸŒ
  • share_replicas โ€” the number of share replicas allowed for each project ๐Ÿชž
  • replica_gigabytes โ€” the number of gigabytes for the share replicas allowed for each project ๐Ÿ’ฟ
  • per_share_gigabytes โ€” the number of gigabytes per share allowed for each project ๐Ÿ“
  • backups โ€” the number of backups allowed for each project ๐Ÿ—‚๏ธ
  • backup_gigabytes โ€” the number of gigabytes for the backups allowed for each project ๐Ÿงฎ

openstack.shared_file_system.v2.resource_locks

The Resource Locks Class ๐Ÿ”’

The ResourceLock class inherits from Resource <#openstack.resource.Resource>.

class openstack.shared_file_system.v2.resource_locks.ResourceLock(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ‘‘

Parameters

  • _synchronized โ€” not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing> ๐Ÿงš
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None ๐Ÿซถ

resource_key = 'resource_lock' โ€” singular form of key for resource 1๏ธโƒฃ

resources_key = 'resource_locks' โ€” plural form of key for resource ๐Ÿ“š

  • base_path = '/resource-locks' โ€” the base part of the URI for this resource, periodt.
  • allow_create = True โ€” create is allowed for this resource, slay.
  • allow_fetch = True โ€” fetching (get) is allowed ๐Ÿ’–
  • allow_commit = True โ€” update/commit is allowed โœจ
  • allow_delete = True โ€” delete is allowed, bye bestie ๐Ÿ‘‹
  • allow_list = True โ€” listing is allowed ๐ŸŒธ
  • allow_head = False โ€” head is not allowed, nope ๐Ÿ™ˆ
  • created_at โ€” Properties field: the date and time stamp of when the resource got created inside the services's database ๐Ÿ•
  • updated_at โ€” the date and time stamp of when the resource was last modified inside the services's database ๐Ÿ•‘
  • user_id โ€” the ID of the user that owns the lock ๐Ÿ‘‘
  • project_id โ€” the ID of the project that owns the lock ๐ŸŽ€
  • resource_type โ€” the type of the resource that is locked, i.e.: share, access rule.
  • resource_id โ€” the UUID of the resource that's locked ๐Ÿ”’
  • resource_action โ€” what action is currently locked, i.e.: deletion, visibility of fields.
  • lock_reason โ€” the reason that was specified while the lock was being placed ๐Ÿ“
  • lock_context โ€” the context that placed the lock (user, admin or service).

๐Ÿงš openstack.shared_file_system.v2.service

The Service Class โœจ

Okay so the Service class inherits from Resource.

class openstack.shared_file_system.v2.service.Service(_synchronized=False,
connection=None, **attrs)

The literal base resource, no cap.

Parameters ๐Ÿซถ

  • _synchronized โ€” not intended to be used directly, bestie. See new() and existing() instead. Skip it, iykyk.
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can still be used without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a check for None. Cute and defensive, we love to see it ๐Ÿ’…
  • resource_key = 'service' โ€” singular form of the key for the resource.
  • resources_key = 'services' โ€” plural form of the key for the resource.
  • base_path = '/services' โ€” the base part of the URI for this resource.
  • allow_create = False โ€” no creating here ๐Ÿ™…โ€โ™€๏ธ
  • allow_fetch = False โ€” no fetching either ๐Ÿšซ
  • allow_commit = True โ€” but update? oh she's allowed โœจ
  • allow_delete = False โ€” delete is a no-go.
  • allow_list = True โ€” listing is very much allowed ๐ŸŒˆ
  • allow_head = False โ€” head is not allowed, nope.
  • availability_zone โ€” Properties field: the availability zone of the service ๐ŸŒ
  • binary โ€” the service binary name.
  • host โ€” the service host name ๐Ÿ–ฅ๏ธ
  • name โ€” the service name ๐Ÿท๏ธ
  • state โ€” the current state of the service.
  • status โ€” the service status, which is enabled or disabled.
  • updated_at โ€” the date and time stamp of when the resource was last updated within the service's database โฐ
  • disabled_reason โ€” the reason for disabling the service ๐Ÿ˜ญ
  • ensuring โ€” whether the service is currently ensuring shares.
  • enable(session) โ€” enable the service ๐Ÿ’– she's back on.
  • disable(session, disable_reason=None) โ€” disable the service ๐Ÿ’€ mind the optional disable_reason.
  • ensure_shares(session) โ€” ensure shares on a back end.

๐Ÿฆ‹ openstack.shared_file_system.v2.share

The Share Class ๐ŸŽ€

The Share class inherits from Resource.

class openstack.shared_file_system.v2.share.Share(_synchronized=False,
connection=None, **attrs)

Again, the base resource. Hi bestie.

Parameters

  • _synchronized โ€” don't use this directly, literally. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, e.g. in unit tests. Any self._connection use in Resource code should guard with a None check โœจ
  • resource_key = 'share' โ€” singular form of the key for the resource.
  • resources_key = 'shares' โ€” plural form of the key for the resource.
  • base_path = '/shares' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” yes create ๐Ÿ’–
  • allow_fetch = True โ€” yes fetch ๐ŸŒธ
  • allow_commit = True โ€” yes update โœจ
  • allow_list = True โ€” yes list ๐ŸŒˆ
  • allow_head = False โ€” no head ๐Ÿ™ˆ
  • allow_delete = True โ€” yes delete ๐Ÿ”ฅ
  • access_rules_status โ€” Properties field: the share instance access rules status. A valid value is active, error, or syncing.
  • availability_zone โ€” the availability zone ๐ŸŒ
  • created_at โ€” the date and time stamp of when the resource was created within the services's database ๐Ÿ•
  • description โ€” the user defined description of the resource ๐Ÿ“
  • host โ€” the share host name ๐Ÿ–ฅ๏ธ
  • is_public โ€” the level of visibility for the share ๐Ÿ‘€
  • is_creating_new_share_from_snapshot_supported โ€” whether or not this share supports snapshots that can be cloned into new shares ๐Ÿงฌ
  • is_mounting_snapshot_supported โ€” whether the share's snapshots can be mounted directly and access controlled independently or not ๐Ÿ”
  • is_reverting_to_snapshot_supported โ€” whether the share can be reverted to its latest snapshot or not โช
  • is_snapshot_supported โ€” an extra specification that filters back ends by whether the share supports snapshots or not.
  • is_replicated โ€” indicates whether the share has replicas or not ๐Ÿ‘ฏโ€โ™€๏ธ
  • metadata โ€” one or more metadata key and value pairs, as a dictionary of strings.
  • progress โ€” the progress of the share creation ๐Ÿ“ˆ
  • project_id โ€” the ID of the project that owns the resource ๐Ÿ’œ
  • replication_type โ€” the share replication type. Valid values are none, readable, writable and dr.
  • share_group_id โ€” the UUID of the share group that this share belongs to.
  • share_network_id โ€” the share network ID.
  • share_protocol โ€” the Shared File Systems protocol. A valid value is NFS, CIFS, GlusterFS, HDFS, CephFS, MAPRFS
  • share_server_id โ€” the UUID of the share server.
  • share_type โ€” the UUID of the share type. In minor versions, this parameter is a share type name, as a string. Chaotic but iconic.
  • share_type_name โ€” name of the share type.
  • size โ€” the share size, in GiBs ๐Ÿ“
  • snapshot_id โ€” the UUID of the snapshot that was used to create the share.
  • source_share_group_snapshot_member_id โ€” the ID of the group snapshot instance that was used to create this share.
  • status โ€” the share status ๐Ÿšฆ
  • task_state โ€” for the share migration, the migration task state.
  • user_id โ€” ID of the user that the share was created by ๐Ÿ‘‘
  • display_name โ€” display name for updating name.
  • display_description โ€” display description for updating description.
  • extend_share(session, new_size, force=False) โ€” extend the share size, she's growing ๐Ÿ’…

Parameters

  • session โ€” a session object used for sending the request.
  • new_size โ€” the new size of the share in GiB.
  • force โ€” whether or not to use force, bypassing the scheduler. Requires admin privileges. Defaults to False. โš ๏ธ admin vibes only.

Returns The result of the action.

  • shrink_share(session, new_size) โ€” shrink the share size, she's on a diet ๐Ÿƒ

Parameters

  • session โ€” a session object used for sending the request.
  • new_size โ€” the new size of the share in GiB.

Returns None

  • revert_to_snapshot(session, snapshot_id) โ€” revert the share to the given snapshot โชโœจ

Parameters

  • session โ€” a session object used for sending the request.
  • snapshot_id โ€” the id of the snapshot to revert to.

Returns None

  • manage(session, protocol, export_path, service_host, **params) โ€” manage a share ๐ŸŽ›๏ธ

Parameters

  • session โ€” a session object used for sending the request.
  • protocol โ€” the shared file systems protocol of this share.
  • export_path โ€” the export path, formatted according to the protocol.
  • service_host โ€” the manage-share service host.
  • params โ€”

Optional parameters to be sent. Available parameters include:

  • name: the user defined name of the resource.
  • share_type โ€” the name or ID of the share type you want to use to create the resource โœจ
    • driver_options โ€” a set of one or more key and value pairs, as a dictionary of strings, that describe driver options. lowkey just a dict of strings, bestie ๐Ÿซถ
    • is_public โ€” the level of visibility for the share ๐Ÿ‘€
    • description โ€” the user defined description of the resource โœ๏ธ
    • share_server_id โ€” the UUID of the share server ๐Ÿ”‘

Returns

The share that was managed. that's it, that's the return ๐Ÿ’…


unmanage(session)

Unmanage a share. letting it go, free-range share era ๐Ÿฆ‹

Parameters

  • session โ€” a session object used for sending request.

Returns

None


force_delete(session)

Force delete the share. no soft launch, we're going straight through the wall ๐Ÿ’€

Returns

None


soft_delete(session)

Soft delete a share. gentle deletion, we love a respectful breakup ๐ŸŒธ

Parameters

  • session โ€” a session object used for sending request.

Returns

None


restore(session)

Restore a share. bringing it back like nothing happened ๐Ÿ˜ญ

Parameters

  • session โ€” a session object used for sending request.

Returns

None


reset_status(session, status)

Reset the share to the given status. factory reset but for a status field ๐Ÿ‘‘

Parameters

  • status โ€” the status of the share to reset to.

Returns

None


๐ŸŒˆ openstack.shared_file_system.v2.share_access_rule

The ShareAccessRule Class

The ShareAccessRule class inherits from Resource <#openstack.resource.Resource>. family tree moment ๐Ÿงš

class openstack.shared_file_system.v2.share_access_rule.ShareAccessRule(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>. don't touch it, i'm serious ๐Ÿ™ˆ
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'access' โ€” singular form of key for resource.

resources_key = 'access_list' โ€” plural form of key for resource.

base_path = '/share-access-rules' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = False โ€” allow update operation for this resource. nope, not allowed, read the room ๐Ÿ’…

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

allow_head = False โ€” allow head operation for this resource.

create_opts = CreateOpts(request_key='allow_access', response_key='access', method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)

Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). iconic inheritance behavior honestly ๐Ÿ‘‘

access_key โ€” Properties The access credential of the entity granted share access.

access_level โ€” the access level to the share.

access_list โ€” the object of the access rule.

access_to โ€” the value that defines the access.

access_type โ€” the access rule type.

created_at โ€” the date and time stamp when the resource was created within the services's database. timestamp bestie โญ

metadata โ€” one or more access rule metadata key and value pairs as a dictionary of strings.

share_id โ€” the UUID of the share to which you are granted or denied access. granted OR denied, both on the table ๐Ÿ˜ค

state โ€” the state of the access rule.

updated_at โ€” the date and time stamp when the resource was last updated within the services's database.

lock_visibility โ€” whether the visibility of some sensitive fields is restricted or not ๐Ÿ”’

lock_deletion โ€” whether the deletion of the access rule should be restricted or not ๐Ÿ”’

lock_reason โ€” reason for placing the loc.


delete(session, error_message=None, *, microversion=None, unrestrict=False, **kwargs)

Delete the remote resource based on this instance. bye bye bestie ๐Ÿ‘‹

Parameters

  • session โ€” the session to use for making this request.
  • microversion โ€” API version to override the negotiated one.
  • base_path โ€” base part of the URI for modifying resources, if different from base_path <#openstack.resource.Resource.base_path>.
  • params โ€” query string parameters to include in the request URL.

Returns

This Resource instance. it hands itself back to you, main character energy โœจ

Raises MethodNotSupported <#openstack.exceptions.MethodNotSupported> if Resource.allow_commit is not set to True.

Raises NotFoundException <#openstack.exceptions.NotFoundException> if the resource was not found.


๐Ÿ’œ openstack.shared_file_system.v2.share_group

The ShareGroup Class

The ShareGroup class inherits from Resource <#openstack.resource.Resource>. squad goals ๐Ÿซถ

class openstack.shared_file_system.v2.share_group.ShareGroup(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'share_group' โ€” singular form of key for resource.

resources_key = 'share_groups' โ€” plural form of key for resource.

base_path = '/share-groups' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource. we CAN commit here, unlike the last one ๐Ÿ’…

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

allow_head = False โ€” allow head operation for this resource.

availability_zone โ€” Properties The availability zone ID that the share group exists within.

consistent_snapshot_support โ€” the consistency snapshot support.

created_at โ€” the date and time stamp when the resource was created within the services's database.

description โ€” the user defined description of the resource.

project_id โ€” the ID of the project that owns the resource.

share_group_snapshot_id โ€” the share group snapshot ID.

share_group_type_id โ€” the share group type ID.

share_network_id โ€” the share network ID where the resource is exported to.

share_types โ€” a list of share type IDs.

status โ€” the share status.


๐Ÿฆ‹ openstack.shared_file_system.v2.share_group_snapshot

The ShareGroupSnapshot Class

The ShareGroupSnapshot class inherits from Resource <#openstack.resource.Resource>. snapshot of the whole group, obsessed ๐Ÿ“ธ

class openstack.shared_file_system.v2.share_group_snapshot.ShareGroupSnapshot(_synchronized=False, connection=None, **attrs)

The base resource.

Parameters

  • _synchronized โ€” this is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'share_group_snapshot' โ€” singular form of key for resource.

resources_key = 'share_group_snapshots' โ€” plural form of key for resource.

base_path = '/share-group-snapshots' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

allow_head = False โ€” allow head operation for this resource.

project_id โ€” Properties The ID of the project that owns the resource.

status โ€” filters by a share group snapshot status. a valid value is creating, error, available, deleting, error_deleting. those are the only options, don't freestyle it ๐Ÿ˜ญ

  • share_group_id โ€” the UUID of the share group. like, the actual ID of the group it belongs to ๐Ÿซถ
  • description โ€” the user-defined description of the resource. you write it, you own it ๐Ÿ’…
  • created_at โ€” the date + time stamp of when the resource was created โœจ
  • members โ€” the share group snapshot members. the whole squad ๐Ÿ‘‘
  • size โ€” the snapshot size, in GiBs.
  • share_protocol โ€” NFS, CIFS, GlusterFS, HDFS, CephFS or MAPRFS.

openstack.shared_file_system.v2.share_instance

The ShareInstance Class โ€” ok so this one inherits from Resource <#openstack.resource.Resource> ๐Ÿ’–

class openstack.shared_file_system.v2.share_instance.ShareInstance(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not meant to be used directly, bestie. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” a reference to the Connection being used. defaults to None so Resource objects can exist without an active Connection, like in unit tests. any use of self._connection in Resource code should protect itself with a check for None ๐Ÿ™ˆ

resource_key = 'share_instance' โ€” singular form of the key for the resource.

resources_key = 'share_instances' โ€” plural form of the key for the resource.

base_path = '/share_instances' โ€” the base part of the URI for this resource.

allow_create = False โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

allow_delete = False โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

allow_head = False โ€” allow head operation for this resource.

access_rules_status โ€” properties the share instance access rules status. a valid value is active, error, or syncing โญ

availability_zone โ€” the name of the availability zone the share exists within.

cast_rules_to_readonly โ€” if the share instance has its cast_rules_to_readonly attribute set to True, all existing access rules get cast to read-only. no take-backsies ๐Ÿ”ฅ

created_at โ€” the date and time stamp when the resource was created within the service's database.

host โ€” the host name of the service back end that the resource is contained within.

progress โ€” the progress of the share creation. the way it's just a number that ticks up ๐Ÿ˜ญ

replica_state โ€” the share replica state. only set to a value when replication is used. list of possible values: active, in_sync, out_of_sync, error.

share_id โ€” the UUID of the share that the share instance belongs to.

share_network_id โ€” the share network ID where the resource is exported to.

share_server_id โ€” the UUID of the share server.

status โ€” the share or share instance status.

reset_status(session, reset_status) โ€” reset share instance to the given status.

force_delete(session) โ€” force delete share instance. aggressive but iconic ๐Ÿ’€


openstack.shared_file_system.v2.share_network

The ShareNetwork Class โ€” inherits from Resource <#openstack.resource.Resource> ๐Ÿฆ‹

class openstack.shared_file_system.v2.share_network.ShareNetwork(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐ŸŒธ

resource_key = 'share_network' โ€” singular form of key for resource.

resources_key = 'share_networks' โ€” plural form of key for resource.

base_path = '/share-networks' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = True โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

allow_head = False โ€” allow head operation for this resource.

created_at โ€” properties the date and time stamp when the resource was created within the service's database.

description โ€” the user-defined description of the resource.

project_id โ€” the ID of the project that owns the resource. yours truly ๐Ÿ’…

share_network_subnets โ€” a list of share network subnets that pertain to the related share network.

neutron_net_id โ€” the UUID of a neutron network when setting up or updating a share network subnet with neutron.

neutron_subnet_id โ€” the UUID of the neutron subnet when setting up or updating a share network subnet with neutron.

updated_at โ€” the date and time stamp when the resource was last updated within the service's database.


openstack.shared_file_system.v2.share_network_subnet

The ShareNetworkSubnet Class โ€” inherits from Resource <#openstack.resource.Resource> ๐Ÿงš

class openstack.shared_file_system.v2.share_network_subnet.ShareNetworkSubnet(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐ŸŽ€

resource_key = 'share_network_subnet' โ€” singular form of key for resource.

resources_key = 'share_network_subnets' โ€” plural form of key for resource.

base_path = '/share-networks/%(share_network_id)s/subnets' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

allow_commit = False โ€” allow update operation for this resource.

allow_delete = True โ€” allow delete operation for this resource.

allow_list = True โ€” allow list operation for this resource.

create_opts = CreateOpts(request_key='share-network-subnet', response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True) โ€” class-level configuration for the create operation. subclasses can override this to set per-resource defaults without overriding create() โœจ

share_network_id โ€” properties the share network ID, part of the URI for share network subnets.

availability_zone โ€” the name of the availability zone that the share network subnet belongs to.

cidr โ€” the IP block from which to allocate the network, in CIDR notation.

created_at โ€” date and time the share network subnet was created at.

gateway โ€” the gateway of a share network subnet.

ip_version โ€” the IP version of the network.

mtu โ€” the MTU of a share network subnet.

network_type โ€” the network type. a valid value is VLAN, VXLAN, GRE, or flat โญ

neutron_net_id โ€” the name of the neutron network.

neutron_subnet_id โ€” the ID of the neutron subnet.

segmentation_id โ€” the segmentation ID.

share_network_name โ€” the name of the share network that the share network subnet belongs to.

updated_at โ€” date and time the share network subnet was last updated at.


openstack.shared_file_system.v2.share_replica

The ShareReplica Class โ€” inherits from Resource <#openstack.resource.Resource> ๐ŸŒˆ

class openstack.shared_file_system.v2.share_replica.ShareReplica(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” this is not intended to be used directly. see new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” reference to the Connection being used. defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. use of self._connection in Resource code should protect itself with a check for None ๐Ÿ’œ

resource_key = 'share_replica' โ€” singular form of key for resource.

resources_key = 'share_replicas' โ€” plural form of key for resource.

base_path = 'share-replicas' โ€” the base part of the URI for this resource.

allow_create = True โ€” allow create operation for this resource.

allow_fetch = True โ€” allow get operation for this resource.

  • allow_commit = False โ€” nope, you can't update this one. Read-only vibes.
  • allow_delete = True โ€” delete? absolutely, go off ๐Ÿ’…
  • allow_list = True โ€” you can list these, slay
  • allow_head = False โ€” no head requests, sorry bestie
  • share_id โ€” properties The UUID of the share from which to create a share replica. literally the origin story.
  • status โ€” The status of a share replica. List of possible values: <rainbow>available, error, creating, deleting, or error_deleting</rainbow>.
  • cast_rules_to_readonly โ€” If the share replica has its cast_rules_to_readonly attribute set to True, all existing access rules will be cast to read/only. ๐Ÿซถ
  • updated_at โ€” The date and time stamp when the resource was last updated within the service's database. If a resource was never updated after it was created, the value of this parameter is set to null. as it should be โœจ
  • share_network_id โ€” The share network ID where the resource is exported to.
  • share_server_id โ€” The UUID of the share server.
  • host โ€” The host name of the share replica.
  • replica_state โ€” The replica state of a share replica.
  • created_at โ€” The date and time stamp when the resource was created within the service's database.
  • reset_status(session, status) โ€” Reset the status of the share replica. fresh start energy ๐Ÿฆ‹
  • reset_replica_state(session, replica_state) โ€” Reset replica_state of the share replica.
  • force_delete(session, *, ignore_missing=False) โ€” Force-delete share replica. no cap, it's gone ๐Ÿ’€
  • promote(session) โ€” Promote share replica. main character promotion arc ๐Ÿ‘‘
  • resync(session) โ€” Resync share replica.

๐ŸŒธ openstack.shared_file_system.v2.share_snapshot

The ShareSnapshot Class

The ShareSnapshot class inherits from Resource <#openstack.resource.Resource>.

class openstack.shared_file_system.v2.share_snapshot.ShareSnapshot(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Then the class attributes:

  • resource_key = 'snapshot' โ€” Singular form of key for resource.
  • resources_key = 'snapshots' โ€” Plural form of key for resource.
  • base_path = '/snapshots' โ€” The base part of the URI for this resource.
  • allow_create = True โ€” Allow create operation for this resource. โœจ
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = True โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_head = False โ€” Allow head operation for this resource.
  • created_at โ€” Properties The date and time stamp when the resource was created within the services's database.
  • description โ€” The user defined description of the resource.
  • display_name โ€” The user defined name of the resource.
  • display_description โ€” The user defined description of the resource
  • project_id โ€” ID of the project that the snapshot belongs to.
  • share_id โ€” The UUID of the source share that was used to create the snapshot.
  • share_proto โ€” The file system protocol of a share snapshot
  • share_size โ€” The snapshot's source share's size, in GiBs.
  • size โ€” The snapshot size, in GiBs.
  • status โ€” The snapshot status
  • user_id โ€” ID of the user that the snapshot was created by.
  • reset_status(session, status) โ€” Reset the snapshot to the given status.

Parameters

  • status โ€” The status of the share to reset to.

Returns None

  • force_delete(session) โ€” Force delete the snapshot. ๐Ÿ˜ค

Returns None

  • manage(session, share_id, provider_location, **params) โ€” Manage a share snapshot.

Parameters

  • session โ€” A session object used for sending request.
  • share_id โ€” The UUID of the share that has snapshot which should be managed.
  • provider_location โ€” Provider location of the snapshot on the backend.
  • params โ€”

Optional parameters to be sent. Available parameters include:

  • name: The user defined name of the resource.
  • display_name: The user defined name of the resource. This field sets the name parameter.
  • description: The user defined description of the resource.
  • display_description: The user defined description of the resource. This field sets the description parameter.
  • driver_options: A set of one or more key and value pairs, as a dictionary of strings, that describe driver options.

Returns The share snapshot that was managed. ๐ŸŽ€

  • unmanage(session) โ€” Unmanage a share snapshot.

Parameters session โ€” A session object used for sending request.

Returns None


๐Ÿงš openstack.shared_file_system.v2.share_snapshot_instance

The ShareSnapshotInstance Class

The ShareSnapshotInstance class inherits from Resource <#openstack.resource.Resource>.

class openstack.shared_file_system.v2.share_snapshot_instance.ShareSnapshotInstance(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Attributes, coming right up:

  • resource_key = 'snapshot_instance' โ€” Singular form of key for resource.
  • resources_key = 'snapshot_instances' โ€” Plural form of key for resource.
  • base_path = '/snapshot-instances' โ€” The base part of the URI for this resource.
  • allow_create = False โ€” Allow create operation for this resource. not happening ๐Ÿ™ˆ
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = False โ€” Allow update operation for this resource.
  • allow_delete = False โ€” Allow delete operation for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_head = False โ€” Allow head operation for this resource.
  • created_at โ€” Properties The date and time stamp when the resource was created within the services's database.
  • progress โ€” The progress of the snapshot creation. we're getting there bestie ๐Ÿซถ
  • provider_location โ€” Provider location of the snapshot on the backend.
  • share_id โ€” The UUID of the share.
  • share_instance_id โ€” The UUID of the share instance.
  • snapshot_id โ€” The UUID of the snapshot.
  • status โ€” The snapshot instance status.
  • updated_at โ€” The date and time stamp when the resource was updated within the services's database.

๐Ÿ’œ openstack.shared_file_system.v2.share_transfer

The ShareTransfer Class

The ShareTransfer class inherits from Resource <#openstack.resource.Resource> and can be used to query quota class

class openstack.shared_file_system.v2.share_transfer.ShareTransfer(_synchronized=False, connection=None, **attrs)

The base resource

Parameters

  • _synchronized โ€” This is not intended to be used directly. See new() <#openstack.resource.Resource.new> and existing() <#openstack.resource.Resource.existing>.
  • connection โ€” Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'transfer' โ€” Singular form of key for resource.
  • base_path = '/share-transfers' โ€” The base part of the URI for this resource.
  • allow_list = True โ€” Allow list operation for this resource.
  • allow_create = True โ€” Allow create operation for this resource. โญ
  • allow_fetch = True โ€” Allow get operation for this resource.
  • allow_commit = False โ€” Allow update operation for this resource.
  • allow_delete = True โ€” Allow delete operation for this resource.
  • allow_head = False โ€” Allow head operation for this resource.
  • id โ€” The transfer UUID.
  • share_id โ€” The share UUID.
  • created_at โ€” the date + time stamp of when this resource got created in the service's database ๐Ÿ•
  • name โ€” the display name of the transfer, bestie ๐Ÿ’–
  • resource_type โ€” what type of resource we're transferring.
  • resource_id โ€” the UUID of the resource being transferred ๐Ÿ”‘
  • auth_key โ€” the authentication key for the transfer (the magic password, basically ๐Ÿ”ฎ)
  • source_project_id โ€” the ID of the project that owns the resource.
  • destination_project_id โ€” UUID of the destination project that accepts the transfer resource ๐ŸŽฏ
  • accepted โ€” whether the transfer has been accepted or not (true/false vibes โœจ)
  • expires_at โ€” the date and time stamp of when the resource transfer expires. After the transfer expires, it gets automatically deleted ๐Ÿ˜ญ
  • links โ€” pagination + bookmark links for the resource ๐Ÿ”—
  • accept(session, *, auth_key, clear_access_rules=False) โ€” accepts a share transfer using the auth_key. Slay ๐Ÿซถ

openstack.shared_file_system.v2.share_type</p>

The ShareType Class

Okay so ShareType inherits from Resource (that's <#openstack.resource.Resource> in the docs, iykyk).

class openstack.shared_file_system.v2.share_type.ShareType(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’…

Parameters

  • _synchronized โ€” not meant to be used directly, no cap. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” a reference to the Connection being used. Defaults to None so that Resource objects can be used without an active Connection, like in unit tests ๐Ÿงช. Any use of self._connection inside Resource code should protect itself with a check for None.
  • resource_key = 'share_type' โ€” the singular form of the key for the resource.
  • resources_key = 'share_types' โ€” the plural form of the key for the resource.
  • base_path = '/types' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • allow_create = True โ€” allow the create operation for this resource.
  • allow_fetch = True โ€” allow the get operation for this resource.
  • allow_commit = True โ€” allow the update operation for this resource.
  • allow_delete = True โ€” allow the delete operation for this resource.
  • allow_list = True โ€” allow the list operation for this resource.
  • allow_head = False โ€” allow the head operation for this resource (nope, not this one ๐Ÿ™ˆ).
  • description โ€” Properties: the description of the share type โœ๏ธ
  • extra_specs โ€” list of extra specs for share types โœจ
  • is_default โ€” indicates if the share type is the default one ๐Ÿ‘‘
  • is_public โ€” indicates if the share type is public ๐ŸŒ
  • required_extra_specs โ€” list of required extra specs for share types ๐Ÿ”ฅ
  • set_extra_specs(session, **specs) โ€” updates extra_specs ๐Ÿ’…

Heads up: this call replaces only the extra_specs with the same keys you give here. Other keys stay untouched, fr fr.

Parameters

  • session โ€” the session to use for this request.
  • extra_specs โ€” key/value extra_specs pairs to set or update.

Returns โ€” the updated self ๐Ÿซถ

  • delete_extra_specs_property(session, prop) โ€” deletes extra specs ๐Ÿ—‘๏ธ

Parameters

  • session โ€” the session to use for this request.
  • prop โ€” the property to delete.

Returns โ€” None.


openstack.shared_file_system.v2.storage_pool</p>

The StoragePool Class

StoragePool also inherits from Resource (<#openstack.resource.Resource>), periodt.

class openstack.shared_file_system.v2.storage_pool.StoragePool(_synchronized=False, connection=None, **attrs)

The base resource ๐ŸŒธ

Parameters

  • _synchronized โ€” not meant for direct use, see new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection (unit tests, bestie ๐Ÿงช). Use of self._connection in Resource code should guard with a None check.
  • resources_key = 'pools' โ€” the plural form of the key for the resource.
  • base_path = '/scheduler-stats/pools' โ€” the base part of the URI for this resource ๐ŸŒˆ
  • allow_create = False โ€” allow the create operation for this resource (no ๐Ÿ™…)
  • allow_fetch = False โ€” allow the get operation for this resource (also no)
  • allow_commit = False โ€” allow the update operation for this resource (still no)
  • allow_delete = False โ€” allow the delete operation for this resource (nope)
  • allow_list = True โ€” allow the list operation for this resource (this one's a yes โœจ)
  • allow_head = False โ€” allow the head operation for this resource.
  • backend โ€” Properties: the name of the back end ๐Ÿงฑ
  • host โ€” the host of the back end.
  • pool โ€” the pool for the back end ๐ŸŠ
  • capabilities โ€” the back end capabilities ๐Ÿ’ช

openstack.shared_file_system.v2.user_message</p>

The UserMessage Class

Yep, UserMessage inherits from Resource too (<#openstack.resource.Resource>), it's giving family reunion ๐Ÿซถ

class openstack.shared_file_system.v2.user_message.UserMessage(_synchronized=False, connection=None, **attrs)

The base resource ๐Ÿ’œ

Parameters

  • _synchronized โ€” not for direct use, see new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can exist without an active Connection, like in unit tests. Any use of self._connection in Resource code should protect itself with a None check.
  • resource_key = 'message' โ€” the singular form of the key for the resource.
  • resources_key = 'messages' โ€” the plural form of the key for the resource.
  • base_path = '/messages' โ€” the base part of the URI for this resource ๐Ÿ“จ
  • allow_fetch = True โ€” allow the get operation for this resource.
  • allow_commit = False โ€” allow the update operation for this resource (nope โœ‹).
  • allow_delete = True โ€” allow the delete operation for this resource.
  • allow_list = True โ€” allow the list operation for this resource.
  • allow_head = False โ€” allow the head operation for this resource.
  • action_id โ€” Properties: the action ID of the user message ๐ŸŽฌ
  • created_at โ€” indicates when the user message was created ๐Ÿ•
  • detail_id โ€” the detail ID of the user message.
  • expires_at โ€” indicates when the share message expires โŒ›
  • message_level โ€” the message level of the user message.
  • project_id โ€” the project ID of the user message.
  • request_id โ€” the request ID of the user message.
  • resource_id โ€” the resource ID of the user message.
  • resource_type โ€” the resource type of the user message.
  • user_message โ€” the message for the user message ๐Ÿ’ฌ

Workflow Resources ๐Ÿฆ‹

openstack.workflow.v2.cron_trigger</p>

The CronTrigger Class

CronTrigger inherits from Resource (<#openstack.resource.Resource>), obviously ๐Ÿ’…

class openstack.workflow.v2.cron_trigger.CronTrigger(_synchronized=False, connection=None, **attrs)

The base resource โœจ

Parameters

  • _synchronized โ€” not intended to be used directly. See new() (<#openstack.resource.Resource.new>) and existing() (<#openstack.resource.Resource.existing>).
  • connection โ€” reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests ๐Ÿงช. Use of self._connection in Resource code should protect itself with a check for None.
  • resource_key = 'cron_trigger' โ€” the singular form of the key for the resource.
  • resources_key = 'cron_triggers' โ€” the plural form of the key for the resource.
  • base_path = '/cron_triggers' โ€” the base part of the URI for this resource โฐ
  • allow_create = True โ€” allow the create operation for this resource.
  • allow_list = True โ€” allow the list operation for this resource.
  • allow_fetch = True โ€” allow the get operation for this resource.
  • allow_delete = True โ€” allow the delete operation for this resource.
  • create_opts โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create() ๐Ÿ‘‘
CreateOpts(request_key=None, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)
  • name โ€” the name of this Cron Trigger ๐Ÿท๏ธ
  • pattern โ€” the pattern for this Cron Trigger.
  • remaining_executions โ€” count of remaining exectuions (yes, that's how it's spelled in the docs, we don't gatekeep typos ๐Ÿ˜ญ)
  • first_execution_time โ€” time of the first execution โฑ๏ธ
  • next_execution_time โ€” time of the next execution โญ๏ธ
  • workflow_name โ€” workflow name.
  • workflow_id โ€” workflow ID.
  • workflow_input โ€” the inputs for the workflow ๐Ÿ“ฅ
  • workflow_params โ€” workflow params.
  • project_id โ€” the ID of the associated project.
  • created_at โ€” the time at which the cron trigger was created ๐Ÿ•
  • updated_at โ€” the time at which the cron trigger was created (yep, the docs say "created" again โ€” iconic copy-paste moment, we keep it exactly as-is ๐Ÿ’€)

๐Ÿงฉ openstack.workflow.v2.execution

๐Ÿ’ซ The Execution Class

So the Execution class is a whole vibe and it inherits straight from Resource (iykyk, that's the base everything rides on). Here's the whole thing:

class openstack.workflow.v2.execution.Execution(_synchronized=False, connection=None, **attrs)

Yeah, she's the base resource. Let's talk params:

  • _synchronized โ€” okay so this is not meant to be used directly, bestie. Like, do not touch. Go look at new() and existing() instead, they're the ones you actually want. ๐Ÿ™ˆ
  • connection โ€” a reference to the Connection being used. It defaults to None so you can build Resource objects with no active Connection at all, like in unit tests. And heads up: any code inside Resource that touches self._connection should guard itself with a check for None. Safety first, always. ๐Ÿ›ก๏ธ

Now the class attributes โ€” the icon lineup:

  • resource_key = 'execution' โ€” the singular form of the key for this resource.
  • resources_key = 'executions' โ€” the plural form of the key for this resource. Plural slay. โœจ
  • base_path = '/executions' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allows the create operation for this resource.
  • allow_list = True โ€” allows the list operation for this resource.
  • allow_fetch = True โ€” allows the get operation for this resource.
  • allow_delete = True โ€” allows the delete operation for this resource.
  • create_opts โ€” class-level config for the create operation. Subclasses can override this to set per-resource defaults without overriding create(). Iconic behavior honestly:
create_opts = CreateOpts(request_key=None,
response_key=<Unset.UNSET: 'UNSET'>, method='POST',
requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)

And the actual data fields on an Execution:

  • workflow_name โ€” the name of the workflow.
  • workflow_id โ€” the ID of the workflow.
  • description โ€” a description of the workflow execution.
  • task_execution_id โ€” a reference to the parent task execution.
  • status โ€” can be one of: IDLE, RUNNING, SUCCESS, ERROR, or PAUSED. That's the whole mood ring, no cap. ๐ŸŽข
  • status_info โ€” an optional info string about the status. The little love note attached to the status. ๐Ÿ’Œ
  • params โ€” an optional JSON structure holding workflow type specific parameters.
  • output โ€” the output of the workflow.
  • created_at โ€” the time at which the Execution was created.
  • updated_at โ€” the time at which the Execution was updated.

๐Ÿงฉ openstack.workflow.v2.workflow

๐ŸŒธ The Workflow Class

And Workflow also inherits from Resource โ€” same family, different flavor:

class openstack.workflow.v2.workflow.Workflow(_synchronized=False, connection=None, **attrs)

The base resource, again. Parameters, again:

  • _synchronized โ€” not intended to be used directly, periodt. See new() and existing().
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects work without an active Connection, like in unit tests. Anything touching self._connection in Resource code should protect itself with a None check.

The class attributes:

  • resource_key = 'workflow' โ€” singular form of the key for this resource.
  • resources_key = 'workflows' โ€” plural form of the key for this resource.
  • base_path = '/workflows' โ€” the base part of the URI for this resource.
  • allow_create = True โ€” allows the create operation for this resource.
  • allow_commit = True โ€” allows the update operation for this resource. (Yes, it's called commit here, stay with me. ๐Ÿซถ)
  • allow_list = True โ€” allows the list operation for this resource.
  • allow_fetch = True โ€” allows the get operation for this resource.
  • allow_delete = True โ€” allows the delete operation for this resource.

And the fields:

  • name โ€” the name of this Workflow.
  • input โ€” the inputs for this Workflow.
  • definition โ€” a Workflow definition using the Mistral v2 DSL.
  • scope โ€” can be either "private" or "public".
  • project_id โ€” the ID of the associated project.
  • created_at โ€” the time at which the workflow was created.
  • updated_at โ€” the time at which the workflow was created.
Okay yes, updated_at says "created" in the docs. That's just what the docs say, I'm not out here inventing lore. Not me being the messenger ๐Ÿ˜ญ๐Ÿ’€

๐Ÿ› ๏ธ create(session, prepend_key=True, base_path=None, **params)

Creates a remote resource based on this instance. Like, makes it real. โœจ

Parameters:

  • session โ€” the session to use for making this request.
  • prepend_key โ€” DEPRECATED, configure create_opts instead. Whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • base_path โ€” base part of the URI for creating resources, if it's different from base_path.
  • resource_request_key โ€” DEPRECATED, configure create_opts instead. Overrides the usage of resource_key when prepending a key to the request body. Ignored if prepend_key is false.
  • resource_response_key โ€” DEPRECATED, configure create_opts instead. Overrides the usage of resource_key when processing response bodies. Ignored if prepend_key is false.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional params to pass.

Returns: this Resource instance. ๐Ÿ’–

Raises: MethodNotSupported if Resource.allow_create is not set to True. So if you forgot to flip that flag, that's on you bestie.

๐Ÿ”„ commit(session, prepend_key=True, has_body=True, retry_on_conflict=None, base_path=None, *, microversion=None, **kwargs)

Commits the state of the instance to the remote resource. Push it live, queen. ๐Ÿ‘‘

Parameters:

  • session โ€” the session to use for making this request.
  • prepend_key โ€” whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults alone.
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path.
  • microversion โ€” API version to override the negotiated one.
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource.

Returns: this Resource instance. ๐Ÿ’–

Raises: MethodNotSupported if Resource.allow_commit is not set to True. Same energy as before โ€” flip the flag or get the error.


๐Ÿ”ฎ Low-Level Classes

These next ones are not the ones app devs reach for every day, ngl โ€” but they're what you use to build applications that talk to OpenStack APIs. Most of the time the Connection Interface handles all this for you, but if you wanna customize, the door's open. ๐Ÿšชโœจ


๐Ÿงฑ Resource

The base resource class, the blueprint, the main character of the whole hierarchy.

Resource is a base class representing a remote resource. The attributes that make up a request or response for this resource are specified as class members on the Resource subclass, where their values are of a component type โ€” that includes Body, Header, and URI. ๐ŸŽ€

For update management, Resource employs a series of _ComponentManager instances to look after the attributes of that particular component type. That's especially useful for the Body and Header types, so only the values that are actually necessary get sent in requests to the server. Efficiency ate. ๐Ÿ’…

When making requests, each of the managers gets looked at to gather the necessary URI, body, and header data to build a request that goes out via keystoneauth's sessions. Responses coming back from keystoneauth then get converted into this Resource class' appropriate components and types, and handed right back to the caller. Round trip complete, no notes. ๐ŸŒˆ


๐Ÿงฌ Components

class openstack.resource.Body(name, type=None, default=None, alias=None, aka=None, alternate_id=False, list_type=None, coerce_to_default=False, deprecated=False, deprecation_reason=None)

class openstack.resource.Header(name, type=None, default=None, alias=None, aka=None, alternate_id=False, list_type=None, coerce_to_default=False, deprecated=False, deprecation_reason=None)

class openstack.resource.URI(name, type=None, default=None, alias=None, aka=None, alternate_id=False, list_type=None, coerce_to_default=False, deprecated=False, deprecation_reason=None)

Three besties, same signature. Body, Header, URI. They come as a set. ๐Ÿซถ


๐Ÿ‘‘ The Resource class

class openstack.resource.Resource(_synchronized=False, connection=None, **attrs)

The base resource. Params:

  • _synchronized โ€” not intended to be used directly. See new() and existing(). (You've heard this before, and you'll hear it again. ๐Ÿ’€)
  • connection โ€” reference to the Connection being used. Defaults to None so Resource objects can be used without an active Connection, like in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

Class attributes:

  • resource_key = None โ€” singular form of the key for this resource.
  • resources_key = None โ€” plural form of the key for this resource.
  • pagination_key = None โ€” key used for pagination links.
  • id โ€” the ID of this resource.
  • name โ€” the name of this resource.
  • location โ€” the OpenStack location of this resource.
  • base_path = '' โ€” the base part of the URI for this resource. Empty string, humble but foundational. โญ

Okay so here are the class-level switches and the actual action buttons on this resource โ€” permission slips and methods, all the tea. ๐Ÿ’…

  • allow_create = False โ€” the permission slip for the create operation on this resource.
  • allow_fetch = False โ€” the permission slip for the get operation on this resource.
  • allow_commit = False โ€” the permission slip for the update operation on this resource.
  • allow_delete = False โ€” the permission slip for the delete operation on this resource.
  • allow_list = False โ€” the permission slip for the list operation on this resource.
  • allow_head = False โ€” the permission slip for the head operation on this resource.
  • allow_patch = False โ€” the permission slip for the patch operation on this resource.
  • requires_id = True โ€” do calls for this resource require an ID? Yep, default is yes.
  • create_opts โ€” class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().
create_opts = CreateOpts(request_key=<Unset.UNSET: 'UNSET'>, response_key=<Unset.UNSET: 'UNSET'>, method='POST', requires_id=<Unset.UNSET: 'UNSET'>, response_has_body=True)
  • allow_empty_commit = False โ€” commits happen without header or body being dirty.
  • commit_method = 'PUT' โ€” method for committing a resource. This must be PATCH if allow_patch is True.
  • microversion = None โ€” API microversion (string or None) this Resource was loaded with.

  • keys() โ€” return a set-like object providing a view on the dict's keys.
  • items() โ€” return a set-like object providing a view on the dict's items.

classmethod new(**attrs)

Create a new instance of this resource. โœจ

When creating the instance, set the _synchronized parameter of Resource to False to indicate that the resource does not yet exist on the server side. This marks all attributes passed in **attrs as "dirty" on the resource, and thusly tracked as necessary in subsequent calls such as update().

  • attrs โ€” each of the named arguments will be set as attributes on the resulting Resource object. These should correspond to either Body or Header values on this resource.

classmethod existing(connection=None, **attrs)

Create an instance of an existing remote resource.

When creating the instance, set the _synchronized parameter of Resource to True to indicate that it represents the state of an existing server-side resource. As such, all attributes passed in **attrs are considered "clean", such that an immediate update() call would not generate a body of attributes to be modified on the server.

  • attrs โ€” each of the named arguments will be set as attributes on the resulting Resource object.

Returns: an instance of self with the passed attributes set.


to_dict(body=True, headers=True, computed=True, ignore_none=False, original_names=False, _to_munch=False)

Return a dictionary of this resource's contents.

  • body โ€” include the Body attributes in the returned dictionary.
  • headers โ€” include the Header attributes in the returned dictionary.
  • computed โ€” include the Computed attributes in the returned dictionary.
  • ignore_none โ€” when True, exclude key/value pairs where the value is None. This will exclude attributes that the server hasn't returned.
  • original_names โ€” when True, use attribute names as they were received from the server.
  • _to_munch โ€” for internal use only. Converts to utils.Munch instead of dict.

Returns: a dictionary of key/value pairs where keys are named as they exist as attributes of this class.


toDict(body=True, headers=True, computed=True, ignore_none=False, original_names=False, _to_munch=False)

Return a dictionary of this resource's contents. Same exact vibe as to_dict(), bestie โ€” every knob is still here:

  • body โ€” include the Body attributes in the returned dictionary.
  • headers โ€” include the Header attributes in the returned dictionary.
  • computed โ€” include the Computed attributes in the returned dictionary.
  • ignore_none โ€” when True, exclude key/value pairs where the value is None. This will exclude attributes that the server hasn't returned.
  • original_names โ€” when True, use attribute names as they were received from the server.
  • _to_munch โ€” for internal use only. Converts to utils.Munch instead of dict.

Returns: a dictionary of key/value pairs where keys are named as they exist as attributes of this class.


copy(body=True, headers=True, computed=True, ignore_none=False, original_names=False, _to_munch=False)

Return a dictionary of this resource's contents. Yes, it's the same contract again โ€” here's every parameter so nothing gets lost:

  • body โ€” include the Body attributes in the returned dictionary.
  • headers โ€” include the Header attributes in the returned dictionary.
  • computed โ€” include the Computed attributes in the returned dictionary.
  • ignore_none โ€” when True, exclude key/value pairs where the value is None. This will exclude attributes that the server hasn't returned.
  • original_names โ€” when True, use attribute names as they were received from the server.
  • _to_munch โ€” for internal use only. Converts to utils.Munch instead of dict.

Returns: a dictionary of key/value pairs where keys are named as they exist as attributes of this class.


create(session, prepend_key=True, base_path=None, *, resource_request_key=None, resource_response_key=None, microversion=None, **params)

Create a remote resource based on this instance. ๐ŸŽ€

  • session โ€” the session to use for making this request.
  • prepend_key โ€” DEPRECATED โ€” configure create_opts instead. Whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • base_path โ€” base part of the URI for creating resources, if different from base_path.
  • resource_request_key โ€” DEPRECATED โ€” configure create_opts instead. Overrides the usage of resource_key when prepending a key to the request body. Ignored if prepend_key is false.
  • resource_response_key โ€” DEPRECATED โ€” configure create_opts instead. Overrides the usage of resource_key when processing response bodies. Ignored if prepend_key is false.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional params to pass.

Returns: this Resource instance.

Raises: MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_create is not set to True.


classmethod bulk_create(session, data, prepend_key=True, base_path=None, *, microversion=None, **params)

Create multiple remote resources based on this class and data. Group project energy. ๐Ÿ”ฅ

  • session โ€” the session to use for making this request.
  • data โ€” list of dicts, which represent resources to create.
  • prepend_key โ€” whether the resource_key should be prepended in a resource creation request. Defaults to True.
  • base_path โ€” base part of the URI for creating resources, if different from base_path.
  • microversion โ€” API version to override the negotiated one.
  • params โ€” additional params to pass.

Returns: a generator of Resource objects.

Raises: MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_create is not set to True.


fetch(session, requires_id=True, base_path=None, error_message=None, skip_cache=False, *, resource_response_key=None, microversion=None, **params)

Get a remote resource based on this instance.

  • session โ€” the session to use for making this request.
  • requires_id โ€” whether resource ID should be part of the requested URI.
  • base_path โ€” base part of the URI for fetching resources, if different from base_path.
  • error_message โ€” an error message to be returned if requested object does not exist.
  • skip_cache โ€” a boolean indicating whether optional API cache should be skipped for this invocation.
  • resource_response_key โ€” overrides how self.resource_key gets used when the response body is processed. ๐Ÿ’…
  • microversion โ€” API version to override the negotiated one. โœจ
  • params โ€” extra parameters that can be consumed. ๐Ÿ“

Returns โ€” this Resource instance. ๐Ÿ’–

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_fetch is not set to True. ๐Ÿ˜ค

Raises NotFoundException (openstack.exceptions.NotFoundException) if the resource was not found. ๐Ÿ˜ญ

head(session, base_path=None, *, microversion=None)

Grabs the headers from a remote resource based on this instance. Like, you're not fetching the whole body, just the metadata โ€” very main character energy. ๐ŸŽ€

Parameters

  • session โ€” the session to use for making this request. ๐Ÿซถ
  • base_path โ€” base part of the URI for fetching resources, if it's different from base_path. (Yes, same name, different job. iconic.) ๐Ÿ’…
  • microversion โ€” API version to override the negotiated one. โœจ

Returns โ€” this Resource instance. ๐Ÿ’–

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_head is not set to True. ๐Ÿšซ

Raises NotFoundException (openstack.exceptions.NotFoundException) if the resource was not found. ๐Ÿ˜ญ

property requires_commit

Tells you whether the next commit() call will actually do anything. Lowkey a vibe check for your pending changes. ๐Ÿ‘€

commit

commit(session, prepend_key=True, has_body=True,
       retry_on_conflict=None, base_path=None, *, microversion=None,
       **attrs)

Commits the state of the instance to the remote resource. It's giving "make it official" energy. ๐Ÿ’

Parameters

  • session โ€” the session to use for making this request. ๐Ÿซถ
  • prepend_key โ€” whether the resource_key should be prepended in a resource creation request. Defaults to True. ๐ŸŽ€
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults. ๐Ÿ”
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path. ๐Ÿ’…
  • microversion โ€” API version to override the negotiated one. โœจ
  • attrs โ€” attributes to pass when updating the resource. These should correspond to either Body or Header values on the resource. ๐Ÿงš

Returns โ€” this Resource instance. ๐Ÿ’–

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_commit is not set to True. ๐Ÿ˜ค

patch

patch(session, patch=None, prepend_key=True, has_body=True,
      retry_on_conflict=None, base_path=None, *, microversion=None)

Patches the remote resource. ๐Ÿฉน

Lets you modify the resource by providing a list of JSON patches to apply to it. The patches can use both the original (server-side) and SDK field names โ€” so you can speak either language, no cap. ๐Ÿ”ฅ

Parameters

  • session โ€” the session to use for making this request. ๐Ÿซถ
  • patch โ€” additional JSON patch as a list or one patch item. If provided, it's applied on top of any changes to the current resource. ๐ŸŽ€
  • prepend_key โ€” whether the resource_key should be prepended in a resource creation request. Defaults to True. ๐Ÿ’…
  • retry_on_conflict โ€” whether to enable retries on HTTP CONFLICT (409). A value of None leaves the Adapter defaults. ๐Ÿ”
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path. โœจ
  • microversion โ€” API version to override the negotiated one. โญ

Returns โ€” this Resource instance. ๐Ÿ’–

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_patch is not set to True. ๐Ÿ˜ค

delete

delete(session, error_message=None, *, microversion=None,
       base_path=None, params=None)

Deletes the remote resource based on this instance. Bye bestie! ๐Ÿ‘‹๐Ÿ’€

Parameters

  • session โ€” the session to use for making this request. ๐Ÿซถ
  • microversion โ€” API version to override the negotiated one. โœจ
  • base_path โ€” base part of the URI for modifying resources, if it's different from base_path. ๐Ÿ’…
  • params โ€” query string parameters to include in the request URL. ๐Ÿ“

Returns โ€” this Resource instance. ๐Ÿ’–

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_commit is not set to True. (Yes, it says allow_commit here โ€” we're just the messenger. ๐Ÿ™ˆ)

Raises NotFoundException (openstack.exceptions.NotFoundException) if the resource was not found. ๐Ÿ˜ญ

classmethod list

classmethod list(session, paginated=True, base_path=None,
                 allow_unknown_params=False, *, microversion=None, headers=None,
                 max_items=None, **params)

This method is a generator that yields resource objects. It handles pagination and takes query params for response filtering. It's giving "infinite scroll but make it API". ๐ŸŒˆ

Parameters

  • session โ€” the session to use for making this request. ๐Ÿซถ
  • paginated โ€” True if a GET to this resource returns a paginated series of responses, or False if a GET returns only one page of data. When paginated is False, only one page of data will be returned regardless of the API's support for pagination. ๐Ÿ“„
  • base_path โ€” base part of the URI for listing resources, if it's different from base_path. ๐Ÿ’…
  • allow_unknown_params โ€” True to accept but discard unknown query parameters. This lets you get a list of 'filters' and pass everything known to the server. False will result in a validation exception when unknown query parameters are passed. ๐Ÿšซ
  • microversion โ€” API version to override the negotiated one. โœจ
  • headers โ€” additional headers to inject into the HTTP request. ๐ŸŽ€
  • max_items โ€” the maximum number of items to return. Typically this must be used with paginated=True. ๐Ÿ”ข
  • params โ€” these keyword arguments are passed through the _transpose() method to find if any of them match expected query parameters to be sent in the params argument to get(). They're additionally checked against the base_path format string to see if any path fragments need to be filled in by the contents of this argument. Parameters supported as filters by the server side are passed in the API call; remaining parameters are applied as filters to the retrieved results. ๐Ÿงš

Returns โ€” a generator of Resource objects. ๐Ÿ’–

Raises MethodNotSupported (openstack.exceptions.MethodNotSupported) if Resource.allow_list is not set to True. ๐Ÿ˜ค

Raises InvalidResourceQuery (openstack.exceptions.InvalidResourceQuery) if the query contains invalid params. ๐Ÿ’€

classmethod find

classmethod find(session, name_or_id, ignore_missing=True,
                 list_base_path=None, *, microversion=None, all_projects=None,
                 **params)

Finds a resource by its name or id. It's giving detective energy. ๐Ÿ”

Parameters

  • session โ€” the session to use for making this request. ๐Ÿซถ
  • name_or_id โ€” this resource's identifier, if needed by the request. The default is None. ๐ŸŽ€
  • ignore_missing โ€” when set to False, NotFoundException (openstack.exceptions.NotFoundException) will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource. ๐Ÿ™ˆ
  • list_base_path โ€” base_path to be used when you need to list resources. ๐Ÿ’…
  • microversion โ€” API version to override the negotiated one. โœจ
  • params โ€” any additional parameters to be passed into underlying methods, such as to existing() in order to pass on URI parameters. ๐Ÿ“

Returns โ€” the Resource object matching the given name or id, or None if nothing matches. ๐Ÿ’–

Raises openstack.exceptions.DuplicateResource if more than one resource is found for this request. ๐Ÿ˜ญ

Raises openstack.exceptions.NotFoundException if nothing is found and ignore_missing is False. ๐Ÿ’€

๐Ÿ’… ServiceDescription ๐Ÿ’…

okay bestie, meet the class that tells the SDK how to vibe with a REST service:

class openstack.service_description.ServiceDescription(service_type, supported_versions=None, aliases=None)

This is literally the class that describes how to interact with a REST service. No cap.

Every service in an OpenStack cloud has to be found by looking for it in the catalog. Once the endpoint is found, you can make REST calls โ€” but you need a Proxy class and some Resource objects to get that object interface, fr fr.

Instances of ServiceDescription can be passed to openstack.connection.Connection.add_service, or a list can be passed to the openstack.connection.Connection constructor in the extra_services argument. iykyk

All three parameters can be provided at instantation time, or a service-specific subclass can be used that sets the attributes directly.

Parameters

  • service_type โ€” service_type to look for in the keystone catalog
  • aliases โ€” Optional list of aliases, if there is more than one name that might be used to register the service in the catalog.
  • service_type โ€” main service_type to use to find this service in the catalog
  • supported_versions = {} โ€” Dictionary of supported versions and proxy classes for that version
  • aliases = [] โ€” list of aliases this service might be registered as

๐Ÿงš ServiceDescription object ๐Ÿงš

same class, same icon energy โ€” the object version is right above, bestie. The attributes are service_type, supported_versions = {}, and aliases = [], exactly as listed.


๐Ÿ› ๏ธ Utilities ๐Ÿ› ๏ธ

๐ŸŒธ Errors and warnings ๐ŸŒธ

The SDK attempts to provide detailed errors and warnings for things like failed requests, deprecated APIs, and invalid configurations. Application developers are responsible for handling these errors and can opt into warnings to ensure their applications stay up-to-date. you got this, but also handle your exceptions pls

๐ŸŒˆ Exceptions ๐ŸŒˆ

openstacksdk provides a number of exceptions (the Python kind: https://docs.python.org/3/library/exceptions.html) for commonly encountered issues, such as missing API endpoints, various HTTP error codes, timeouts and so forth. It is the responsibility of the calling application to handle these exceptions appropriately.

โญ Available exceptions โญ

Exception definitions, bestie:

  • exception openstack.exceptions.SDKException(message=None, extra_data=None) โ€” The base exception class for all exceptions this library raises.
  • exception openstack.exceptions.EndpointNotFound(message=None) โ€” A mismatch occurred between what the client and server expect.
  • exception openstack.exceptions.InvalidResponse(message=None) โ€” The response from the server is not valid for this request.
  • exception openstack.exceptions.InvalidRequest(message=None) โ€” The request to the server is not valid.
  • exception openstack.exceptions.HttpException(message='Error', response=None, http_status=None, details=None, request_id=None) โ€” The base exception for all HTTP error responses. Initialize RequestException with request and response objects.
  • exception openstack.exceptions.BadRequestException(message='Error', response=None, http_status=None, details=None, request_id=None) โ€” HTTP 400 Bad Request. Initialize RequestException with request and response objects.
  • exception openstack.exceptions.NotFoundException(message='Error', response=None, http_status=None, details=None, request_id=None) โ€” HTTP 404 Not Found. Initialize RequestException with request and response objects.
  • exception openstack.exceptions.ForbiddenException(message='Error', response=None, http_status=None, details=None, request_id=None) โ€” HTTP 403 Forbidden Request. Initialize RequestException with request and response objects.
  • exception openstack.exceptions.ConflictException(message='Error', response=None, http_status=None, details=None, request_id=None) โ€” HTTP 409 Conflict. Initialize RequestException with request and response objects.
  • exception openstack.exceptions.PreconditionFailedException(message='Error', response=None, http_status=None, details=None, request_id=None) โ€” HTTP 412 Precondition Failed. Initialize RequestException with request and response objects.
  • exception openstack.exceptions.MethodNotSupported(resource, method) โ€” The resource does not support this operation type.
  • exception openstack.exceptions.DuplicateResource(message=None, extra_data=None) โ€” More than one resource exists with that name.
  • exception openstack.exceptions.ResourceTimeout(message=None, extra_data=None) โ€” Timeout waiting for resource.
  • exception openstack.exceptions.ResourceFailure(message=None, extra_data=None) โ€” General resource failure.
  • exception openstack.exceptions.InvalidResourceQuery(message=None, extra_data=None) โ€” Invalid query params for resource.
  • openstack.exceptions.raise_from_response(response, error_message=None) โ€” Raise an instance of an HTTPException based on keystoneauth response.
  • exception openstack.exceptions.ConfigException(message=None, extra_data=None) โ€” Something went wrong with parsing your OpenStack Config.
  • exception openstack.exceptions.NotSupported(message=None, extra_data=None) โ€” Request cannot be performed by any supported API version.
  • exception openstack.exceptions.ValidationException(message=None, extra_data=None) โ€” Validation failed for resource.
  • exception openstack.exceptions.ServiceDisabledException(message=None, extra_data=None) โ€” This service is disabled for reasons.
  • exception openstack.exceptions.ServiceDiscoveryException(message=None, extra_data=None) โ€” The service cannot be discovered.
  • openstack.exceptions.OpenStackCloudException โ€” alias of SDKException
  • openstack.exceptions.ResourceNotFound โ€” alias of NotFoundException

๐ŸŽ€ Warnings ๐ŸŽ€

openstacksdk uses the warnings infrastructure (https://docs.python.org/3/library/warnings.html) to warn users about deprecated resources and resource fields, as well as deprecated behavior in openstacksdk itself. These warnings are derived from Warning or DeprecationWarning. In Python, warnings are emitted by default while deprecation warnings are silenced by default and must be turned on using the -Wa Python command line option or the PYTHONWARNINGS environment variable. If you are writing an application that uses openstacksdk, you may wish to enable some of these warnings during test runs to ensure you migrate away from deprecated behavior. future-you will thank present-you, bestie

๐Ÿฆ‹ Available warnings ๐Ÿฆ‹

  • exception openstack.warnings.OpenStackDeprecationWarning โ€” Base class for warnings about deprecated features in openstacksdk.
  • exception openstack.warnings.RemovedResourceWarning โ€” Indicates that a resource has been removed in newer API versions and should not be used.
  • exception openstack.warnings.RemovedFieldWarning โ€” Indicates that a field has been removed in newer API versions and should not be used.
  • exception openstack.warnings.LegacyAPIWarning โ€” Indicates an API that is in 'legacy' status, a long term deprecation.
  • exception openstack.warnings.RemovedInSDK50Warning โ€” Indicates an argument that is deprecated for removal in SDK 5.0.
  • exception openstack.warnings.RemovedInSDK60Warning โ€” Indicates an argument that is deprecated for removal in SDK 6.0.
  • exception openstack.warnings.OpenStackWarning โ€” Base class for general warnings in openstacksdk.
  • exception openstack.warnings.ConfigurationWarning โ€” Indicates an issue with configuration.
  • exception openstack.warnings.UnsupportedServiceVersion โ€” Indicates a major version that SDK doesn't understand.

๐Ÿ‘‘ Presentations ๐Ÿ‘‘

๐Ÿ“ Multi-Cloud Demo ๐Ÿ“

This document contains a presentation in presentty (https://pypi.org/project/presentty) format. If you want to walk through it like a presentation, install presentty and run:

presentty doc/source/user/multi-cloud-demo.rst

The content is hopefully helpful even if it's not being narrated, so it's being included in the openstacksdk docs. lowkey iconic of them

๐Ÿ’œ Who am I? ๐Ÿ’œ

Monty Taylor

  • OpenStack Infra Core
  • irc: mordred
  • twitter: @e_monty

๐Ÿ”ฅ What are we going to talk about? ๐Ÿ”ฅ

OpenStackSDK

  • a task and end-user oriented Python library
  • abstracts deployment differences
  • designed for multi-cloud
  • simple to use
  • massive scale
    • optional advanced features to handle 20k servers a day
  • Initial logic/design extracted from nodepool
  • Librified to re-use in Ansible

๐ŸŒธ OpenStackSDK is Free Software ๐ŸŒธ

โœจ This talk is Free Software, too โœจ

  • Written for presentty (https://pypi.org/project/presentty)
  • doc/source/user/multi-cloud-demo.rst
  • examples in examples/cloud
  • Paths subject to change - this is the first presentation in tree!

๐Ÿ’… Complete Example ๐Ÿ’…

from openstack import cloud as openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

for cloud_name, region_name in [
    ('my-vexxhost', 'ca-ymq-1'),
    ('my-citycloud', 'Buf1'),
    ('my-internap', 'ams01'),
]:
    # Initialize cloud
    cloud = openstack.connect(cloud=cloud_name, region_name=region_name)

    # Upload an image to the cloud
    image = cloud.create_image(
        'devuan-jessie',
        filename='devuan-jessie.qcow2',
        wait=True,
    )

    # Find a flavor with at least 512M of RAM
    flavor = cloud.get_flavor_by_ram(512)

    # Boot a server, wait for it to boot, and then do whatever is needed
    # to get a public ip for it.
    cloud.create_server(
        'my-server',
        image=image,
        flavor=flavor,
        wait=True,
        auto_ip=True,
    )

๐Ÿงš Let's Take a Few Steps Back ๐Ÿงš

Multi-cloud is easy, but you need to know a few things.

  • Terminology
  • Config
  • OpenStackSDK API

๐ŸŒˆ Cloud Terminology ๐ŸŒˆ

Let's define a few terms, so that we can use them with ease:

  • cloud - logically related collection of services
  • region - completely independent subset of a given cloud
  • patron - human who has an account
  • user - account on a cloud
  • project - logical collection of cloud resources
  • domain - collection of users and projects

โญ Cloud Terminology Relationships โญ

  • A cloud has one or more regions
  • A patron has one or more users
  • A patron has one or more projects
  • A cloud has one or more domains
  • In a cloud with one domain it is named "default"
  • Each patron may have their own domain
  • Each user is in one domain
  • Every project lives inside exactly one domain ๐Ÿ 
  • A user holds one or more roles on one or more projects โ€” that's the whole permission vibe โœจ

๐ŸŒ HTTP Sessions ๐ŸŒ

  • Every HTTP interaction gets authenticated through keystone ๐Ÿ”‘
  • Authenticating hands you back a token
  • An authenticated HTTP Session is shared across a region โ€” one session, whole region, slay

โ˜๏ธ Cloud Regions โ˜๏ธ

A cloud region is the basic unit of REST interaction. Like, the atom of the whole thing ๐Ÿ’…

  • A cloud has a service catalog
  • The service catalog comes back inside the token
  • The service catalog lists the endpoint for each service in each region
  • A region is completely autonomous โ€” it answers to nobody ๐Ÿ‘‘

๐Ÿ‘ฅ Users, Projects and Domains ๐Ÿ‘ฅ

Okay so in clouds with multiple domains, project and user names are only unique within a region. Yeah. Read that again ๐Ÿ˜ญ

  • Names need domain info for uniqueness. IDs do not.
  • Handing over domain info when it's not needed is totally fine, no harm
  • project_name requires project_domain_name or project_domain_id
  • project_id does not
  • username requires user_domain_name or user_domain_id
  • user_id does not

๐Ÿ˜ต Confused Yet? ๐Ÿ˜ต

Don't worry bestie โ€” you genuinely don't have to deal with most of that. Deep breath, we're fine ๐Ÿซถ


๐ŸŽฏ Auth per cloud, select per region ๐ŸŽฏ

In general, the thing you actually need to know is:

  • Configure authentication per cloud
  • Select config to use by cloud and region

๐Ÿ“„ clouds.yaml ๐Ÿ“„

Information about the clouds you want to connect to lives in a file called clouds.yaml ๐Ÿ’–

clouds.yaml can be in your homedir: ~/.config/openstack/clouds.yaml or system-wide: /etc/openstack/clouds.yaml.

Information in your homedir, if it exists, takes precedence. Homedir wins, always, no cap.

Full docs on clouds.yaml are at https://docs.openstack.org/os-client-config/latest/ ๐Ÿ“š


๐ŸŽ What about Mac and Windows? ๐ŸชŸ

USER_CONFIG_DIR is different on Linux, OSX and Windows. It's giving โœจdiversityโœจ

  • Linux: ~/.config/openstack
  • OSX: ~/Library/Application Support/openstack
  • Windows: C:\Users\USERNAME\AppData\Local\OpenStack\openstack

SITE_CONFIG_DIR is different on Linux, OSX and Windows too:

  • Linux: /etc/openstack
  • OSX: /Library/Application Support/openstack
  • Windows: C:\ProgramData\OpenStack\openstack

๐Ÿง  Config Terminology ๐Ÿง 

For multi-cloud situations, think of two types:

  • profile โ€” facts about the cloud that are true for everyone
  • cloud โ€” information specific to a given user

Apologies for the use of cloud twice. The naming committee was on break that day ๐Ÿ™ˆ


๐ŸŒฑ Environment Variables and Simple Usage ๐ŸŒฑ

  • Environment variables starting with OS_ go into a cloud called envvars
  • If you only have one cloud, you don't have to specify it ๐ŸŽ‰
  • OS_CLOUD and OS_REGION_NAME are default values for cloud and region_name

๐ŸŽค TOO MUCH TALKING - NOT ENOUGH CODE ๐ŸŽค

๐Ÿ’พ basic clouds.yaml for the example code ๐Ÿ’พ

Simple example of a clouds.yaml, just to get your feet wet:

clouds:
  my-citycloud:
    profile: citycloud
    auth:
      username: mordred
      project_id: 65222a4d09ea4c68934fa1028c77f394
      user_domain_id: d0919bd5e8d74e49adf0e145807ffc38
      project_domain_id: d0919bd5e8d74e49adf0e145807ffc38

Where's the password? ๐Ÿคจ (spoiler: next section)


๐Ÿ” secure.yaml ๐Ÿ”

  • Optional extra file, works exactly like clouds.yaml
  • Values get overlaid onto clouds.yaml
  • Useful if you want to protect secrets more stringently โ€” very valid, very demure

๐Ÿ™ˆ Example secure.yaml ๐Ÿ™ˆ

  • No, my password isn't literally XXXXXXXX ๐Ÿ˜ญ
  • Cloud name should match the one in clouds.yaml
  • Optional โ€” bestie, I actually keep mine in my clouds.yaml ๐Ÿ’€
clouds:
  my-citycloud:
    auth:
      password: XXXXXXXX

โž• more clouds.yaml โž•

More information can be provided. It's not just the basics ๐Ÿ‘‘

  my-vexxhost:
    identity_api_version: 3
    image_endpoint_override: https://image-ca-ymq-1.vexxhost.net/v2
    profile: vexxhost
    auth:
      user_domain_id: default
      project_domain_id: default
      project_name: d8af8a8f-a573-48e6-898a-af333b970a2d
      username: 0b8c435b-cc4d-4e05-8a47-a2ada0539af1

๐ŸŒˆ Much more complex clouds.yaml example ๐ŸŒˆ

  • Not using a profile โ€” all settings included, doing it manually ๐Ÿ’…
  • In the ams01 region there are two networks with undiscoverable qualities
  • Each one is labeled here so choices can be made
  • Any of the settings can be region-specific if needed
  • Region settings override cloud settings
  • This cloud does not support floating-ips
my-internap:
  auth:
    auth_url: https://identity.api.cloud.inap.com
    username: api-55f9a00fb2619
    project_name: inap-17037
  identity_api_version: 3
  floating_ip_source: None
  regions:
  - name: ams01
    values:
      networks:
      - name: inap-17037-WAN1654
        routes_externally: true
        default_interface: true
      - name: inap-17037-LAN3631
        routes_externally: false

๐Ÿ” Complete Example Again ๐Ÿ”

from openstack import cloud as openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

for cloud_name, region_name in [
        ('my-vexxhost', 'ca-ymq-1'),
        ('my-citycloud', 'Buf1'),
        ('my-internap', 'ams01')]:
    # Initialize cloud
    cloud = openstack.connect(cloud=cloud_name, region_name=region_name)

    # Upload an image to the cloud
    image = cloud.create_image(
        'devuan-jessie', filename='devuan-jessie.qcow2', wait=True)

    # Find a flavor with at least 512M of RAM
    flavor = cloud.get_flavor_by_ram(512)

    # Boot a server, wait for it to boot, and then do whatever is needed
    # to get a public ip for it.
    cloud.create_server(
        'my-server', image=image, flavor=flavor, wait=True, auto_ip=True)

๐Ÿชœ Step By Step ๐Ÿชœ

๐Ÿ“ฆ Import the library ๐Ÿ“ฆ

from openstack import cloud as openstack

๐Ÿชต Logging ๐Ÿชต

  • openstacksdk uses standard python logging
  • openstack.enable_logging does the easy defaults for you
  • It squelches some meaningless warnings โ€” thank you honestly ๐Ÿ™
    • debug
      • Logs openstacksdk loggers at debug level
    • http_debug implies debug, and turns on HTTP tracing
# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

๐Ÿ› Example with Debug Logging ๐Ÿ›

  • examples/cloud/debug-logging.py
from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='my-vexxhost', region_name='ca-ymq-1')
cloud.get_image('Ubuntu 16.04.1 LTS [2017-03-03]')

๐Ÿ•ต๏ธ Example with HTTP Debug Logging ๐Ÿ•ต๏ธ

  • examples/cloud/http-debug-logging.py
from openstack import cloud as openstack
openstack.enable_logging(http_debug=True)

cloud = openstack.connect(
    cloud='my-vexxhost', region_name='ca-ymq-1')
cloud.get_image('Ubuntu 16.04.1 LTS [2017-03-03]')

๐Ÿ—บ๏ธ Cloud Regions ๐Ÿ—บ๏ธ

  • The cloud constructor needs cloud and region_name
  • openstack.connect is a helper factory function โœจ
for cloud_name, region_name in [
    ('my-vexxhost', 'ca-ymq-1'),
    ('my-citycloud', 'Buf1'),
    ('my-internap', 'ams01')
]:
    # Initialize cloud
    cloud = openstack.connect(cloud=cloud_name, region_name=region_name)

๐Ÿ“ค Upload an Image ๐Ÿ“ค

  • Picks the correct upload mechanism for you, no thinking required
  • SUGGESTION Always upload your own base images ๐Ÿ‘€
# Upload an image to the cloud
image = cloud.create_image(
    'devuan-jessie',
    filename='devuan-jessie.qcow2',
    wait=True,
)

๐Ÿ’พ Always Upload an Image ๐Ÿ’พ

Ok. You don't have to. But, for multi-cloud...

  • Images with the same content are named differently on different clouds
  • Images with the same name on different clouds can have different content
  • Upload your own to all clouds and both problems just vanish โœจ
  • Download from the OS vendor, or build with diskimage-builder

๐Ÿฆ Find a flavor ๐Ÿฆ

  • Flavors are all named differently on clouds (of course they are ๐Ÿ˜ญ)
  • Flavors can be found via RAM
  • get_flavor_by_ram finds the smallest matching flavor
# Find a flavor with at least 512M of RAM
flavor = cloud.get_flavor_by_ram(512)

๐Ÿš€ Create a server ๐Ÿš€

  • my-vexxhost
    • Boot server
    • Wait for status==ACTIVE
  • my-internap
    • Boot server on network inap-17037-WAN1654
    • Wait for status==ACTIVE
  • my-citycloud
    • Boot server
    • Wait for status==ACTIVE
    • Find the port for the fixed_ip for the server
    • Create a floating-ip on that port
    • Wait for the floating-ip to attach
# Boot a server, wait for it to boot, and then do whatever is needed
# to get a public ip for it.
cloud.create_server(
    'my-server', image=image, flavor=flavor, wait=True, auto_ip=True)

Wow. We didn't even deploy Wordpress! ๐Ÿ˜ญ๐Ÿ’€


๐Ÿท๏ธ Image and Flavor by Name or ID ๐Ÿท๏ธ

  • Pass a string to image/flavor
  • The Image/Flavor will be found by name or ID
  • Common pattern
  • examples/cloud/create-server-name-or-id.py
from openstack import cloud as openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

for cloud_name, region_name, image, flavor in [
        ('my-vexxhost', 'ca-ymq-1',
         'Ubuntu 16.04.1 LTS [2017-03-03]', 'v1-standard-4'),
        ('my-citycloud', 'Buf1',
         'Ubuntu 16.04 Xenial Xerus', '4C-4GB-100GB'),
        ('my-internap', 'ams01',
         'Ubuntu 16.04 LTS (Xenial Xerus)', 'A1.4')]:
    # Initialize cloud
    cloud = openstack.connect(cloud=cloud_name, region_name=region_name)

    # Boot a server, wait for it to boot, and then do whatever is needed
    # to get a public ip for it.
    server = cloud.create_server(
        'my-server', image=image, flavor=flavor, wait=True, auto_ip=True)
    print(server.name)
    print(server['name'])
    cloud.pprint(server)
    # Delete it - this is a demo
    cloud.delete_server(server, wait=True, delete_ips=True)

๐Ÿงน Delete Servers ๐Ÿงน

  • delete_ips โ€” delete any floating_ips the server may have
cloud.delete_server('my-server', wait=True, delete_ips=True)

๐Ÿ“š Image and Flavor by Dict ๐Ÿ“š

  • Pass a dict to image/flavor
  • If you know whether the value is a Name or an ID ๐Ÿ‘€
  • Common pattern
  • examples/cloud/create-server-dict.py
from openstack import cloud as openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)
for cloud_name, region_name, image, flavor_id in [
        ('my-vexxhost', 'ca-ymq-1', 'Ubuntu 16.04.1 LTS [2017-03-03]',
         '5cf64088-893b-46b5-9bb1-ee020277635d'),
        ('my-citycloud', 'Buf1', 'Ubuntu 16.04 Xenial Xerus',
         '0dab10b5-42a2-438e-be7b-505741a7ffcc'),
        ('my-internap', 'ams01', 'Ubuntu 16.04 LTS (Xenial Xerus)',
         'A1.4')]:
    # Initialize cloud
    cloud = openstack.connect(cloud=cloud_name, region_name=region_name)

    # Boot a server, wait for it to boot, and then do whatever is needed
    # to get a public ip for it.
    server = cloud.create_server(
        'my-server', image=image, flavor=dict(id=flavor_id),
        wait=True, auto_ip=True)
    # Delete it - this is a demo
    cloud.delete_server(server, wait=True, delete_ips=True)

๐ŸŒธ Munch Objects ๐ŸŒธ

ok so this is one of my favorite little things, bestie ๐Ÿ’–

  • They behave like a dict and like an object โ€” both at once, no cap
  • peep the example at examples/cloud/munch-dict-object.py
from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='zetta', region_name='no-osl1')
image = cloud.get_image('Ubuntu 14.04 (AMD64) [Local Storage]')
print(image.name)
print(image['name'])

like?? image.name and image['name'] are the same thing?? iconic behaviour honestly โœจ

๐Ÿฆ‹ API Organized by Logical Resource ๐Ÿฆ‹

the naming here is so clean, it's giving main character energy:

  • list_servers
  • search_servers
  • get_server
  • create_server
  • delete_server
  • update_server

and for everything else, it's still {verb}_{noun} โ€” the pattern never misses ๐Ÿ’…

  • attach_volume
  • wait_for_server
  • add_auto_ip

๐ŸŽ€ Cleanup Script ๐ŸŽ€

ngl, sometimes my examples had bugs ๐Ÿ˜ญ so here's the cleanup situation:

  • it lives at examples/cloud/cleanup-servers.py
from openstack import cloud as openstack

# Initialize and turn on debug logging
openstack.enable_logging(debug=True)

for cloud_name, region_name in [
        ('my-vexxhost', 'ca-ymq-1'),
        ('my-citycloud', 'Buf1'),
        ('my-internap', 'ams01')]:
    # Initialize cloud
    cloud = openstack.connect(cloud=cloud_name, region_name=region_name)
    for server in cloud.search_servers('my-server'):
        cloud.delete_server(server, wait=True, delete_ips=True)

๐Ÿ‘‘ Normalization ๐Ÿ‘‘

  • examples/cloud/normalization.py
from openstack import cloud as openstack
openstack.enable_logging()

cloud = openstack.connect(cloud='fuga', region_name='cystack')
image = cloud.get_image(
    'Ubuntu 16.04 LTS - Xenial Xerus - 64-bit - Fuga Cloud Based Image')
cloud.pprint(image)

โญ Strict Normalized Results โญ

  • it returns only the declared model โ€” nothing extra, no crumbs, periodt
  • examples/cloud/strict-mode.py
from openstack import cloud as openstack
openstack.enable_logging()

cloud = openstack.connect(
    cloud='fuga', region_name='cystack', strict=True)
image = cloud.get_image(
    'Ubuntu 16.04 LTS - Xenial Xerus - 64-bit - Fuga Cloud Based Image')
cloud.pprint(image)

๐Ÿงš How Did I Find the Image Name for the Last Example? ๐Ÿงš

  • honestly? I often make stupid little utility scripts ๐Ÿ’€ and they ate
  • examples/cloud/find-an-image.py
from openstack import cloud as openstack
openstack.enable_logging()

cloud = openstack.connect(cloud='fuga', region_name='cystack')
cloud.pprint([
    image for image in cloud.list_images()
    if 'ubuntu' in image.name.lower()])

๐Ÿ”ฅ Added / Modified Information ๐Ÿ”ฅ

  • Servers need more extra help โ€” they're high maintenance like that
  • Fetch addresses dict from neutron
  • Figure out which IPs are good
  • detailed โ€” defaults to True, add everything
  • bare โ€” no extra calls โ€” don't even fix broken things
  • bare is still normalized
  • examples/cloud/server-information.py
from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='my-citycloud', region_name='Buf1')
try:
    server = cloud.create_server(
        'my-server', image='Ubuntu 16.04 Xenial Xerus',
        flavor=dict(id='0dab10b5-42a2-438e-be7b-505741a7ffcc'),
        wait=True, auto_ip=True)

    print("\n\nFull Server\n\n")
    cloud.pprint(server)

    print("\n\nTurn Detailed Off\n\n")
    cloud.pprint(cloud.get_server('my-server', detailed=False))

    print("\n\nBare Server\n\n")
    cloud.pprint(cloud.get_server('my-server', bare=True))

finally:
    # Delete it - this is a demo
    cloud.delete_server(server, wait=True, delete_ips=True)

๐Ÿ’œ Exceptions ๐Ÿ’œ

ok pay attention bestie, this part is important:

  • All openstacksdk exceptions are subclasses of OpenStackCloudException
  • Direct REST calls throw OpenStackCloudHTTPError
  • OpenStackCloudHTTPError subclasses OpenStackCloudException and requests.exceptions.HTTPError
  • OpenStackCloudURINotFound for 404
  • OpenStackCloudBadRequest for 400

๐ŸŒˆ User Agent Info ๐ŸŒˆ

  • Set app_name and app_version for User Agents
  • (ssh ... region_name is optional if the cloud has one region)
  • examples/cloud/user-agent.py
from openstack import cloud as openstack
openstack.enable_logging(http_debug=True)

cloud = openstack.connect(
    cloud='datacentred',
    app_name='AmazingApp',
    app_version='1.0',
)
cloud.list_networks()

๐Ÿ“ Uploading Large Objects ๐Ÿ“

  • swift has a maximum object size โ€” rude, but okay
  • Large Objects are uploaded specially
  • openstacksdk figures this out and does it for you ๐Ÿซถ
  • multi-threaded, we love efficiency
  • examples/cloud/upload-object.py
from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='ovh', region_name='SBG1')
cloud.create_object(
    container='my-container',
    name='my-object',
    filename='/home/mordred/briarcliff.sh3d',
)
cloud.delete_object('my-container', 'my-object')
cloud.delete_container('my-container')

๐ŸŽ€ Uploading Large Objects ๐ŸŽ€

(yes, same title again โ€” it's a sequel, and sequels slay)

  • Default max_file_size is 5G
  • This is a conference demo, be normal about it
  • Let's force a segment_size
  • One MILLION bytes ๐Ÿ’€
  • examples/cloud/upload-object.py
from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='ovh', region_name='SBG1')
cloud.create_object(
    container='my-container',
    name='my-object',
    filename='/home/mordred/briarcliff.sh3d',
    segment_size=1000000,
)
cloud.delete_object('my-container', 'my-object')
cloud.delete_container('my-container')

๐Ÿ’… Service Conditionals ๐Ÿ’…

from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='kiss', region_name='region1')
print(cloud.has_service('network'))
print(cloud.has_service('container-orchestration'))

๐ŸŒธ Service Conditional Overrides ๐ŸŒธ

  • Sometimes clouds are weird and figuring that out won't work โ€” respectfully, some clouds just have main character energy of their own ๐Ÿ˜ญ
from openstack import cloud as openstack
openstack.enable_logging(debug=True)

cloud = openstack.connect(cloud='rax', region_name='DFW')
print(cloud.has_service('network'))

clouds:
  rax:
    profile: rackspace
    auth:
      username: mordred
      project_id: 245018
    # This is already in profile: rackspace
    has_network: false

โœจ FIN โœจ


๐Ÿ’– FOR CONTRIBUTORS ๐Ÿ’–

๐Ÿซถ Contributing to the OpenStack SDK ๐Ÿซถ

okay so this whole section is for the girlies who wanna contribute to the development of this SDK ๐Ÿ’… This section of documentation pertains to those who wish to contribute to the development of this SDK. If you're looking for documentation on how to use the SDK to build applications, refer to the ../user section instead โ€” that's the vibe you want, bestie.

๐Ÿฆ‹ About the Project ๐Ÿฆ‹

The OpenStack SDK is a OpenStack project aimed at providing a complete software development kit for the programs which make up the OpenStack community. It is a Python library with corresponding documentation, examples, and tools released under the Apache 2 license. iconic, honestly ๐Ÿ‘‘

๐ŸŽ€ A Brief History ๐ŸŽ€

okay storytime, because this is genuinely so interesting โ€” openstacksdk started its life as three different libraries: shade, os-client-config and python-openstacksdk. three separate girlies who eventually realized they were the same girlie ๐Ÿ˜ญ

shade โ€” shade started its life as some code inside of OpenStack Infra's nodepool project (https://docs.openstack.org/infra/nodepool/), and as some code inside of the Ansible OpenStack Modules (http://docs.ansible.com/ansible/latest/list_of_cloud_modules.html#openstack). Ansible had a bunch of different OpenStack related modules, and there was a ton of duplicated code. Eventually, between refactoring that duplication into an internal library, and adding the logic and features that the OpenStack Infra team had developed to run client applications at scale, it turned out that we'd written nine-tenths of what we'd need to have a standalone library. like, oops? accidental whole library ๐Ÿ’€

Because of its background from nodepool, shade contained abstractions to work around deployment differences and is resource oriented rather than service oriented. This allows a user to think about Security Groups without having to know whether Security Groups are provided by Nova or Neutron on a given cloud. On the other hand, as an interface that provides an abstraction, it deviates from the published OpenStack REST API and adds its own opinions, which may not get in the way of more advanced users with specific needs. so: convenient, but opinionated. know that going in ๐Ÿซถ

os-client-config โ€” os-client-config was a library for collecting client configuration for using an OpenStack cloud in a consistent and comprehensive manner, which introduced the clouds.yaml file for expressing named cloud configurations. yes THAT clouds.yaml. she invented it. mother behavior.

python-openstacksdk โ€” python-openstacksdk was a library that exposed the OpenStack APIs to developers in a consistent and predictable manner.

After a while it became clear that there was value in both the high-level layer that contains additional business logic and the lower-level SDK that exposes services and their resources faithfully and consistently as Python objects. Even with both of those layers, it is still beneficial at times to be able to make direct REST calls and to do so with the same properly configured Session (http://docs.python-requests.org/en/master/user/advanced/#session-objects) from python-requests (http://docs.python-requests.org/en/master/). This led to the merge of the three projects. three become one. the avengers of Python OpenStack libraries, fr fr ๐ŸŒˆ

The original contents of the shade library have been moved into openstack.cloud and os-client-config has been moved in to openstack.config. so if you're looking for the old stuff, that's where she lives now ๐Ÿ’–

โญ Contribution Mechanics โญ

๐Ÿงš Contributing to openstacksdk ๐Ÿงš

If you're interested in contributing to the openstacksdk project, the following will help get you started. come through, we'd love to have you ๐Ÿซถโœจ

๐ŸŽ€ Developer Certificate of Origin

okay bestie, real talk: if you wanna contribute to openstacksdk, you have to adhere to the Developer Certificate of Origin (https://developercertificate.org/) โ€” no cap. OpenStack uses the DCO as a lightweight way to confirm you're actually entitled to contribute the code you're submitting. This makes sure you're giving your contributions under the project's license and that you have the right to do it. ๐Ÿ’–

Please read DeveloperWorkflow (https://docs.openstack.org/infra/manual/developers.html#development-workflow) before sending your first patch for review. And heads up: pull requests submitted through GitHub will be ignored. ๐Ÿ’€

See also:


๐Ÿฆ‹ Project Hosting Details


๐Ÿ’ฌ Contacting the Developers

๐ŸŒˆ IRC

The developers of this project are available in the #openstack-sdks channel on OFTC IRC (http://webchat.oftc.net?channels=%23openstack-sdks). This channel includes conversation on SDKs and tools within the general OpenStack community, including OpenStackClient as well as occasional talk about SDKs created for languages outside of Python. ๐Ÿซถ

๐Ÿ“ง Email

The openstack-discuss mailing list (mailto:openstack-discuss@lists.openstack.org?subject=[sdk]%20Question%20about%20openstacksdk) fields questions of all types on OpenStack. Using the [sdk] filter to begin your email subject will ensure that the message gets to SDK developers. โœจ


โœจ Coding Standards

We are a bit stricter than usual in the coding standards department. It's a good idea to read through the coding <> section. ๐Ÿ‘‘


๐Ÿ‘‘ OpenStack SDK Developer Coding Standards

In the beginning, there were no guidelines. And it was good. But that didn't last long. As more and more people added more and more code, we realized that we needed a set of coding standards to make sure that the openstacksdk API at least attempted to display some form of consistency.

Thus, these coding standards/guidelines were developed. Note that not all of openstacksdk adheres to these standards just yet. Some older code has not been updated because we need to maintain backward compatibility. Some of it just hasn't been changed yet. But be clear: all new code must adhere to these guidelines. ๐Ÿ’…

Below are the patterns that we expect openstacksdk developers to follow.

๐Ÿ“ Release Notes

openstacksdk uses reno (https://docs.openstack.org/reno/latest/) for managing its release notes. A new release note should be added to your contribution anytime you add new API calls, fix significant bugs, add new functionality or parameters to existing API calls, or make any other significant changes to the code base that we should draw attention to for the user base.

It is not necessary to add release notes for minor fixes, such as correction of documentation typos, minor code cleanup or reorganization, or any other change that a user would not notice through normal usage. ๐Ÿงš

๐Ÿ’€ Exceptions

Exceptions should NEVER be wrapped and re-raised inside of a new exception. This removes important debug information from the user. All of the exceptions should be raised correctly the first time.

โ˜๏ธ openstack.cloud API Methods

The openstack.cloud layer has some specific rules:

  • When an API call acts on a resource that has both a unique ID and a name, that API call should accept either identifier with a name_or_id parameter.
  • All resources should adhere to the get/list/search interface that control retrieval of those resources. E.g., get_image(), list_images(), search_images().
  • Resources should have create_RESOURCE(), delete_RESOURCE(), update_RESOURCE() API methods (as it makes sense).
  • For those methods that should behave differently for omitted or None-valued parameters, use the _utils.valid_kwargs decorator. This includes all Neutron update_* functions.
  • Deleting a resource should return True if the delete succeeded, or False if the resource was not found. ๐Ÿซถ

๐ŸŒธ Returned Resources

The openstack.cloud layer should rely on the proxy layer for the given service. This will ensure complex objects returned to the caller are of openstack.resource.Resource type.

๐ŸŒˆ Nova vs. Neutron

  • Recognize that not all cloud providers support Neutron, so never assume it will be present. If a task can be handled by either Neutron or Nova, code it to be handled by either.
  • For methods that accept either a Nova pool or Neutron network, the parameter should just refer to the network, but documentation of it should explain about the pool. See: create_floating_ip() and available_floating_ip() methods.

๐Ÿงš Tests

  • New API methods must have unit tests!
  • New unit tests should only mock at the REST layer using requests_mock. Any mocking of openstacksdk itself should be considered legacy and to be avoided. Exceptions to this rule can be made when attempting to test the internals of a logical shim where the inputs and output of the method aren't actually impacted by remote content.
  • Functional tests should be added, when possible.
  • In functional tests, always use unique names (for resources that have this attribute) and use it for clean up (see next point).
  • In functional tests, always define cleanup functions to delete data added by your test, should something go wrong. Data removal should be wrapped in a try except block and try to delete as many entries added by the test as possible. ๐Ÿ’œ

๐Ÿ› ๏ธ Development Environment

The first step towards contributing code and documentation is to setup your development environment. We use a pretty standard setup, but it is fully documented in our setup <> section.

๐ŸŽ€ Creating a Development Environment

๐Ÿงฐ Required Tools

Python โ€” As the OpenStack SDK is developed in Python, you will need at least one version of Python installed. Our continuous integration system runs against several versions, so ultimately we will have the proper test coverage, but having multiple versions locally results in less time spent in code review when changes unexpectedly break other versions.

Python can be downloaded from https://www.python.org/downloads. ๐Ÿ

virtualenv โ€” In order to isolate our development environment from the system-based Python installation, we use virtualenv (https://virtualenv.pypa.io/en/latest/). This allows us to install all of our necessary dependencies without interfering with anything else, and preventing others from interfering with us. Virtualenv must be installed on your system in order to use it, and it can be had from PyPI, via pip, as follows. Note that you may need to run this as an administrator in some situations.:

$ apt-get install python3-virtualenv  # Debian based platforms
$ dnf install python3-virtualenv      # Red Hat based platforms
$ pip install virtualenv              # Mac OS X and other platforms

You can create a virtualenv in any location. A common usage is to store all of your virtualenvs in the same place, such as under your home directory. To create a virtualenv for the default Python, run the following:

$ virtualenv $HOME/envs/sdk

To create an environment for a different version, run the following:

$ virtualenv -p python3 $HOME/envs/sdk3

When you want to enable your environment so that you can develop inside of it, you activate it. To activate an environment, run the /bin/activate script inside of it, like the following:

$ source $HOME/envs/sdk3/bin/activate
(sdk3)$

Once you are activated, you will see the environment name in front of your command prompt. In order to exit that environment, run the deactivate command. โœจ

tox โ€” We use tox (https://tox.readthedocs.org/en/latest/) as our test runner, which allows us to run the same test commands against multiple versions of Python. Inside any of the virtualenvs you use for working on the SDK, run the following to install tox into it.:

(sdk3)$ pip install tox

Git โ€” The source of the OpenStack SDK is stored in Git. In order to work with our source repository, you must have Git installed on your system. If your system has a package manager, it can likely be had from there. If not, you can find downloads or the source at http://git-scm.com. ๐ŸŒธ

๐Ÿฆ‹ Getting the Source Code

Note: Before checking out the code, please read the OpenDev Developer's Guide (https://docs.opendev.org/opendev/infra-manual/latest/developers.html) for details on how to use the continuous integration and code review systems that we use.

The canonical Git repository is hosted on opendev.org at http://opendev.org/openstack/openstacksdk/:

(sdk3)$ git clone https://opendev.org/openstack/openstacksdk
(sdk3)$ cd openstacksdk

๐Ÿ“ Installing Dependencies

In order to work with the SDK locally, such as in the interactive interpreter or to run example scripts, you need to install the project's dependencies.:

(sdk3)$ pip install -r requirements.txt

After the downloads and installs are complete, you'll have a fully functional environment to use the SDK in. ๐Ÿ’–

๐ŸŽ€ Building the Documentation

Our documentation is written in reStructured Text and is built using Sphinx. A docs command is available in our tox.ini, allowing you to build the documentation like you'd run tests. The docs command is not evaluated by default.:

(sdk3)$ tox -e docs

That command will cause the documentation, which lives in the docs folder, to be built. HTML output is the most commonly referenced, which is located in docs/build/html. ๐Ÿฆ‹

๐Ÿ’œ Testing

The project contains two test packages, one for unit tests and one for functional tests. The openstack.tests.unit package tests the SDK's features in isolation. The openstack.tests.functional package tests the SDK's features and examples against an OpenStack cloud.

๐Ÿ’œ Testing (the tox one)

The tests are run with tox (https://tox.readthedocs.org/en/latest/) and configured in tox.ini. The test results are tracked by stestr (https://stestr.readthedocs.io/en/latest/) and configured in .stestr.conf and via command line options passed to the stestr executable when it's called by tox. ๐Ÿ”ฅ

Unit Tests

Running tests

okay so bestie, if you wanna run the entire unit test suite, literally just run the tox command inside your source checkout. That's it. It'll attempt to run every test command listed inside tox.ini, which includes Python 3.x and a PEP 8 check. And listen โ€” you should run the full suite on all versions before submitting changes for review, because otherwise the continuous integration system will surprise you with failures and nobody wants that energy ๐Ÿ’€

$ tox
...
py3: commands succeeded
pep8: commands succeeded
congratulations :)

During development though, it's lowkey more convenient to run a subset of the tests so test time stays minimal. You can pick just one version to run on. And a step further than that: run only the tests you're actually working on ๐Ÿ‘‘

# Run run the tests on Python 3.13
$ tox -e py313
# Run only the compute unit tests on Python 3.13
$ tox -e py313 openstack.tests.unit.compute
# Run only the tests in a specific file on Python 3.13
$ tox -e py313 -- -n openstack/tests/unit/compute/test_version.py

Functional Tests

so the functional tests assume you have a public or private OpenStack cloud you can run the tests against. The tests must be able to be run against public clouds, but first and foremost they must be run against OpenStack. In practice that means the tests should initially be run against a stable branch of DevStack โ€” https://docs.openstack.org/devstack/latest/ โœจ

Configuration

To connect the functional tests to an OpenStack cloud we require a clouds.yaml file, as discussed in Configuring OpenStack SDK Applications. You can place this clouds.yaml file in the root of your source checkout or in one of the other standard locations, $HOME/.config/openstack or /etc/openstack.

There must be at least three clouds configured โ€” or rather, three accounts configured for the one cloud. Those accounts are:

  • An admin account, which defaults to devstack-admin but is configurable via the OPENSTACKSDK_OPERATOR_CLOUD environment variable,
  • A user account, which defaults to devstack but is configurable via the OPENSTACKSDK_DEMO_CLOUD environment variable, and
  • An alternate user account, which defaults to devstack-demo but is configurable via the OPENSTACKSDK_DEMO_CLOUD_ALT environment variable

In addition, you must indicate the names of the flavor and image that should be used for tests. These can be configured via OPENSTACKSDK_FLAVOR and OPENSTACKSDK_IMAGE environment variables or functional.flavor_name and functional.image_name settings in the clouds.yaml file, respectively.

Finally, you can configure the timeout for tests using the OPENSTACKSDK_FUNC_TEST_TIMEOUT environment variable (defaults to 300 seconds). Some test modules take specific timeout values. For example, all tests in openstack.tests.functional.compute will check for the OPENSTACKSDK_FUNC_TEST_TIMEOUT_COMPUTE environment variable before checking for OPENSTACKSDK_FUNC_TEST_TIMEOUT. ๐Ÿซถ

Note: Recent versions of DevStack will configure a suitable clouds.yaml file for you, which will be placed at /etc/openstack/clouds.yaml.

This is an example of a minimal configuration for a clouds.yaml that connects the functional tests to a DevStack instance ๐Ÿ’…

clouds:
  devstack:
    auth:
      auth_url: http://xxx.xxx.xxx.xxx/identity
      password: password
      project_domain_id: default
      project_name: demo
      user_domain_id: default
      username: demo
    identity_api_version: '3'
    region_name: RegionOne
    volume_api_version: '3'
  devstack-admin:
    auth:
      auth_url: http://xxx.xxx.xxx.xxx/identity
      password: password
      project_domain_id: default
      project_name: admin
      user_domain_id: default
      username: admin
    region_name: RegionOne
  devstack-alt:
    auth:
      auth_url: http://xxx.xxx.xxx.xxx/identity
      password: password
      project_domain_id: default
      project_name: alt_demo
      user_domain_id: default
      username: alt_demo
    region_name: RegionOne
example:
  image_name: cirros-0.5.2-x86_64-disk
  flavor_name: m1.small

Replace xxx.xxx.xxx.xxx with the IP address or FQDN of your DevStack instance. no cap, that part matters ๐ŸŒธ

Running tests

functional tests are also run against multiple Python versions. In order to run the entire functional test suite against the default Python 3 version in your environment, run the tox -e functional command inside of your source checkout. This will attempt to run every test in the openstack/tests/functional directory. For example:

$ tox -e functional
...
functional: commands succeeded
congratulations :)

Project Layout

The project contains a top-level openstack package, which houses several modules that form the foundation upon which each service's API is built on. Under the openstack package are packages for each of those services, such as openstack.compute. ๐Ÿฆ‹

How the SDK is organized

The following diagram shows how the project is laid out.

openstack/
    connection.py
    resource.py
    compute/
        compute_service.py
        v2/
            server.py
            _proxy.py
    tests/
        compute/
            v2/
                test_server.py

Resource

The openstack.resource.Resource base class is the building block of any service implementation. Resource objects correspond to the resources each service's REST API works with, so the openstack.compute.v2.server.Server subclass maps to the compute service's https://openstack:1234/v2/servers resource. it's giving mapping ๐Ÿ’–

The base Resource contains methods to support the typical CRUD operations supported by REST APIs, and handles the construction of URLs and calling the appropriate HTTP verb on the given Adapter.

Values sent to or returned from the service are implemented as attributes on the Resource subclass using component objects such as resource.Body, resource.Header and resource.URI, depending on where in the request or response the value lives. Each component is created with the exact name of what the API expects, and can optionally include a type to be validated against on requests. You should choose an attribute name that follows PEP-8, regardless of what the server-side expects, as the component becomes a mapping between the two. โœจ

is_public = resource.Body('os-flavor-access:is_public', type=bool)

There are six additional attributes which the Resource class checks before making requests to the REST API. allow_create, allow_fetch, allow_commit, allow_delete, allow_head, and allow_list are set to True or False, and are checked before making the corresponding method call.

The base_path attribute should be set to the URL which corresponds to this resource. Many base_paths are simple, such as "/servers". For base_paths which are composed of non-static information, Python's string replacement is used, e.g., base_path = "/servers/%(server_id)s/ips".

resource_key and resources_key are attributes to set when a Resource returns more than one item in a response, or otherwise requires a key to obtain the response value. For example, the Server class sets resource_key = "server" as an individual Server is stored in a dictionary keyed with the singular noun, and resources_key = "servers" as multiple Servers are stored in a dictionary keyed with the plural noun in the response. iykyk ๐ŸŽ€

Proxy

Each service implements a Proxy class based on Proxy, within the openstack/<program_name>/vX/_proxy.py module. For example, the v2 compute service's Proxy exists in openstack/compute/v2/_proxy.py.

The Proxy class is based on Adapter.

class openstack.proxy.Proxy(session, *, service_type=None,
service_name=None, interface=None, region_name=None,
endpoint_override=None, version=None, auth=None, user_agent=None,
connect_retries=None, logger=None, allow=None, additional_headers=None,
client_name=None, client_version=None, allow_version_hack=None,
global_request_id=None, min_version=None, max_version=None,
default_microversion=None, status_code_retries=None,
retriable_status_codes=None, raise_exc=None, rate_limit=None,
concurrency=None, connect_retry_delay=None,
status_code_retry_delay=None, statsd_client=None, statsd_prefix=None,
prometheus_counter=None, prometheus_histogram=None,
influxdb_config=None, influxdb_client=None)

Bases: Adapter

Represents a service.

  • api_version โ€” The API version. This is used as a descriminating attribute for type checking.
  • retriable_status_codes = None โ€” HTTP status codes that should be retried by default. The number of retries is defined by the configuration in parameters called <service-type>_status_code_retries.

Each service's Proxy provides a higher-level interface for users to work with via a Connection instance. ๐Ÿ”ฅ

Rather than requiring users to maintain their own Adapter and work with lower-level Resource objects, the Proxy interface offers a place to make things easier for the caller.

Each Proxy class implements methods which act on the underlying Resource classes which represent the service. For example:

def list_flavors(self, **params):
    return flavor.Flavor.list(self.session, **params)

This method is operating on the openstack.compute.v2.flavor.Flavor.list method. For the time being, it simply passes on the Adapter maintained by the Proxy, and returns what the underlying Resource.list method does. slay ๐Ÿ’…

Cloud

The openstack.cloud package provides the high-level cloud abstraction layer, historically known as shade. Where the Proxy interface maps closely onto a single service's REST API, the cloud layer offers business-logic-oriented methods that often span multiple requests, or even multiple services, and that normalize the differences between clouds. ๐ŸŒˆ

The layer is implemented as a collection of mixin classes, one per service area, under openstack/cloud/ โ€” for example, _compute.py provides ComputeCloudMixin and _network.py provides NetworkCloudMixin. These mixins get smooshed together into the Connection class, so their methods are lowkey just there on a Connection instance, right next to all the service Proxy objects. Like, Connection.create_server may create a server, wait for it to become active, attach a floating IP, and hand you back a normalized result โ€” orchestrating several lower-level Proxy and Resource calls on the caller's behalf. She's doing a lot of work so you don't have to ๐Ÿ’…

Application authors are generally encouraged to use these high-level methods where they exist, and fall back to the Proxy interface for the operations the cloud layer doesn't cover.

๐Ÿซถ Connection

The openstack.connection.Connection class builds on top of an openstack.config.cloud_region.CloudRegion object, and gives you a higher-level interface constructed from Proxy objects from each of the services.

The Connection class' primary purpose is to act as a high-level interface to this SDK, managing the lower-level connection bits and exposing the Resource objects through their corresponding Proxy object.

So if you've built proper Resource objects and implemented methods on the corresponding Proxy object, congrats bestie โ€” the high-level interface to your service is now exposed. ๐ŸŽ‰


โœจ Adding Features โœจ

Does this SDK not do what you need it to do? Is it missing a service? Are you a developer on another project who wants to add their service? You're in the right place, bb. Below are examples of how to add new features to the OpenStack SDK. ๐Ÿ› ๏ธ

๐ŸŒธ Creating a New Resource

This guide walks you through how to add resources for a service.

๐ŸŽ€ Naming Conventions

Above all, names across this project conform to Python's naming standards, as laid out in PEP 8 (https://www.python.org/dev/peps/pep-0008/).

The relevant details we need to know are as follows:

  • Module names are lower case, and separated by underscores if there's more than one word. For example, openstack.object_store
  • Class names are capitalized, with no spacing, and each subsequent word is capitalized in a name. For example, ServerMetadata
  • Attributes on classes, including methods, are lower case and separated by underscores. For example, allow_list or get_data

๐Ÿฆ‹ Services

Services in the OpenStack SDK are named after their program name, not their code name. For example, the project everyone calls "Nova" is always called "compute" within this SDK. No cap.

This guide walks through creating a service for an OpenStack program called "Fake". Following our guidelines, the code for its service would live under the openstack.fake namespace. What follows is the creation of a Resource class for the "Fake" service.

๐Ÿ“ Resources

Resources are named after the server-side resource, which is set in the base_path attribute of the resource class. This guide creates a resource class for the /fake server resource, so the resource module is called fake.py and the class is called Fake.

๐Ÿ‘‘ An Example

openstack/fake/fake_service.py

# Apache 2 header omitted for brevity

from openstack import service_description
from openstack.fake.v2 import _proxy as _proxy_v2

class FakeService(service_description.ServiceDescription):
    """The fake service."""

    supported_versions = {
        '2': _proxy_v2.Proxy,
    }

openstack/fake/v2/fake.py

# Apache 2 header omitted for brevity

from openstack import resource

class Fake(resource.Resource):
    resource_key = "resource"
    resources_key = "resources"
    base_path = "/fake"

    allow_create = True
    allow_fetch = True
    allow_commit = True
    allow_delete = True
    allow_list = True
    allow_head = True

    #: The transaction date and time.
    timestamp = resource.Header("x-timestamp")
    #: The name of this resource.
    name = resource.Body("name", alternate_id=True)
    #: The value of the resource. Also available in headers.
    value = resource.Body("value", alias="x-resource-value")
    #: Is this resource cool? If so, set it to True.
    #: This is a multi-line comment about cool stuff.
    cool = resource.Body("cool", type=bool)

๐Ÿ’œ fake.Fake Attributes

Each service's resources inherit from Resource, so they can override any of the base attributes to fit the way their particular resource operates. It's giving customizable, fr fr.

๐ŸŒˆ resource_key and resources_key

These attributes are set based on how your resource responds with data. The default values for each of these are None, which works fine when your resource returns a JSON body you can use directly without a top-level key, such as {"name": "Ernie Banks", ...}".

But our Fake resource returns JSON bodies that have the details of the resource one level deeper, such as {"resources": {"name": "Ernie Banks", ...}, {...}}. It does a similar thing with single resources, putting them inside a dictionary keyed on "resource".

By setting Fake.resource_key on line 7, we tell the Resource.create, Resource.fetch, and Resource.commit methods that we're either sending or receiving a resource that's in a dictionary with that key. โœจ

By setting Fake.resources_key on line 8, we tell the Resource.list method that we're expecting to receive multiple resources inside a dictionary with that key.

โญ base_path

The base_path is the URL we're gonna use to make requests for this resource. In this case, line 9 sets base_path = "/fake", which also corresponds to the name of our class, Fake.

Most resources follow this basic formula. Some cases are more complex, where the URL for requests has to contain some extra data. The volume service has several resources that make either basic requests or detailed requests, so they use base_path = "/volumes/%s(detailed)". Before a request is made, if detailed = True, they convert it to a string so the URL becomes /volumes/detailed. If it's False, they only send /volumes/. Sneaky but iconic.

๐Ÿงš The Service

Unlike resource_key, resources_key, and base_path, the service a resource belongs to is not declared on the resource itself. Instead, each service provides a ServiceDescription subclass โ€” FakeService in fake_service.py โ€” which maps each supported API version to the proxy that exposes the service's resources.

In fake_service.py we set supported_versions so that version 2 of the service is served by openstack.fake.v2._proxy.Proxy. The proxy ties the resources together and knows how to reach the service in the catalog, so that when a request is made, the appropriate URL can be constructed. ๐ŸŽ€

๐Ÿ”ฅ Supported Operations

The base Resource disallows all types of requests by default, requiring each resource to specify which requests they support. On lines 11-16, our Fake resource specifies that it'll work with all of the operations. Full send. ๐Ÿ’€

In order to have the following methods work, you must allow the corresponding value by setting it to True:

  • create (openstack.resource.Resource.create) โ†’ set allow_create
  • delete (openstack.resource.Resource.delete) โ†’ set allow_delete
  • head (openstack.resource.Resource.head) โ†’ set allow_head
  • list (openstack.resource.Resource.list) โ†’ set allow_list
  • fetch (openstack.resource.Resource.fetch) โ†’ set allow_fetch
  • commit (openstack.resource.Resource.commit) โ†’ set allow_commit

An additional attribute to set is commit_method. It defaults to PUT, but some services use POST or PATCH to commit changes back to the remote resource. Noted. ๐Ÿซก

๐ŸŽ€ Properties

The way resource classes communicate values between the user and the server is through a set of component objects. Each one is declared as a class attribute and maps an attribute on your Resource to a value that lives in a particular part of the request or response:

  • resource.Body โ€” a value carried in the JSON request or response body.
  • resource.Header โ€” a value carried in an HTTP header.
  • resource.URI โ€” a value that is interpolated into the base_path.
  • resource.Computed โ€” a value that is computed locally rather than sent to or received from the server.

The first argument to each component is the name the value has on the server; the attribute name is how you refer to it in Python.

Line 19 declares a Header for timestamp, which will cause the Fake.timestamp attribute to contain the value returned in the x-timestamp header, such as from a Fake.head request.

Line 21 declares a Body for name, which is a value returned in a body, such as from a Fake.fetch request. Passing alternate_id=True marks this attribute as the resource's identifier, so when this resource is populated from a response, Fake.name and Fake.id are the same value. โœจ

Line 23 declares a Body with an alias. Fake.value will be set when a response body contains a value, or when a header contains x-resource-value. Two-for-one, we love to see it.

Line 26 passes type=bool, which is checked before sending the value in a request. In this case, we can only set Fake.cool to either True or False โ€” otherwise a TypeError will be raised if the value can't be converted to the expected type. ๐Ÿšจ

๐ŸŽ€ Documentation ๐ŸŽ€

Okay so for the API docs, we use Sphinx's autodoc feature to build them for every single resource we expose. Easy. The attributes you override from Resource <#openstack.resource.Resource>? Those don't need documenting. But any component attributes (Body, Header, and so on) absolutely do. ๐Ÿ’…

All you gotta do is drop a comment above the line you want to document, with a colon following the pound-sign. That's the whole trick.

Lines 18, 20, 22, and 24-25 are comments that will then show up in the API documentation. And as you can see on lines 24 & 25, these comments can span multiple lines โ€” no cap, they really can. โœจ


๐Ÿฆ‹ Creating a Proxy ๐Ÿฆ‹

This guide walks you through adding a proxy for a service. It builds on the Creating a New Resource <> guide: where a Resource <#openstack.resource.Resource> maps onto a single server-side resource, a Proxy <#openstack.proxy.Proxy> gives you the higher-level, user-facing interface for a whole service. A Proxy is what a user actually reaches through a Connection <#openstack.connection.Connection> โ€” like, conn.compute is the compute service's Proxy. iconic behaviour honestly.

๐ŸŒธ Layout ๐ŸŒธ

Each service implements a single Proxy class per API version, in a module named _proxy.py:

  • openstack/<service>/v<N>/_proxy.py โ€” the proxy, e.g. openstack/compute/v2/_proxy.py.
  • openstack/<service>/v<N>/<resource>.py โ€” one module per resource type that the proxy operates on, e.g. flavor.py, server.py.

The class is always named Proxy and subclasses openstack.proxy.Proxy <#openstack.proxy.Proxy>. It declares an api_version discriminator and imports each resource module under an underscore-prefixed alias, so we don't get namespace collisions. Obsessed with a tidy namespace fr.

from typing import ClassVar, Literal

from openstack.fake.v2 import fake as _fake
from openstack import proxy

class Proxy(proxy.Proxy):
    api_version: ClassVar[Literal['2']] = '2'

๐Ÿ’œ Base Helpers ๐Ÿ’œ

openstack.proxy.Proxy <#openstack.proxy.Proxy> subclasses keystoneauth1.adapter.Adapter โ€” so a proxy is literally an authenticated HTTP client ๐Ÿ’… โ€” and bolts on a set of generic helpers that delegate to the corresponding methods on your Resource <#openstack.resource.Resource> classes. Each one takes the resource class as its first argument:

  • _create โ€” Create a resource from keyword attributes.
  • _get โ€” Fetch a single resource by ID or instance.
  • _list โ€” Return a generator over resources, with pagination and query filtering.
  • _find โ€” Look a resource up by name or ID.
  • _update โ€” Commit changes to a resource.
  • _delete โ€” Delete a resource.
  • _head โ€” Issue a HEAD request for a resource.
  • _get_resource โ€” Normalize an ID, dict, or existing instance into a Resource instance. Used directly when a method needs an instance to call a resource action on.

Because these helpers do all the actual work, most proxy methods are just thin little wrappers that pick the right resource class and pass the caller's arguments straight through. lowkey elegant ๐Ÿซถ

โญ Methods โญ

Proxy methods follow a consistent naming and shape. A create, get, list, and delete for a Fake resource look like this:

def create_fake(self, **attrs):
    """Create a new fake from attributes

    :param attrs: Keyword arguments which will be used to create a
        :class:`~openstack.fake.v2.fake.Fake`, comprised of the properties
        on the Fake class.

    :returns: The results of fake creation.
    """
    return self._create(_fake.Fake, **attrs)

def get_fake(self, fake):
    """Get a single fake

    :param fake: The value can be the ID of a fake or a
        :class:`~openstack.fake.v2.fake.Fake` instance.

    :returns: One :class:`~openstack.fake.v2.fake.Fake`
    :raises: :class:`~openstack.exceptions.NotFoundException` when no
        resource can be found.
    """
    return self._get(_fake.Fake, fake)

def fakes(self, **query):
    """Return a generator of fakes

    :param query: Optional query parameters to be sent to limit the
        resources being returned.

    :returns: A generator of fake objects.
    """
    return self._list(_fake.Fake, **query)

def delete_fake(self, fake, ignore_missing=True):
    """Delete a fake

    :param fake: The value can be either the ID of a fake or a
        :class:`~openstack.fake.v2.fake.Fake` instance.
    :param ignore_missing: When set to ``False``
        :class:`~openstack.exceptions.NotFoundException` will be raised
        when the fake does not exist. When set to ``True``, no exception
        will be raised when attempting to delete a nonexistent fake.

    :returns: ``None``
    """
    self._delete(_fake.Fake, fake, ignore_missing=ignore_missing)

Note the conventions, bestie ๐Ÿ‘‘:

  • Methods that accept a resource take "either the ID ... or a instance", and document it that way.
  • Deletes and finds take an ignore_missing argument, defaulting to True.
  • List methods are named after the plural noun (fakes) and return a generator; the other methods are named <verb>_<resource>.
  • Docstrings use Sphinx field lists (:param:, :returns:, :raises:) and cross-reference the concrete resource class with :class:~...`` so only the short name renders.

For actions that aren't simple CRUD, use _get_resource to grab an instance and then call a method on the resource itself. periodt. ๐Ÿ”ฅ

๐ŸŒˆ Wiring the Proxy to a Connection ๐ŸŒˆ

A proxy gets exposed on the Connection <#openstack.connection.Connection> through a ServiceDescription <#openstack.service_description.ServiceDescription>, as introduced in the Creating a New Resource <> guide. The description maps each supported API version to its proxy class:

from openstack.fake.v2 import _proxy
from openstack import service_description

class FakeService(service_description.ServiceDescription):
    """The fake service."""

    supported_versions = {
        '2': _proxy.Proxy,
    }

Finally, the service has to be registered so it becomes an attribute on every Connection <#openstack.connection.Connection>. The registry lives in the generated file openstack/_services_mixin.py, where each service is declared with the connection attribute name and its service_type:

fake = fake_service.FakeService(service_type='fake')
โš ๏ธ Do not edit openstack/_services_mixin.py by hand โ€” regenerate it by running tools/print-services.py.

Once it's registered, conn.fake returns a lazily constructed instance of your Proxy. Slay. ๐Ÿ’–


๐Ÿงš Creating an Authentication Plugin ๐Ÿงš

Note: openstacksdk does not implement its own authentication plugins. It delegates entirely to keystoneauth1 <https://docs.openstack.org/keystoneauth/latest/>. If you want to add a new authentication mechanism, you implement it in keystoneauth1, not here. This guide just explains how openstacksdk consumes auth plugins, so you know what's required to make a new plugin usable from openstacksdk. iykyk.

๐Ÿ“ How openstacksdk consumes auth plugins ๐Ÿ“

Authentication is configured through the auth_type and auth keys of a cloud's configuration (see Auth Settings <#config-auth-settings>). When a Connection <#openstack.connection.Connection> gets built, openstacksdk resolves and loads the plugin named by auth_type using keystoneauth1's loading machinery. The relevant code lives in OpenStackConfig._get_auth_loader (in openstack/config/loader.py), which ultimately calls keystoneauth1.loading.get_plugin_loader(auth_type) and then instantiates the plugin with loader.load_from_options(**auth).

A few friendly aliases are handled by openstacksdk before the name is passed to keystoneauth1 โ€” for example, an empty auth_type maps to none and token_endpoint maps to admin_token โ€” but every real plugin, including the default, password, is provided by keystoneauth1. openstacksdk registers no plugins of its own and ships no keystoneauth1.plugin entry points. Not a single one. ๐Ÿ’€

๐Ÿฆ‹ Adding a new mechanism ๐Ÿฆ‹

Because the loading is entirely delegated, adding a new authentication mechanism requires no changes to openstacksdk. Instead:

  1. Implement the plugin and its loader in keystoneauth1, following the keystoneauth plugin documentation <https://docs.openstack.org/keystoneauth/latest/authentication-plugins.html>.
  2. Register it under the keystoneauth1.plugin entry-point group (this is how get_plugin_loader discovers plugins by name).
  3. Once the package providing the plugin is installed alongside openstacksdk, it can be selected from clouds.yaml simply by setting auth_type to your plugin's name, with its options under the auth key:
clouds:
  my-cloud:
    auth_type: my-plugin
    auth:
      # options declared by your plugin's loader
      ...

For the full set of authentication options and worked examples of the plugins that ship with keystoneauth1, see Auth Settings <#config-auth-settings>. go off ๐Ÿ’…โœจ

๐Ÿ’ซ GENERAL INFORMATION ๐Ÿ’ซ

okay bestie, this is like the reference zone โ€” the glossary and the release-history bits. it's giving "the appendix but make it fashion." all the actual definitions are here, i'm just making them fun to read ๐Ÿซถ


๐ŸŒธ Glossary ๐ŸŒธ

  • CLI โ€” Command-Line Interface; a textual user interface. yes, the thing you're literally looking at right now, bestie. meta ๐Ÿ’…
  • compute โ€” OpenStack Compute (Nova). that's the service's actual name in the docs, don't @ me.
  • container โ€” one of the object-store resources; a container holds objects being stored. it's the folder energy of the object store, lowkey.
  • endpoint โ€” a base URL used in a REST request. and there are two flavours, so pay attention: an authentication endpoint is specifically the URL given to a user to identify a cloud. a service endpoint is generally obtained from the service catalog. two different vibes, same word ๐Ÿ˜ญ
  • host โ€” a physical computer. contrast with node and server. that's the whole definition, no cap.
  • identity โ€” OpenStack Identity (Keystone). iconic. runs the whole "who are you" situation.
  • image โ€” OpenStack Image (Glance). also the attribute name of the disk files stored for use by servers. double duty, main character energy โญ
  • keypair โ€” the attribute name of the SSH public key used in the OpenStack Compute API for server authentication. your lil key, absolutely slaying your auth for you ๐Ÿ”‘
  • node โ€” a logical system, may refer to a server (virtual machine) or a host.

and like, generally it's used to describe an OS instance where a specific process is running, e.g. a network node is where the network processes run, and may be directly on a host or in a server. contrast with host and server. three words, all slightly different, all out to get you ๐Ÿ™ˆ

  • object โ€” a generic term which normally refers to the a Python object. (yes, "the a" โ€” that's exactly how the page says it, i'm not touching it, it's canon now ๐Ÿ’€) the OpenStack Object Store service (Swift) also uses object as the name of the item being stored within a container. so: python object = code thing, swift object = your actual file. context is everything.
  • object-store โ€” OpenStack Object Store (Swift). storage but make it cloudy โ˜๏ธ
  • project โ€” the name of the owner of resources in an OpenStack cloud. a project can map to a customer, account or organization in different OpenStack deployments. and bestie, it's used instead of the deprecated tenant. we don't say tenant anymore, we moved on ๐Ÿ’…
  • region โ€” the attribute name of a partitioning of cloud resources. geographic-ish, vibes-wise.
  • resource โ€” a Python object representing an OpenStack resource inside the SDK code. also used to describe the items managed by OpenStack. again: two meanings, one word. stay vigilant โœจ
  • role โ€” a personality that a user assumes when performing a specific set of operations. a role includes a set of rights and privileges that a user assuming that role inherits. the OpenStack Identity service includes the set of roles that a user can assume in the token that is issued to that user.

and here's the important bit, so listen up: the individual services determine how the roles are interpreted and access granted to operations or resources. the OpenStack Identity service treats a role as an arbitrary name assigned by the cloud administrator. so like, identity doesn't police what a role means โ€” it's just a name. your actual permissions depend on the service. periodt ๐Ÿ‘‘

  • server โ€” a virtual machine or a bare-metal host managed by the OpenStack Compute service. contrast with host and node. (third time's the charm, the trio is complete ๐ŸŽ€)
  • service โ€” in OpenStack this refers to a service/endpoint in the ServiceCatalog. it could also be a collection of endpoints for different regions. a service has a type and a name. two attributes, no notes.
  • service catalog โ€” the list of services configured at a given authentication endpoint available to the authenticated user. it's like the menu of what your cloud will let you order off of ๐Ÿ“
  • tenant โ€” deprecated in favor of project. that's it. that's the definition. she's retired, respect her legacy ๐Ÿ•Š๏ธ
  • token โ€” an arbitrary bit of text that is used to access resources. some tokens are scoped to determine what resources are accessible with it. a token may be revoked at any time and is valid for a finite duration. โš ๏ธ so don't get attached โ€” it can vanish whenever and it has an expiry date, fr fr.
  • volume โ€” OpenStack Volume (Cinder). also the attribute name of the virtual disks managed by the OpenStack Volume service. your disks, but cloud-flavoured ๐Ÿ’พ

๐ŸŒˆ Release Notes ๐ŸŒˆ

release notes for openstacksdk can be found at https://releases.openstack.org/teams/openstacksdk.html โ€” go read them, they're right there, i'm just the messenger ๐Ÿ’–


๐Ÿฆ‹ Author ๐Ÿฆ‹

Author name not set. yeah. the page literally says that. mysterious icon behaviour, honestly โ€” anonymous but make it legendary ๐Ÿ™ˆ


2017, Various members of the OpenStack Foundation โ€” that's the whole credit line, keep it accurate bestie ๐Ÿซถ


aaaand that's the whole page, we made it to the end together!! ๐Ÿฅณ this little beauty is openstacksdk version 4.22.0, and the footer date says Jan 02, 1980 โ€” yes, 1980, which is older than the concept of the cloud itself, but honestly? slay, we stan a retro timestamp ๐Ÿ’€โœจ go forth and cloud responsibly, mwah ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from