DCAAS API¶
The Direct Connect Class¶
The direct connect high-level interface is available through the dcaas
member of a Connection
object. The
dcaas
member will only be added if the
otcextensions.sdk.register_otc_extensions(conn)
method is called.
DCAAS Virtual Gateway¶
- class otcextensions.sdk.dcaas.v2._proxy.Proxy(session: session.Session, *, service_type: str | None = None, service_name: str | None = None, interface: str | None = None, region_name: str | None = None, endpoint_override: str | None = None, version: str | None = None, auth: plugin.BaseAuthPlugin | None = None, user_agent: str | None = None, connect_retries: int | None = None, logger: logging.Logger | None = None, allow: dict[str, ty.Any] | None = None, additional_headers: collections.abc.MutableMapping[str, str] | None = None, client_name: str | None = None, client_version: str | None = None, allow_version_hack: bool | None = None, global_request_id: str | None = None, min_version: str | None = None, max_version: str | None = None, default_microversion: str | None = None, status_code_retries: int | None = None, retriable_status_codes: list[int] | None = None, raise_exc: bool | None = None, rate_limit: float | None = None, concurrency: int | None = None, connect_retry_delay: float | None = None, status_code_retry_delay: float | None = None, statsd_client: statsd_client.StatsClient | None = None, statsd_prefix: str | None = None, prometheus_counter: prometheus_client.Counter | None = None, prometheus_histogram: prometheus_client.Histogram | None = None, influxdb_config: dict[str, ty.Any] | None = None, influxdb_client: influxdb_client.InfluxDBClient | None = None)
- virtual_gateways(**query)
Retrieve a generator of virtual gateways
- Returns:
A generator of virtual gateways
VirtualGateway
instances
- create_virtual_gateway(**attrs)
Create a new virtual gateway from attributes
- Parameters:
attrs (dict) – Keyword arguments which will be used to create a
VirtualGateway
, comprised of the properties on the VirtualGateway class.- Returns:
The results of virtual gateway creation
- Return type:
VirtualGateway
- get_virtual_gateway(virtual_gateway)
Get a virtual_gateway
- Parameters:
virtual_gateway – The value can be the ID of a virtual_gateway or a
VirtualGateway
instance.- Returns:
Virtual gateway instance
- Return type:
VirtualGateway
- delete_virtual_gateway(virtual_gateway, ignore_missing=True)
Delete a virtual_gateway
- Parameters:
virtual_gateway – The value can be the ID of a virtual gateway or a
VirtualGateway
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the virtual gateway does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent zone.
- Returns:
None
- update_virtual_gateway(virtual_gateway, **attrs)
Update virtual gateway attributes
- Parameters:
virtual_gateway – The id or an instance of
VirtualGateway
attrs (dict) – attributes for update on
VirtualGateway
- Return type:
VirtualGateway
- find_virtual_gateway(name_or_id, ignore_missing=True, **attrs)
Find a single virtual gateway
- Parameters:
name_or_id – The name or ID of a virtual gateway
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the zone does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent virtual gateway.
- Returns:
None
DCAAS Connection¶
- class otcextensions.sdk.dcaas.v2._proxy.Proxy(session: session.Session, *, service_type: str | None = None, service_name: str | None = None, interface: str | None = None, region_name: str | None = None, endpoint_override: str | None = None, version: str | None = None, auth: plugin.BaseAuthPlugin | None = None, user_agent: str | None = None, connect_retries: int | None = None, logger: logging.Logger | None = None, allow: dict[str, ty.Any] | None = None, additional_headers: collections.abc.MutableMapping[str, str] | None = None, client_name: str | None = None, client_version: str | None = None, allow_version_hack: bool | None = None, global_request_id: str | None = None, min_version: str | None = None, max_version: str | None = None, default_microversion: str | None = None, status_code_retries: int | None = None, retriable_status_codes: list[int] | None = None, raise_exc: bool | None = None, rate_limit: float | None = None, concurrency: int | None = None, connect_retry_delay: float | None = None, status_code_retry_delay: float | None = None, statsd_client: statsd_client.StatsClient | None = None, statsd_prefix: str | None = None, prometheus_counter: prometheus_client.Counter | None = None, prometheus_histogram: prometheus_client.Histogram | None = None, influxdb_config: dict[str, ty.Any] | None = None, influxdb_client: influxdb_client.InfluxDBClient | None = None)
- connections(**query)
Retrieve a generator of connections
- Returns:
A generator of connections
Connection
instances
- create_connection(**attrs)
Create a new connection from attributes
- Parameters:
attrs (dict) – Keyword arguments which will be used to create a
Connection
, comprised of the properties on the Connection class.- Returns:
The results of connection creation
- Return type:
- get_connection(connection)
Get a connection
- Parameters:
connection – The value can be the ID of a connection or a
Connection
instance.- Returns:
Connection instance
- Return type:
- delete_connection(connection, ignore_missing=True)
Delete a connection
- Parameters:
connection – The value can be the ID of a connection or a
Connection
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the connection does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent connection.
- Returns:
None
- update_connection(connection, **attrs)
Update connection attributes
- Parameters:
connection – The id or an instance of
Connection
attrs (dict) – attributes for update on
Connection
- Return type:
- find_connection(name_or_id, ignore_missing=True, **attrs)
Find a single connection
- Parameters:
name_or_id – The name or ID of a connection
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the connection does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent connection.
- Returns:
None
DCAAS Virtual Interface¶
- class otcextensions.sdk.dcaas.v2._proxy.Proxy(session: session.Session, *, service_type: str | None = None, service_name: str | None = None, interface: str | None = None, region_name: str | None = None, endpoint_override: str | None = None, version: str | None = None, auth: plugin.BaseAuthPlugin | None = None, user_agent: str | None = None, connect_retries: int | None = None, logger: logging.Logger | None = None, allow: dict[str, ty.Any] | None = None, additional_headers: collections.abc.MutableMapping[str, str] | None = None, client_name: str | None = None, client_version: str | None = None, allow_version_hack: bool | None = None, global_request_id: str | None = None, min_version: str | None = None, max_version: str | None = None, default_microversion: str | None = None, status_code_retries: int | None = None, retriable_status_codes: list[int] | None = None, raise_exc: bool | None = None, rate_limit: float | None = None, concurrency: int | None = None, connect_retry_delay: float | None = None, status_code_retry_delay: float | None = None, statsd_client: statsd_client.StatsClient | None = None, statsd_prefix: str | None = None, prometheus_counter: prometheus_client.Counter | None = None, prometheus_histogram: prometheus_client.Histogram | None = None, influxdb_config: dict[str, ty.Any] | None = None, influxdb_client: influxdb_client.InfluxDBClient | None = None)
- virtual_interfaces(**query)
Retrieve a generator of virtual interfaces
- Returns:
A generator of virtual interfaces
VirtualInterface
instances
- create_virtual_interface(**attrs)
Create a new virtual interface from attributes
- Parameters:
attrs (dict) – Keyword arguments which will be used to create a
VirtualInterface
, comprised of the properties on the Connection class.- Returns:
The results of virtual interface creation
- Return type:
VirtualInterface
- get_virtual_interface(virtual_interface)
Get a virtual_interface
- Parameters:
virtual_interface – The value can be the ID of a virtual_interface or a
VirtualInterface
instance.- Returns:
Virtual interface instance
- Return type:
VirtualInterface
- delete_virtual_interface(virtual_interface, ignore_missing=True)
Delete a virtual interface
- Parameters:
virtual_interface – The value can be the ID of a virtual interface or a
VirtualInterface
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the virtual interface does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent virtual interface.
- Returns:
None
- update_virtual_interface(virtual_interface, **attrs)
Update virtual interface attributes
- Parameters:
virtual_interface – The id or an instance of
VirtualInterface
attrs (dict) – attributes for update on
VirtualInterface
- Return type:
VirtualInterface
- find_virtual_interface(name_or_id, ignore_missing=True, **attrs)
Find a single virtual interface
- Parameters:
name_or_id – The name or ID of a virtual interface
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the virtual interface does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent virtual interface.
- Returns:
None