Пример #1
0
 def __update_repo(self, module_repo, module_tag):
     if module_repo != self.__config['module']['mod_repo']:
         self.__config['module']['mod_repo'] = module_repo
         utils.update_config_file(self.__config, "mod_repo", module_repo)
     if module_tag != self.__config['module']['mod_tag']:
         self.__config['module']['mod_tag'] = module_tag
         utils.update_config_file(self.__config, "mod_tag", module_tag)
Пример #2
0
 def __update_repo(self, module_repo, module_tag):
     if module_repo != self.__config['module']['mod_repo']:
         self.__config['module']['mod_repo'] = module_repo
         utils.update_config_file(self.__config, "mod_repo", module_repo)
     if module_tag != self.__config['module']['mod_tag']:
         self.__config['module']['mod_tag'] = module_tag
         utils.update_config_file(self.__config, "mod_tag", module_tag)
Пример #3
0
 def __update_ud(self):
     utils.log("DEBUG", "Updating userdata variables ...",('__update_ud',self))
     ud = cloud.userdata(self.__config, self)
     for key in ud:
         if self.__config['userdata'].get(key) != ud[key]:
             if utils.update_config_file(self.__config, key, ud[key]):
                 utils.log("INFO", "%s has been updated from %s to %s"%(key,self.__config['userdata'].get(key),ud[key]),
                           ('__update_ud',self))
                 self.__config['userdata'][key] = ud[key]
                 if key in self.__config['global']['token_reset']:
                     utils.reset_token(self.__config)
     utils.log("DEBUG", "Userdata variables updated",('__update_ud',self))
Пример #4
0
 def __update_ud(self):
     utils.log("DEBUG", "Updating userdata variables ...",
               ('__update_ud', self))
     ud = cloud.userdata(self.__config, self)
     for key in ud:
         if self.__config['userdata'].get(key) != ud[key]:
             if utils.update_config_file(self.__config, key, ud[key]):
                 utils.log(
                     "INFO", "%s has been updated from %s to %s" %
                     (key, self.__config['userdata'].get(key), ud[key]),
                     ('__update_ud', self))
                 self.__config['userdata'][key] = ud[key]
                 if key in self.__config['global']['token_reset']:
                     utils.reset_token(self.__config)
     utils.log("DEBUG", "Userdata variables updated", ('__update_ud', self))