noc.core.config.params

Module Contents

noc.core.config.params.logger
class noc.core.config.params.BaseParameter(default=None, help=None)

Bases: object

PARAM_NUMBER
__get__(self, instance, owner)
__set__(self, instance, value)
set_value(self, value)
clean(self, v)
dump_value(self)
class noc.core.config.params.StringParameter(default=None, help=None, choices=None)

Bases: noc.core.config.params.BaseParameter

clean(self, v)
class noc.core.config.params.SecretParameter(default=None, help=None, choices=None)

Bases: noc.core.config.params.BaseParameter

clean(self, v)
__repr__(self)
class noc.core.config.params.IntParameter(default=None, help=None, min=None, max=None)

Bases: noc.core.config.params.BaseParameter

clean(self, v)
class noc.core.config.params.BooleanParameter

Bases: noc.core.config.params.BaseParameter

clean(self, v)
class noc.core.config.params.FloatParameter

Bases: noc.core.config.params.BaseParameter

clean(self, v)
class noc.core.config.params.MapParameter(default=None, help=None, mappings=None)

Bases: noc.core.config.params.BaseParameter

clean(self, v)
dump_value(self)
class noc.core.config.params.HandlerParameter

Bases: noc.core.config.params.BaseParameter

clean(self, v)
class noc.core.config.params.SecondsParameter

Bases: noc.core.config.params.BaseParameter

SHORT_FORM = [None, None, None, None, [3600, 'h'], [60, 'M']]
SCALE
clean(self, v)
dump_value(self)
class noc.core.config.params.ListParameter(default=None, help=None, item=None)

Bases: noc.core.config.params.BaseParameter

clean(self, v)
class noc.core.config.params.ServiceItem(host, port)

Bases: object

__slots__ = ['host', 'port']
__str__(self)
__repr__(self)
__contains__(self, item)
class noc.core.config.params.ServiceParameter(service, near=False, wait=True, help=None, full_result=True, critical=True)

Bases: noc.core.config.params.BaseParameter

Resolve external service location to a list of ServiceItem. Service resolved at startup, though in future implementation it can be changed during runtime

Resolves to empty list when service is not available :param service: Service name :param near: Resolve to nearest service :param wait: Block and wait until at least one instance of

service will be available
DEFAULT_RESOLUTION_TIMEOUT = 1
__get__(self, instance, owner)
set_value(self, value)
resolve(self)
as_list(self)
Returns:List of <host>:<port>
dump_value(self)
static is_static(svc)