otcextensions.sdk.lts.v2.group

The LTS Group Class

The Group class inherits from Resource.

class otcextensions.sdk.lts.v2.group.Group(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.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: ty.Optional[str] = 'log_groups'

Singular form of key for resource.

resources_key: ty.Optional[str] = 'log_groups'

Plural form of key for resource.

base_path: str = '/groups'

The base part of the URI for this resource.

allow_create = True

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 = True

Allow delete operation for this resource.

allow_list = True

Allow list operation for this resource.

creation_time

Time when a log group was created

id

ID of the log group.

name: ty.Union[Body, URI]

Name of the log group.

ttl_in_days

Log retention duration, in days (fixed to 7 days).

tag

Log group tag.

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 (Adapter) – The session to use for making this request.

  • prepend_key – A boolean indicating whether the resource_key should be prepended in a resource update request. Default to True.

  • retry_on_conflict (bool) – Whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.

  • base_path (str) – Base part of the URI for modifying resources, if different from base_path.

  • 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 if Resource.allow_commit is not set to True.

create_stream(session, query)

Method to create a stream in log group

Parameters:
  • session (Adapter) – The session to use for making this request.

  • query (dict) – Additional parameters to create stream

delete_stream(session, log_stream_id, ignore_missing)

Method to delete stream from log group

Parameters:
  • session (Adapter) – The session to use for making this request.

  • log_stream_id (str) – Id of the stream to be deleted

  • ignore_missing (bool) – Should it be deleted if doesn’t exist or not