Exemple #1
0
 def load_vars(self, required_namespaces=None):
     """Reads variables from disk and resolves them based on API"""
     var_data = self.load_yaml(self.open_file("vars"))
     if required_namespaces:
         var_data = [vd for vd in var_data if vd["namespace"] in required_namespaces]
     # call api to retrieve data
     var_map = [multi_col_top(self, params) for params in var_data]
     # merge the various namespaces into a single dict
     var_map = merge_dicts(*var_map)
     return var_map
 def load_vars(self, required_namespaces=None):
     """Reads variables from disk and resolves them based on API"""
     var_data = self.load_yaml(self.open_file("vars"))
     if required_namespaces:
         var_data = [vd for vd in var_data
                     if vd['namespace'] in required_namespaces]
     # call api to retrieve data
     var_map = [multi_col_top(self, params) for params in var_data]
     # merge the various namespaces into a single dict
     var_map = merge_dicts(*var_map)
     return var_map