示例#1
0
文件: locks.py 项目: jrha/aquilon
 def __init__(self, data=None, logger=LOGGER, loglevel=CLIENT_INFO):
     self.data = data
     components = ["sync"]
     if self.data:
         components.append(self.data)
     LockKey.__init__(self, components, logger=logger, loglevel=loglevel,
                      lock_queue=lock_queue)
示例#2
0
文件: locks.py 项目: jrha/aquilon
 def __init__(self, group=None, logger=LOGGER, loglevel=CLIENT_INFO):
     self.group = group
     components = ["delete"]
     if self.group:
         components.append(self.group)
     LockKey.__init__(self, components, logger=logger, loglevel=loglevel,
                      lock_queue=lock_queue)
示例#3
0
文件: locks.py 项目: ned21/aquilon
    def __init__(self,
                 domain=None,
                 profile=None,
                 logger=LOGGER,
                 loglevel=CLIENT_INFO):
        """Define the desired compile lock with a domain and a host.

        A profile could be a host or a cluster.

        """

        self.domain = domain
        self.profile = profile
        components = ["compile"]
        if self.domain:
            components.append(self.domain)
            if self.profile:
                components.append(self.profile)
        elif self.profile:
            raise InternalError("Compile lock request for %s missing domain." %
                                self.profile)
        LockKey.__init__(self,
                         components,
                         logger=logger,
                         loglevel=loglevel,
                         lock_queue=lock_queue)
示例#4
0
文件: locks.py 项目: ned21/aquilon
 def __init__(self, data=None, logger=LOGGER, loglevel=CLIENT_INFO):
     self.data = data
     components = ["sync"]
     if self.data:
         components.append(self.data)
     LockKey.__init__(self,
                      components,
                      logger=logger,
                      loglevel=loglevel,
                      lock_queue=lock_queue)
示例#5
0
文件: locks.py 项目: ned21/aquilon
 def __init__(self, group=None, logger=LOGGER, loglevel=CLIENT_INFO):
     self.group = group
     components = ["delete"]
     if self.group:
         components.append(self.group)
     LockKey.__init__(self,
                      components,
                      logger=logger,
                      loglevel=loglevel,
                      lock_queue=lock_queue)
示例#6
0
文件: locks.py 项目: jrha/aquilon
    def __init__(self, domain=None, profile=None,
                 logger=LOGGER, loglevel=CLIENT_INFO):
        """Define the desired compile lock with a domain and a host.

        A profile could be a host or a cluster.

        """

        self.domain = domain
        self.profile = profile
        components = ["compile"]
        if self.domain:
            components.append(self.domain)
            if self.profile:
                components.append(self.profile)
        elif self.profile:
            raise InternalError("Compile lock request for %s missing domain." %
                                self.profile)
        LockKey.__init__(self, components, logger=logger, loglevel=loglevel,
                         lock_queue=lock_queue)