def __init__(self, dest=[]):
     Handler.__init__(self, dest=dest)
     self.last_stamp = 0.0
     self.parsers = {}
     self.available_parsers = { "stdtime": self._parse_std_time,
                      "spec1": self._parse_spec1_time,
                      "vsftpd": self._parse_vsftpd_time }
Exemple #2
0
 def __init__(self):
     Handler.__init__(self, '')
     self.collections = [{
         'path': '/gather-extra/artifacts/nodes.json',
         'outputDir': 'core/nodes'
     }, {
         'path': 'gather-extra/artifacts/persistentvolumes.json',
         'outputDir': 'core/persistentvolumes'
     }, {
         'path': 'gather-extra/artifacts/clusterversion.json',
         'outputDir': 'config.openshift.io',
         'outputName': 'clusterversions.yaml'
     }, {
         'path': 'gather-extra/artifacts/clusteroperators.json',
         'outputDir': 'config.openshift.io',
         'outputName': 'clusteroperators.yaml'
     }, {
         'path':
         'gather-extra/artifacts/clusteroperators.json',
         'outputDir':
         'config.openshift.io/clusteroperators',
     }, {
         'path':
         'gather-extra/artifacts/machineconfigpools.json',
         'outputDir':
         'config.openshift.io/machineconfiguration.openshift.io/machineconfigpools',
     }, {
         'path':
         'gather-extra/artifacts/machineconfigs.json',
         'outputDir':
         'config.openshift.io/machineconfiguration.openshift.io/machineconfigs',
     }]
Exemple #3
0
    def __init__(self, config):
        """
        Create a new instance of the ArchiveHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Create Archive Logger
        self.archive = logging.getLogger('autmon')
Exemple #4
0
    def __init__(self, source_name, filename, dest=[]):
        Handler.__init__(self, dest=dest)
        self.info("Initializing filereader at %s" % (filename))

        self.name = source_name
        self.count = 0
        self.last_report = time.time()

        self.file = open(filename)
        self.read()
        self.report()
Exemple #5
0
    def __init__(self, source_name, path, dest=[]):
        Handler.__init__(self, dest=dest)
        self.childrens = []
        self.name = source_name

        for f in os.listdir(path):
            if os.path.isfile("%s/%s" % (path, f)):
                self.childrens.append(
                    FileReader(f, "%s/%s" % (path, f), dest = dest))
            else:
                self.childrens.append(
                    DirReader(f, "%s/%s" % (path, f), dest))
Exemple #6
0
	def __init__(self):
		'''Init game.'''
		Handler.__init__(self)
		self.turns = 0
		'''Holds the number of turns that have passed. Ticks up every time 
		Game.input is called.'''
		self.actor = None
		'''Default actor to pass input to.'''
		
		if self.script != None:
			s = self.script.read()
			self.script.close()
			self.script = s
			
		self.scoreList = {}
Exemple #7
0
    def __init__(self):
        '''Init game.'''
        Handler.__init__(self)
        self.turns = 0
        '''Holds the number of turns that have passed. Ticks up every time 
		Game.input is called.'''
        self.actor = None
        '''Default actor to pass input to.'''

        if self.script != None:
            s = self.script.read()
            self.script.close()
            self.script = s

        self.scoreList = {}
Exemple #8
0
 def __init__(self,env):
     Handler.__init__(self, env)
     self._ut = Utility()
     self._conf = self._ut._conf
     self._db = self._ut._db
     self._jtheme = self._ut._jtheme
     self._jtheme_mobile = self._ut._jtheme_mobile
     self._jcache = self._ut._jcache
     self._errors = []
     self._messages = []
     self._news = []
     self._page = {}
     self._site = {}
     self._ = self._ut._
     self._site['title'] = self._conf.SITE_TITLE
     self._lang = self._conf.DEFAULT_LANG
     self._template_add = {}
     self._is_mobile = self.get_is_mobile()
Exemple #9
0
    def __init__(self, config=None):
        """
        Create a new instance of the MySQLHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Initialize Options
        self.hostname = self.config["hostname"]
        self.port = int(self.config["port"])
        self.username = self.config["username"]
        self.password = self.config["password"]
        self.database = self.config["database"]
        self.table = self.config["table"]
        self.col_time = self.config["col_time"]
        self.col_metric = self.config["col_metric"]
        self.col_value = self.config["col_value"]

        # Connect
        self._connect()
Exemple #10
0
    def __init__(self, config=None):
        """
        Create a new instance of the MySQLHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Initialize Options
        self.hostname = self.config['hostname']
        self.port = int(self.config['port'])
        self.username = self.config['username']
        self.password = self.config['password']
        self.database = self.config['database']
        self.table = self.config['table']
        self.col_time = self.config['col_time']
        self.col_metric = self.config['col_metric']
        self.col_value = self.config['col_value']

        # Connect
        self._connect()
Exemple #11
0
    def __init__(self, config=None):
        """
        Create a new instance of the MySQLHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Initialize Options
        self.hostname = self.config['hostname']
        self.port = int(self.config['port'])
        self.username = self.config['username']
        self.password = self.config['password']
        self.database = self.config['database']
        self.table = self.config['table']
        self.col_time = self.config['col_time']
        self.col_metric = self.config['col_metric']
        self.col_value = self.config['col_value']

        # Connect
        self._connect()
Exemple #12
0
    def __init__(self, config=None):
        """
        Create a new instance of the AutmonHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        # Initialize Data
        self.socket = None

        # Initialize Options
        self.proto = self.config.get('proto', 'tcp').lower().strip()
        if self.config.get('compress', 'False').strip() == 'True':
            self.compress = True
        else:
            self.compress = False

        try:
            self.host = (self.config['host'][0], int(self.config['host'][1]))
        except Exception, e:
            self.log.error("AutmonHandler: Host parameter is invaild. %s", e)
Exemple #13
0
	def __init__(self):
		self.word = self.wordClass()
		self.word.item = self
		Handler.__init__(self)

		cls = self.__class__
		cls.inst = self
		self.game = None
		
		
		self.props = ()
		self.inventory = inventory.Inventory()
		'''list - contains all the items this item owns'''
		
		self.newprops = []
		self.available = cls.available
		
		if cls.owner != None:
			self.owner = None
			self.move(cls.owner)
		else:
			self.owner = None
			
		if cls.location != None:
			self.intMove(cls.location)
		else:
			self.location = None

		props = cls.props
		if props.__class__ != tuple:
			props = (props,)

		for prop in props:
			prop = prop.clone()
			self.addProp(prop)
			
		self.finalizeProps()
		self.dispatchEvent(self.EVT_INIT)
Exemple #14
0
    def __init__(self):
        self.word = self.wordClass()
        self.word.item = self
        Handler.__init__(self)

        cls = self.__class__
        cls.inst = self
        self.game = None

        self.props = ()
        self.inventory = inventory.Inventory()
        '''list - contains all the items this item owns'''

        self.newprops = []
        self.available = cls.available

        if cls.owner != None:
            self.owner = None
            self.move(cls.owner)
        else:
            self.owner = None

        if cls.location != None:
            self.intMove(cls.location)
        else:
            self.location = None

        props = cls.props
        if props.__class__ != tuple:
            props = (props, )

        for prop in props:
            prop = prop.clone()
            self.addProp(prop)

        self.finalizeProps()
        self.dispatchEvent(self.EVT_INIT)
Exemple #15
0
 def __init__(self, name):
     Handler.__init__(self, name)
Exemple #16
0
 def __init__(self, profile, version):
     Handler.__init__(self)
     self._profile = profile
     self._bin_name = "unison"
     if version:
         self._bin_name += "-" + version
Exemple #17
0
	def __init__(self, initChars = ['!']):
		Handler.__init__(self)
		self.commands = {}
		self.overflowHandlers = []
		self.initChars = initChars
Exemple #18
0
 def __init__(self, host='localhost', dest=[]):
     Handler.__init__(self, dest=dest)
     self.es = ElasticSearch('http://%s:9200/' % (host))
     self.source_host = socket.gethostname()
Exemple #19
0
 def __init__(self, dest=[]):
     Handler.__init__(self, dest=dest)
 def __init__(self, dest=[]):
     Handler.__init__(self, dest=dest)
     self.match = False
 def __init__(self):
     Handler.__init__(self, 'gather-must-gather/artifacts/must-gather.tar')
Exemple #22
0
 def __init__(self, src, dst):
     Handler.__init__(self)
     self._src = src
     self._dst = dst
Exemple #23
0
 def __init__(self):
     Handler.__init__(self, '')
     self.collections = [{
         'path': '/gather-extra/artifacts/events.json',
         'outputDir': 'core',
         'outputName': 'events.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/configmaps.json',
         'outputDir': 'core',
         'outputName': 'configmaps.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/secrets.json',
         'outputDir': 'core',
         'outputName': 'secrets.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/endpoints.json',
         'outputDir': 'core',
         'outputName': 'endpoints.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/persistentvolumeclaims.json',
         'outputDir': 'core',
         'outputName': 'persistentvolumeclaims.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/pods.json',
         'outputDir': 'core',
         'outputName': 'pods.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/services.json',
         'outputDir': 'core',
         'outputName': 'services.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/daemonsets.json',
         'outputDir': 'app',
         'outputName': 'daemonsets.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/deployments.json',
         'outputDir': 'app',
         'outputName': 'deployments.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/replicasets.json',
         'outputDir': 'app',
         'outputName': 'replicasets.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/statefulsets.json',
         'outputDir': 'app',
         'outputName': 'statefulsets.yaml',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/machines.json',
         'outputDir': 'machine.openshift.io/machines',
         'namespaces': {}
     }, {
         'path': '/gather-extra/artifacts/machinesets.json',
         'outputDir': 'machine.openshift.io/machinesets',
         'namespaces': {}
     }]
Exemple #24
0
 def __init__(self, path, command):
     Handler.__init__(self)
     self._path = path
     self._command = command
Exemple #25
0
	def __init__(self, bot):
		Handler.__init__(self)
		self.bot = bot
Exemple #26
0
	def __init__(self):
		Handler.__init__(self)
		self._bot = None
		self._name = self.__class__.__name__
Exemple #27
0
 def __init__(self, repo_path):
     Handler.__init__(self)
     self.repo = GitRepo(repo_path)
Exemple #28
0
 def __init__(self):
     Handler.__init__(self, 'gather-extra/artifacts/namespaces.json')
Exemple #29
0
 def __init__(self):
     Handler.__init__(self, "/gather-extra/artifacts/pods")
Exemple #30
0
 def __init__(self, conn):
     Handler.__init__(self, conn)
Exemple #31
0
 def __init__(self):
     Handler.__init__(self)
     self.bot = None
Exemple #32
0
 def __init__(self):        
     Handler.__init__(self,"/finished.json")
     self.setEnable(True)