tests.system.providers.opensearch.example_opensearch

Module Contents

Classes

LogDocument

Model-like class for persisting documents in opensearch.

Functions

load_connections()

Attributes

DAG_ID

INDEX_NAME

default_args

create_index

test_run

tests.system.providers.opensearch.example_opensearch.DAG_ID = 'example_opensearch'[source]
tests.system.providers.opensearch.example_opensearch.INDEX_NAME = 'example_index'[source]
tests.system.providers.opensearch.example_opensearch.default_args[source]
class tests.system.providers.opensearch.example_opensearch.LogDocument(meta=None, **kwargs)[source]

Bases: opensearchpy.helpers.document.Document

Model-like class for persisting documents in opensearch.

class Index[source]
name[source]
log_group_id[source]
logger[source]
message[source]
save(**kwargs)[source]

Save the document into opensearch. If the document doesn’t exist it is created, it is overwritten otherwise. Returns True if this operations resulted in new document being created.

Parameters
  • index – opensearch index to use, if the Document is associated with an index this can be omitted.

  • using – connection alias to use, defaults to 'default'

  • validate – set to False to skip validating the document

  • skip_empty – if set to False will cause empty values (None, [], {}) to be left on the document. Those values will be stripped out otherwise as they make no difference in opensearch.

  • return_doc_meta – set to True to return all metadata from the update API call instead of only the operation result

Any additional keyword arguments will be passed to OpenSearch.index unchanged.

:return operation result created/updated

tests.system.providers.opensearch.example_opensearch.load_connections()[source]
tests.system.providers.opensearch.example_opensearch.create_index[source]
tests.system.providers.opensearch.example_opensearch.test_run[source]

Was this entry helpful?