noc.pm.models.metricscope

Module Contents

noc.pm.models.metricscope.id_lock
class noc.pm.models.metricscope.KeyField

Bases: mongoengine.document.EmbeddedDocument

field_name
model
field_type
__str__(self)
to_json(self)
class noc.pm.models.metricscope.PathItem

Bases: mongoengine.document.EmbeddedDocument

name
is_required
default_value
__str__(self)
to_json(self)
class noc.pm.models.metricscope.MetricScope

Bases: mongoengine.document.Document

meta
name
uuid
table_name
description
key_fields
path
enable_timedelta
_id_cache
json_data
__str__(self)
classmethod get_by_id(cls, id)
to_json(self)
get_json_path(self)
iter_fields(self)

Yield (field_name, field_type) tuples :return:

get_create_sql(self)

Get CREATE TABLE SQL statement :return:

get_create_distributed_sql(self)

Get CREATE TABLE for Distributed engine :return:

_get_raw_db_table(self)
ensure_table(self, connect=None)

Ensure table is exists :return: True, if table has been changed