示例#1
0
def _find_all_apps(yaml_files_folder):
    all_apps_ = {}
    for root, _, files in os.walk(yaml_files_folder):
        for fname in files:
            if fname.endswith(".yml") or fname.endswith(".yaml"):
                apps = read_yaml(os.path.join(root, fname))
                all_apps_.update(apps)
    return all_apps_
示例#2
0
def generate_hop_config(hop_file, installation_name):
    hop_file.touch()
    hop_file.write_text(BASE_HOP_CONFIG.format(installation_name))
    return read_yaml(hop_file.as_posix())
示例#3
0
def hop_config(args):
    hop_config_path = os.path.join(os.getcwd(), args.hop_config or 'hop.yml')
    return HopConfig(config_dict=read_yaml(hop_config_path))
示例#4
0
def hop_config(args):
    if args.command == 'init':
        return
    hop_config_path = os.path.join(os.getcwd(), 'hop.yml')
    return HopConfig(config_dict=read_yaml(hop_config_path))
示例#5
0
 def admin_password(self):
     return read_yaml(
         os.path.expanduser('~/.hop{}'.format(
             self.get('name')))).get('password')
示例#6
0
 def admin_password(self):
     saved_settings_file = os.path.expanduser('~/.hop{}'.format(
         self.get('name')))
     return read_yaml(saved_settings_file).get('password')