Merge "Removed old config ideas"

This commit is contained in:
Jenkins 2015-12-29 16:07:50 +00:00 committed by Gerrit Code Review
commit 7b64f2e074
3 changed files with 7 additions and 39 deletions

View File

@ -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/

View File

@ -12,6 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 from fabric import api as fabric_api
import os import os
import requests import requests

View File

@ -133,25 +133,6 @@ def load_file(fpath):
return {} 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): def solar_map(funct, args, **kwargs):
return map(funct, args) return map(funct, args)