示例#1
0
    def __init__(self,
                 config_parser, # config file
                 **kwargs):     # anything you can't send in config_parser
                                # (hopefully the new service won't need anything extra)
        BaseAgent.__init__(self, config_parser)
        role.init(config_parser)

        self.VAR_TMP = config_parser.get('agent', 'VAR_TMP')
        self.dir_file = join(self.VAR_TMP, 'dir.pickle')
        self.mrc_file = join(self.VAR_TMP, 'mrc.pickle')
        self.osd_file = join(self.VAR_TMP, 'osd.pickle')

        self.CERTS_PATH = config_parser.get('agent', 'CERTS_PATH')
        self.DIR_CERT_PATH = join(self.CERTS_PATH,
                config_parser.get('dir', 'DIR_CERT'))
        self.MRC_CERT_PATH = join(self.CERTS_PATH,
                config_parser.get('mrc', 'MRC_CERT'))
        self.OSD_CERT_PATH = join(self.CERTS_PATH,
                config_parser.get('osd', 'OSD_CERT'))
        self.TRUSTED_CA_PATH = join(self.CERTS_PATH,
                config_parser.get('agent', 'TRUSTED_CA'))

        self.mrc_lock = Lock()
        self.dir_lock = Lock()
        self.osd_lock = Lock()

        self.DIR = role.DIR
        self.MRC = role.MRC
        self.OSD = role.OSD
示例#2
0
文件: agent.py 项目: dzeno/conpaas
    def __init__(self,
                 config_parser, # config file
                 **kwargs):     # anything you can't send in config_parser 
                                # (hopefully the new service won't need anything extra)
        BaseAgent.__init__(self, config_parser)
        role.init(config_parser)
        self.gen_string = config_parser.get('agent','STRING_TO_GENERATE')
        
        self.VAR_TMP = config_parser.get('agent','VAR_TMP')

        self.dir_file = join(self.VAR_TMP,'dir.pickle')
        self.mrc_file = join(self.VAR_TMP,'mrc.pickle')
        self.osd_file = join(self.VAR_TMP,'osd.pickle')
        self.mrc_lock = Lock()
        self.dir_lock = Lock()
        self.osd_lock = Lock()

        self.DIR = role.DIR
        self.MRC = role.MRC
        self.OSD = role.OSD
示例#3
0
    def __init__(
            self,
            config_parser,  # config file
            **kwargs):  # anything you can't send in config_parser
        # (hopefully the new service won't need anything extra)
        BaseAgent.__init__(self, config_parser)
        role.init(config_parser)
        self.gen_string = config_parser.get('agent', 'STRING_TO_GENERATE')

        self.VAR_TMP = config_parser.get('agent', 'VAR_TMP')

        self.dir_file = join(self.VAR_TMP, 'dir.pickle')
        self.mrc_file = join(self.VAR_TMP, 'mrc.pickle')
        self.osd_file = join(self.VAR_TMP, 'osd.pickle')
        self.mrc_lock = Lock()
        self.dir_lock = Lock()
        self.osd_lock = Lock()

        self.DIR = role.DIR
        self.MRC = role.MRC
        self.OSD = role.OSD