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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
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 to True, 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:
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 to True, 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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
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:

Connection

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:

Connection

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 to True, 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:

Connection

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 to True, 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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
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 to True, 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 to True, no exception will be set when attempting to delete a nonexistent virtual interface.

Returns:

None

DCAAS Endpoint Group