Exemplo n.º 1
0
 def app_config(self):
     filename = os.path.join(self.get_appconfig_path(), self.config_file)
     if os.path.isfile(filename):
         app_config = read_yaml_from_file(filename)
         # TODO: decision ==> stacks converted at instantiation or on-demand
         stacks = convert_stack_roles_to_dict(app_config.get('stacks'))
         app_config['stacks'] = stacks
         return app_config
Exemplo n.º 2
0
 def app_config(self):
     filename = os.path.join(self.get_appconfig_path(), self.config_file)
     if os.path.isfile(filename):
         app_config = read_yaml_from_file(filename)
         # TODO: decision ==> stacks converted at instantiation or on-demand
         stacks = convert_stack_roles_to_dict(app_config.get('stacks'))
         app_config['stacks'] = stacks
         return app_config
Exemplo n.º 3
0
    def init_from_file(cls, service_name, service_dir, filename):
        # initialize return vars
        definition = stacks = None

        # read service from deployment yaml file
        main_deployment = read_yaml_from_file(filename)

        # TODO: decision ==> stacks converted at instantiation or on-demand
        # extract service attributes
        if main_deployment:
            definition = main_deployment.get('definition')
            stacks = convert_stack_roles_to_dict(main_deployment.get('stacks'))

        return cls(service_name, service_dir, definition, stacks)
Exemplo n.º 4
0
    def init_from_file(cls, service_name, service_dir, filename):
        # initialize return vars
        definition = stacks = None

        # read service from deployment yaml file
        main_deployment = read_yaml_from_file(filename)

        # TODO: decision ==> stacks converted at instantiation or on-demand
        # extract service attributes
        if main_deployment:
            definition = main_deployment.get('definition')
            stacks = convert_stack_roles_to_dict(main_deployment.get('stacks'))

        return cls(service_name, service_dir, definition, stacks)