Example #1
0
    def __init__(self, *args, **kwargs):
        MethodView.__init__(self, *args, **kwargs)

        try:
            self.command_file = Model.Control.Command.find_command_file(config['nagios_main_cfg'])
        except Exception, err:
            abort(500, 'unable to locate command file: %s' % (str(err), ))
Example #2
0
 def __init__(self, *args, **kwargs):
     # By default, we want a cache that can be shared across requests from different users ("public")
     # and a maximum age of 90 seconds, to keep our TTL low.
     # We bumped this from 60s -> 90s in November, 2016.
     self.cacheControl = app.config.get("CACHE_CONTROL", "public, max-age=90")
     self.log = logging.getLogger(self.__class__.__name__)
     MethodView.__init__(self, *args, **kwargs)
Example #3
0
 def __init__(self, *args, **kwargs):
     # By default, we want a cache that can be shared across requests from different users ("public")
     # and a maximum age of 60 seconds, to keep our TTL low.
     self.cacheControl = app.config.get("CACHE_CONTROL",
                                        "public, max-age=60")
     self.log = logging.getLogger(self.__class__.__name__)
     MethodView.__init__(self, *args, **kwargs)
Example #4
0
    def __init__(self, *args, **kwargs):
        MethodView.__init__(self, *args, **kwargs)

        # Set the default representations
        self.representations = (current_labthing().representations
                                if current_labthing() else
                                DEFAULT_REPRESENTATIONS)
Example #5
0
    def __init__(self, *args, **kwargs):
        MethodView.__init__(self, *args, **kwargs)
        Model.cfg_file=config['nagios_main_cfg']
        Model.pynag_directory=config['output_dir']

        self.username = request.authorization.username
        self.endpoint = request.path.lstrip('/')
        self.endpoints = ApiEndpoints()
Example #6
0
    def __init__(self, *args, **kwargs):
        MethodView.__init__(self, *args, **kwargs)
        Model.cfg_file = config['nagios_main_cfg']
        Model.pynag_directory = config['output_dir']

        self.username = request.authorization.username
        self.endpoint = request.path.lstrip('/')
        self.endpoints = ApiEndpoints()
Example #7
0
    def __init__(self, *args, **kwargs):
        MethodView.__init__(self, *args, **kwargs)

        try:
            self.command_file = Control.Command.find_command_file(
                config['nagios_main_cfg'])
        except Exception as err:
            abort(500, 'unable to locate command file: %s' % (str(err), ))

        self.arguments = ['verify', 'restart', 'reload']
Example #8
0
 def __init__(self, *args, **kwargs):
     MethodView.__init__(self, *args, **kwargs)
     self.request = request
     try:
         self.controller = getattr(
             base,
             '{}{}'.format(str(self).replace('View', ''),
                           'Controller'))(request)
     except Exception as e:
         logger.error('{}{} does not exist'.format(
             str(self).replace('View', ''), 'Controller'))
Example #9
0
    def __init__(self, loader=None):
        Library.__init__(self)
        MethodView.__init__(self)

        self.__loader = loader
        self.__bridge_username = None
        self.log = None
        self.__queue = None
        self.__rooms = None
        self.__config = None
        self.__rooms_types = None
        self.__rooms = None
        self.config = None
        self.__bridge_username = None
Example #10
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
     self.clusterprop = CephClusterProperties(self.config)
Example #11
0
 def __init__(self):
     MethodView.__init__(self)
Example #12
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
Example #13
0
    def __init__(self, loader = None):
        Library.__init__(self)
        MethodView.__init__(self)

        self.loader = loader
        self.log = None
Example #14
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
     self.clusterprop = CephClusterProperties(self.config)
Example #15
0
 def __init__(self, *args, **kwargs):
     self.log = logging.getLogger(self.__class__.__name__)
     MethodView.__init__(self, *args, **kwargs)
Example #16
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
     self.clusterprop = CephClusterProperties(self.config)
Example #17
0
 def __init__(self, *args, **kwargs):
     #self.auth = HTTPDigestAuth()
     MethodView.__init__(self, *args, **kwargs)
Example #18
0
 def __init__(self, *args, **kwargs):
     MethodView.__init__(self, *args, **kwargs)
     self.retrieve_data()
Example #19
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
Example #20
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
     self.clusterprop = CephClusterProperties(self.config)
Example #21
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
Example #22
0
 def __init__(self):
     MethodView.__init__(self)
Example #23
0
 def __init__(self, *args, **kwargs):
     self.log = logging.getLogger(self.__class__.__name__)
     MethodView.__init__(self, *args, **kwargs)
Example #24
0
 def __init__(self, *args, **kwargs):
     MethodView.__init__(self, *args, **kwargs)
     self.config = Config(join(dirname(dirname(__file__)), 'config.json'))
     self.state = TerraformState(self.config)
Example #25
0
 def __init__(self, *args, **kwargs):
     MethodView.__init__(self, *args, **kwargs)
     self.config = Config(join(dirname(__file__), 'config.json'))
     self.state = TerraformState(self.config)
Example #26
0
    def __init__(self, *args, **kwargs):

        MethodView.__init__(self, *args, **kwargs)
Example #27
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
Example #28
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
     self.clusterprop = get_ceph_clusters().itervalues().next()