Merge "Removed old config ideas"
This commit is contained in:
commit
7b64f2e074
20
config.yaml
20
config.yaml
@ -1,20 +0,0 @@
|
||||
clients-data-file: /tmp/connections.yaml
|
||||
|
||||
tmp: /tmp
|
||||
|
||||
examples-dir: /vagrant/examples
|
||||
|
||||
extensions-dir: /vagrant/solar/solar/extensions
|
||||
|
||||
file-system-db:
|
||||
storage-path: /tmp/storage
|
||||
|
||||
template-dir: /vagrant/templates
|
||||
|
||||
resources-directory: /tmp/git
|
||||
resources-files-mask: /vagrant/resources/*/*.yaml
|
||||
resources-compiled-file: /vagrant/resources_compiled.py
|
||||
node_resource_template: /vagrant/resources/ro_node/
|
||||
|
||||
state: /tmp/state/
|
||||
|
@ -12,6 +12,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn("For now this file is deprecated "
|
||||
"in future it will be part of Solar repository logic",
|
||||
DeprecationWarning)
|
||||
|
||||
from fabric import api as fabric_api
|
||||
import os
|
||||
import requests
|
||||
|
@ -133,25 +133,6 @@ def load_file(fpath):
|
||||
return {}
|
||||
|
||||
|
||||
def read_config():
|
||||
CONFIG_FILE = os.environ.get('CONFIG_FILE') or '/vagrant/config.yaml'
|
||||
return load_file(CONFIG_FILE)
|
||||
|
||||
|
||||
def read_config_file(key):
|
||||
fpath = read_config()[key]
|
||||
|
||||
return load_file(fpath)
|
||||
|
||||
|
||||
def save_to_config_file(key, data):
|
||||
fpath = read_config()[key]
|
||||
|
||||
with open(fpath, 'w') as f:
|
||||
encoder = ext_encoder(fpath)
|
||||
encoder.dump(data, f)
|
||||
|
||||
|
||||
def solar_map(funct, args, **kwargs):
|
||||
return map(funct, args)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user