noc.core.loader.base

Module Contents

noc.core.loader.base.logger
class noc.core.loader.base.BaseLoader

Bases: object

name
base_cls
base_path
ignored_names
find_class(self, module_name, base_cls, name)

Load subclass of base_cls from module

Parameters:
  • module_name – String containing module name
  • base_cls – Base class
  • name – object name
Returns:

class reference or None

is_valid_class(self, kls, name)

Check find_class found valid class :param kls: Class :param name: Class’ name :return: True if class is valid and should be returned

is_valid_name(self, name)
get_path(self, base, name)

Get file path :param base: “” or custom prefix :param name: class name :return:

get_module_name(self, base, name)

Get module name :param base: noc or custom prefix :param name: module name :return:

get_class(self, name)
__getitem__(self, item)
__iter__(self)
iter_classes(self)
find_classes(self)