### Install SDK dependencies Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/contributor/setup.md Installs all necessary Python dependencies for the OpenStack SDK by reading from the requirements.txt file. This step is crucial for running the SDK locally and executing example scripts. ```bash (sdk3)$ pip install -r requirements.txt ``` -------------------------------- ### Install Prerequisites for User-Space Pip Installation (Ubuntu/Debian) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs necessary development tools and libraries for pip installation on Ubuntu or Debian systems. This includes a C compiler, Python 3 with developer headers, and pip itself. ```bash $ sudo apt update $ sudo apt install gcc python3 python3-dev python3-pip libssl-dev ``` -------------------------------- ### Install Prerequisites for Virtual Environment Pip Installation (CentOS) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs required packages for Python virtual environment setup on CentOS. This includes a C compiler, Python 3 development files, openssl-devel, and the wheel package. ```bash $ sudo yum update $ sudo yum install gcc python3 python3-devel openssl-devel wheel ``` -------------------------------- ### Install Prerequisites for User-Space Pip Installation (Fedora) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs essential packages for pip installation on Fedora systems. This includes a C compiler, Python 3 with developer libraries, pip, and openssl-devel. ```bash $ sudo dnf upgrade $ sudo dnf install gcc python3 python3-devel python3-pip openssl-devel ``` -------------------------------- ### Install otcextensions and python-openstackclient (User-Space) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs the 'otcextensions' and 'python-openstackclient' Python packages globally for the current user using pip. This method avoids the need for root privileges for the installation itself. ```bash $ pip3 install otcextensions python-openstackclient --user ``` -------------------------------- ### Install Prerequisites for Virtual Environment Pip Installation (Ubuntu/Debian) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs necessary packages for creating and managing Python virtual environments on Ubuntu or Debian. This includes a C compiler, Python 3 development files, pip, venv module, and libssl-dev. ```bash $ sudo apt update $ sudo apt install gcc python3 python3-dev python3-pip python3-venv libssl-dev ``` -------------------------------- ### Install Prerequisites for User-Space Pip Installation (CentOS) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs required packages for pip installation on CentOS, including a C compiler, Python 3 development files, and the EPEL repository for additional packages. It also installs openssl-devel and wheel. ```bash $ sudo yum update $ sudo yum install epel-release $ sudo yum install gcc python3 python3-devel openssl-devel wheel ``` -------------------------------- ### Install Prerequisites for Virtual Environment Pip Installation (Fedora) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs essential packages for Python virtual environment management on Fedora. This includes a C compiler, Python 3 development files, pip, python3-virtualenv, and openssl-devel. ```bash $ sudo dnf upgrade $ sudo dnf install gcc python3 python3-devel python3-pip \ python3-virtualenv openssl-devel ``` -------------------------------- ### Create and activate Python virtual environments Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/contributor/setup.md Demonstrates how to create isolated Python virtual environments using virtualenv for different Python versions and how to activate them for development. Activation is necessary to use the environment's installed packages. ```bash $ virtualenv $HOME/envs/sdk $ virtualenv -p python3.5 $HOME/envs/sdk3 $ source $HOME/envs/sdk3/bin/activate (sdk3)$ ``` -------------------------------- ### Install otcextensions and python-openstackclient within Virtual Environment Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/pip_install.md Installs the 'otcextensions' and 'python-openstackclient' Python packages into the currently active virtual environment using pip. This ensures that these packages are isolated to the specific project. ```bash $ pip install otcextensions python-openstackclient ``` -------------------------------- ### Install Project and Dependencies Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/source_install.md Installs the python-otcextensions project and its dependencies into the activated virtual environment using setup.py. ```bash python setup.py install ``` -------------------------------- ### Install tox for testing Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/contributor/setup.md Installs the tox test runner within an activated virtual environment. Tox is used to run tests against multiple Python versions, ensuring broader compatibility. ```bash (sdk3)$ pip install tox ``` -------------------------------- ### Install Openstack-Client Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/source_install.md Installs the Openstack-Client binary from the Python Package Index (pip). ```bash pip install openstackclient ``` -------------------------------- ### Create Minimal Python Script to List OpenStack Servers Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/getting_started.md This Python script demonstrates how to establish a connection to an OpenStack cloud using the openstack SDK and list all available servers. It includes optional logging configuration and shows how to iterate through the server list. The 'cloud' parameter is optional if environment variables are used or only one cloud connection is defined. ```python #!/usr/bin/env python3 import openstack # optional, enable Logging on openstack.enable_logging(True) # Creates cloud connection # Parameter cloud='otc' is optional for env variables or single # clouds.yaml entry. conn = openstack.connect(cloud='otc') for server in conn.compute.servers(): print(server) ``` -------------------------------- ### Install and Configure OTC Extensions Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt Install the OTC Extensions package using pip and configure authentication credentials via the `clouds.yaml` file. This setup is necessary for both SDK and CLI access to OTC services. Ensure to replace placeholder values with your actual credentials. ```bash # Install OTC Extensions pip install otcextensions # Create clouds.yaml configuration file cat > ~/.config/openstack/clouds.yaml << 'EOF' clouds: otc: profile: otc auth: username: 'your_username' password: 'your_password' project_name: 'eu-de_project' user_domain_name: 'OTC00000000001000000xxx' auth_url: 'https://iam.eu-de.otc.t-systems.com:443/v3' interface: 'public' identity_api_version: 3 ak: 'your_access_key' # Required for OBS sk: 'your_secret_key' EOF # Test CLI connection openstack --os-cloud otc flavor list ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/install/source_install.md Changes the current directory to the cloned python-otcextensions project folder. ```bash cd ./python-otcextensions ``` -------------------------------- ### Install OTC Extensions using pip Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/README.rst Installs the 'otcextensions' Python package using pip. This is the primary method for adding OTC Extensions to your environment, enabling extra commands for the OpenStack Client CLI. ```console $ pip install otcextensions ``` -------------------------------- ### Build SDK documentation with tox Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/contributor/setup.md Builds the project's documentation using Sphinx via a tox command defined in tox.ini. The HTML output is typically found in the docs/build/html directory. ```bash (sdk3)$ tox -e docs ``` -------------------------------- ### Initialize FloatingIP Resource (Python) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/dns/v2/floating_ip.md Demonstrates the initialization of the FloatingIP resource class. It accepts synchronization status and an OpenStack connection object as parameters. The connection parameter defaults to None, allowing for resource instantiation without an active connection, useful for unit testing. ```python from otcextensions.sdk.dns.v2.floating_ip import FloatingIP # Example initialization floating_ip_resource = FloatingIP(_synchronized=False, connection=None) ``` -------------------------------- ### Run Python Script to List OpenStack Servers Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/getting_started.md This command shows how to execute a Python script that lists OpenStack servers. The script should be saved with a .py extension, for example, 'list_server.py'. The output will display all existing OpenStack servers in your cloud environment. ```bash python list_server.py ``` -------------------------------- ### Configure OTC Authentication using Token and URL Command-Line Options Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/README.rst Shows the command-line options for authenticating with an existing token and a direct service URL. These options complement the environment variable method for token-based authentication. ```bash --os-token --os-url ``` -------------------------------- ### List Availability Zones using otcextensions SDK Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/vlb/v3/availability_zone.md Demonstrates how to list availability zones using the AvailabilityZone class's list method. This method is a generator that handles pagination and allows for response filtering via query parameters. It requires an active session and can be configured for pagination behavior and unknown parameter handling. ```python from otcextensions.sdk.vlb.v3.availability_zone import AvailabilityZone # Assuming 'session' is an authenticated Adapter object # Example usage: # try: # zones = AvailabilityZone.list(session) # for zone in zones: # print(f"AZ Code: {zone.code}, State: {zone.state}") # except Exception as e: # print(f"An error occurred: {e}") ``` -------------------------------- ### OTC Extensions Example: List CCE Clusters Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/getting_started.md This Python script utilizes the OTC Extensions to list all existing CCE (Cloud Container Engine) clusters within your Open Telekom Cloud account. It establishes a connection to the cloud and iterates through the CCE clusters, printing their details. The script can be saved and executed using the Python interpreter. ```python #!/usr/bin/env python3 import openstack # openstack.enable_logging(True) conn = openstack.connect() for cluster in conn.cce.clusters(): print(cluster) ``` -------------------------------- ### Install virtualenv using package managers or pip Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/contributor/setup.md Installs the virtualenv tool, which is used to create isolated Python development environments. This can be done using system package managers like apt-get or yum, or directly via pip. ```bash $ apt-get install python-virtualenv # Debian based platforms $ yum install python-virtualenv # Red Hat based platforms $ pip install virtualenv # Mac OS X and other platforms ``` -------------------------------- ### Configure OTC Authentication using Token and URL Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/README.rst Demonstrates authentication using an existing token and a direct URL to the OpenStack service. This method is useful when a token has already been acquired. ```bash export OS_TOKEN= export OS_URL= ``` -------------------------------- ### Configure OTC Authentication using Command-Line Options Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/README.rst Illustrates the command-line options for authenticating with Open Telekom Cloud. These options can be used directly when invoking OpenStack CLI commands. ```bash --os-auth-url --os-identity-api-version 3 --os-project-name --os-project-domain-name --os-username --os-user-domain-name [--os-password ] ``` -------------------------------- ### Run Python Script to List CCE Clusters Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/getting_started.md This command demonstrates how to execute the Python script designed to list CCE clusters. After saving the script (e.g., as 'list_cce_clusters.py'), you can run it using the Python interpreter to view your CCE cluster information. ```bash python list_cce_clusters.py ``` -------------------------------- ### Install Reno Package Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/contributor/release_notes.md This command installs the Reno Python package using pip. Ensure you have pip installed and potentially a virtual environment activated. This command takes no input and its output indicates the installation progress and success. ```bash pip install reno ``` -------------------------------- ### Start DIS Dump Task Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/cli/dis.md Starts one or more DIS dump tasks for a specified stream. Requires the stream name and the task ID(s) to be started. ```shell openstack dis dump task start [ ...] ``` -------------------------------- ### Manage Kafka Topics with OpenStack CLI Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt This snippet demonstrates how to create Kafka topics using the OpenStack command-line interface. It requires the OpenStack CLI to be installed and configured. ```bash # CLI: List DMS instances openstack dms instance list # CLI: Create Kafka topic openstack dms instance topic create my-kafka my-events-topic \ --partition 6 \ --replication 3 ``` -------------------------------- ### Start DCS Instance Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/cli/dcs.md Starts a single DCS instance that has been previously stopped. ```APIDOC ## POST /v1/{project_id}/instances/{instance_id}/start ### Description Starts a single DCS instance. ### Method POST ### Endpoint /v1/{project_id}/instances/{instance_id}/start ### Parameters #### Path Parameters - **instance** (string) - Required - ID or Name of the instance to modify. ``` -------------------------------- ### Start DCS Instance Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/dcs/v1/instance.md Method to start a stopped DCS instance. It requires a session object for the operation. ```python start(session) ``` -------------------------------- ### ClusterNode Class Initialization and Attributes (Python) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/cce/v1/cluster_node.md Demonstrates the initialization of the ClusterNode class, inheriting from Resource. It outlines key attributes like base_path, allow_create, allow_delete, allow_list, spec, status, replica_count, and message. The connection parameter allows for resource operations without an active connection, useful for testing. ```python from otcextensions.sdk.cce.v1.cluster_node import ClusterNode # Example initialization (attributes would be set during instantiation) node = ClusterNode(_synchronized=False, connection=None) # Accessing attributes print(node.base_path) # Output: '/clusters/%(cluster_uuid)s/hosts' print(node.allow_create) # Output: True print(node.spec) # Output: None (initially) print(node.status) # Output: None (initially) print(node.replica_count) # Output: None (initially) print(node.message) # Output: None (initially) ``` -------------------------------- ### Start DCS Instance Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/cli/dcs.md Starts a single DCS instance that has been previously stopped. Requires the instance name or ID. ```shell openstack dcs instance start ``` -------------------------------- ### Anti DDoS Config Class Initialization (Python) Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/anti_ddos/v1/config.md Demonstrates the initialization of the Config class, inheriting from Resource. It accepts optional arguments like _synchronized and connection, and defines base_path for API interactions. ```python from otcextensions.sdk.anti_ddos.v1.config import Config # Example initialization (attributes would be set by the SDK) config_instance = Config(_synchronized=False, connection=None) # Attributes are typically populated by the SDK after fetching data print(f"Base Path: {config_instance.base_path}") print(f"Allow List Enabled: {config_instance.allow_list}") ``` -------------------------------- ### Start Development Environment Instance Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/cli/modelarts.md Starts a specified development environment (Devenv) instance. The instance can be identified by its name or ID. ```shell openstack ma devenv start ``` -------------------------------- ### CLI: Manage RDS Configurations Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt Bash commands to list, create, and apply RDS configuration templates using the OpenStack CLI. ```bash openstack rds configuration list openstack rds configuration create my-mysql-config \ --datastore-type mysql \ --datastore-version 8.0 \ --value max_connections=500 \ --value innodb_buffer_pool_size=2147483648 openstack rds configuration apply my-mysql-config --instance instance-id ``` -------------------------------- ### CLI: Create RDS Instance Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt Command-line interface for creating a new Relational Database Service (RDS) instance. Allows specifying instance name, flavor, storage, datastore details, network configuration, security settings, and backup options. ```bash # CLI: List available flavors openstack rds flavor list mysql 8.0 # CLI: Create RDS instance openstack rds instance create my-mysql-db rds.mysql.c6.large.2 \ --size 100 \ --volume-type ultrahigh \ --availability-zone eu-de-01 \ --datastore-type MySQL \ --datastore-version 8.0 \ --router-id vpc-id \ --network-id subnet-id \ --security-group-id sg-id \ --password 'SecurePass123!' \ --backup-keepdays 7 \ --backup-timeframe 02:00-03:00 \ --wait ``` -------------------------------- ### DMS Instance Class Initialization and Attributes Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/dms/v1/instance.md The Instance class inherits from Resource and represents a DMS Instance. It includes attributes for instance details such as ID, status, engine, and network configuration. Initialization can optionally take a connection object. ```python from otcextensions.sdk.dms.v1.instance import Instance # Example initialization (assuming a connection object exists) # connection = Connection(...) # instance = Instance(connection=connection, instance_id='your_instance_id') # Accessing attributes # print(instance.instance_id) # print(instance.status) # print(instance.engine_name) ``` -------------------------------- ### GET /templates/{template_id} Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/proxies/function_graph.md Retrieves a specific template by its ID. ```APIDOC ## GET /templates/{template_id} ### Description Get one template by ID. ### Method GET ### Endpoint `/templates/{template_id}` ### Parameters #### Path Parameters - **template_id** (string) - Required - The ID of the template to retrieve. ### Response #### Success Response (200) - **template** (object) - An object representing the retrieved template. #### Response Example ```json { "template": { "id": "example-template-id", "name": "Example Template", "content": "..." } } ``` ``` -------------------------------- ### Instance Operations Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/proxies/dcs.md Operations for managing individual DCS instances, such as starting and restarting them. ```APIDOC ## POST /instances/{instance_id}/action ### Description Starts an existing DCS instance. ### Method POST ### Endpoint /instances/{instance_id}/action ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID or name of the instance to start. #### Request Body ```json { "start": {} } ``` ### Response #### Success Response (200) - **instance** (object) - The updated instance details. #### Response Example ```json { "instance": { "id": "instance-id", "name": "my-instance", "status": "RUNNING" } } ``` ``` ```APIDOC ## POST /instances/{instance_id}/action ### Description Restarts an existing DCS instance. ### Method POST ### Endpoint /instances/{instance_id}/action ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID or name of the instance to restart. #### Request Body ```json { "restart": {} } ``` ### Response #### Success Response (200) - **instance** (object) - The updated instance details. #### Response Example ```json { "instance": { "id": "instance-id", "name": "my-instance", "status": "RESTARTING" } } ``` ``` -------------------------------- ### Manage VPC Peering and Routes with Python and Bash Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt Provides examples for managing VPC peering connections and custom routes using the openstack SDK for Python and the OpenStack CLI. Covers listing, creating, accepting peerings, and adding/deleting routes. Requires valid VPC and peering identifiers. ```python import openstack conn = openstack.connect(cloud='otc') # List VPC peering connections for peering in conn.vpc.peerings(): print(f"Peering: {peering.name} - Status: {peering.status}") # Create VPC peering connection peering = conn.vpc.create_peering( name='vpc-peering-prod-dev', request_vpc_info={'vpc_id': 'source-vpc-id'}, accept_vpc_info={'vpc_id': 'target-vpc-id', 'tenant_id': 'target-project-id'} ) # Accept peering request (from target VPC owner) conn.vpc.set_peering(peering, set_status='accept') # List VPC routes for route in conn.vpc.routes(): print(f"Route: {route.destination} -> {route.nexthop}") # Add a route for peering connection route = conn.vpc.add_route( type='peering', nexthop=peering.id, destination='10.0.0.0/8', vpc_id='source-vpc-id' ) # Delete route conn.vpc.delete_route(route) ``` ```bash # CLI: List VPC peerings openstack vpc peering list # CLI: Create VPC peering openstack vpc peering create vpc-peering-prod-dev \ --local-vpc-id source-vpc-id \ --peer-vpc-id target-vpc-id # CLI: Add VPC route openstack vpc route add \ --type peering \ --nexthop peering-id \ --destination 10.0.0.0/8 \ --vpc-id source-vpc-id ``` -------------------------------- ### GET /instances Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/dds/v3/instance.md Lists all DDS instances within the project, with optional filtering. ```APIDOC ## GET /instances ### Description Retrieves a list of all DDS database instances available in the project. Filtering options can be applied to narrow down the results. ### Method GET ### Endpoint `/instances` ### Parameters #### Query Parameters - **region** (string) - Optional - Filters instances by region. - **status** (string) - Optional - Filters instances by their status (e.g., ACTIVE, BUILD, ERROR). - **datastore_type** (string) - Optional - Filters instances by datastore type (e.g., MySQL, PostgreSQL). ### Response #### Success Response (200) - **instances** (list) - A list of DDS instance objects. - Each object contains details similar to the GET /instances/{id} response. #### Response Example ```json { "instances": [ { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "my-dds-instance-1", "region": "eu-de", "status": "ACTIVE", "datastore_type": "MySQL" }, { "id": "f0e9d8c7-b6a5-4321-0987-654321fedcba", "name": "my-dds-instance-2", "region": "eu-de", "status": "BUILD", "datastore_type": "PostgreSQL" } ] } ``` ``` -------------------------------- ### Manage Redis Instances with OpenStack CLI Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt This snippet shows how to manage Redis instances using the OpenStack command-line interface. It covers listing and creating Redis instances. Ensure the OpenStack CLI is installed and configured. ```bash # CLI: List DCS instances openstack dcs instance list # CLI: Create Redis instance openstack dcs instance create my-redis-cache \ --engine Redis \ --engine-version 6.0 \ --capacity 2 \ --vpc-id vpc-id \ --subnet-id subnet-id \ --security-group-id sg-id \ --availability-zone eu-de-01 \ --password 'RedisPass123!' ``` -------------------------------- ### GET /instances/{id} Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/dds/v3/instance.md Retrieves details of a specific DDS instance by its ID. ```APIDOC ## GET /instances/{id} ### Description Fetches the details of a specific DDS database instance using its unique identifier. ### Method GET ### Endpoint `/instances/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the DDS instance. #### Query Parameters None ### Response #### Success Response (200) - **instance** (dict) - Detailed information about the DDS instance. - **id** (string) - DB instance ID. - **name** (string) - DB instance name. - **region** (string) - Specifies the region ID. - **availability_zone** (string) - Specifies the AZ ID. - **mode** (string) - Specifies the instance type. - **datastore** (dict) - Specifies the database information. - **engine** (string) - Specifies the storage engine. - **flavor** (list) - Specifies the instance specifications. - **vpc_id** (string) - Specifies the VPC ID. - **subnet_id** (string) - Data store information. - **security_group_id** (string) - Specifies the ID of the security group. - **created** (string) - Time when a DB instance is created. - **updated** (string) - Time when a DB instance is updated. - **status** (string) - Instance status. - **port** (int) - Database port number. - **pay_mode** (string) - Billing mode. - **time_zone** (string) - Time zone. - **ssl** (string) - Specifies whether to enable SSL. - **backup_strategy** (dict) - Specifies the advanced backup policy. - **disk_encryption_id** (string) - Specifies the key ID used for disk encryption. #### Response Example ```json { "instance": { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "my-dds-instance", "region": "eu-de", "availability_zone": "eu-de-01", "mode": "ReplicaSet", "datastore": { "type": "MySQL", "version": "8.0" }, "engine": "MySQL", "flavor": [ { "code": "dds.r1.large" } ], "vpc_id": "vpc-12345", "subnet_id": "subnet-abcde", "security_group_id": "sg-12345", "created": "2023-10-27T10:00:00Z", "updated": "2023-10-27T10:05:00Z", "status": "ACTIVE", "port": 3306, "pay_mode": "PostPaid", "time_zone": "UTC", "ssl": "off", "backup_strategy": { "startTime": "02:00", "keepDays": 7 }, "disk_encryption_id": null } } ``` ``` -------------------------------- ### Create DMS Instance Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/cli/dms.md Creates a new DMS instance with specified configurations. Requires details like name, storage, router, security group, network, availability zone, and product ID. Optional parameters include description, engine details, access credentials, maintenance window, public access, SSL, bandwidth, retention policy, and storage specification. ```shell openstack dms instance create [--description ] [--engine-name ] [--engine-version ] --storage [--access-user ] [--password ] --router --security-group --network --availability-zone --product-id [--maintenance-begin ] [--maintenance-end ] [--enable-public-access] [--enable-ssl] [--public-bandwidth ] [--retention-policy {produce_reject,time_base}] [--storage-spec-code {dms.physical.storage.high,dms.physical.storage.ultra}] ``` -------------------------------- ### GET /vaults/{vault_id} Source: https://github.com/opentelekomcloud/python-otcextensions/blob/main/doc/source/sdk/resources/cbr/v3/vault.md Retrieves details of a specific CBR vault by its ID. ```APIDOC ## GET /vaults/{vault_id} ### Description Retrieves the details of a specific CBR vault. ### Method GET ### Endpoint /vaults/{vault_id} ### Parameters #### Path Parameters - **vault_id** (str) - Required - The ID of the vault to retrieve. ### Response #### Success Response (200) - **id** (str) - The ID of the vault. - **name** (str) - The name of the vault. - **description** (str) - The description of the vault. - **created_at** (str) - The creation time of the vault. - **backup_policy_id** (str) - The ID of the associated backup policy. - **project_id** (str) - The ID of the project. - **provider_id** (str) - The type of the vault. - **resources** (list) - A list of associated resources. - **tags** (dict) - Key-value pairs of tags associated with the vault. - **billing** (object) - Billing information for the vault. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "my-vault", "description": "My first vault", "created_at": "2023-10-27T10:00:00Z", "backup_policy_id": "p1q2r3s4-t5u6-7890-1234-567890abcdef", "project_id": "01234567-89ab-cdef-0123-456789abcdef", "provider_id": "cbr-provider-1", "resources": [], "tags": { "environment": "production" }, "billing": { "charging_mode": "post_paid", "size": 100, "period_type": "month", "period_num": 1, "is_auto_renew": true, "is_auto_pay": true } } ``` ``` -------------------------------- ### CLI: Manage RDS Backups Source: https://context7.com/opentelekomcloud/python-otcextensions/llms.txt Commands to create manual backups, restore instances from backups, and show the restore time window for RDS instances. ```bash openstack rds backup create manual-backup-001 my-mysql-db \ --description "Pre-upgrade backup" \ --wait openstack rds instance restore my-mysql-db --backup backup-id --wait openstack rds instance restore time show my-mysql-db ```