示例#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), ))
示例#2
0
文件: client.py 项目: nurav/balrog
 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)
示例#3
0
文件: client.py 项目: waseem18/balrog
 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)
示例#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)
示例#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()
示例#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()
示例#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']
示例#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'))
示例#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
示例#10
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
     self.clusterprop = CephClusterProperties(self.config)
示例#11
0
 def __init__(self):
     MethodView.__init__(self)
示例#12
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
示例#13
0
    def __init__(self, loader = None):
        Library.__init__(self)
        MethodView.__init__(self)

        self.loader = loader
        self.log = None
示例#14
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
     self.clusterprop = CephClusterProperties(self.config)
示例#15
0
文件: client.py 项目: garbas/balrog
 def __init__(self, *args, **kwargs):
     self.log = logging.getLogger(self.__class__.__name__)
     MethodView.__init__(self, *args, **kwargs)
示例#16
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = CephApiConfig()
     self.clusterprop = CephClusterProperties(self.config)
示例#17
0
文件: views.py 项目: athmane/ownpaste
 def __init__(self, *args, **kwargs):
     #self.auth = HTTPDigestAuth()
     MethodView.__init__(self, *args, **kwargs)
示例#18
0
 def __init__(self, *args, **kwargs):
     MethodView.__init__(self, *args, **kwargs)
     self.retrieve_data()
示例#19
0
文件: views.py 项目: asdfsx/ceph-dash
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
示例#20
0
文件: views.py 项目: asdfsx/ceph-dash
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
     self.clusterprop = CephClusterProperties(self.config)
示例#21
0
 def __init__(self):
     MethodView.__init__(self)
     self.config = current_app.config['USER_CONFIG']
示例#22
0
 def __init__(self):
     MethodView.__init__(self)
示例#23
0
 def __init__(self, *args, **kwargs):
     self.log = logging.getLogger(self.__class__.__name__)
     MethodView.__init__(self, *args, **kwargs)
示例#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)
示例#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)
示例#26
0
    def __init__(self, *args, **kwargs):

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