From 4c11dad2be14dea97b449cfe48643942b1fff619 Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Wed, 21 Jan 2015 08:44:26 -0500 Subject: combox config now contains a `combox_name` field which contains the name of the combox. modified: combox/config.py modified: tests/config_test.py modified: tests/test-config/config.yaml --- combox/config.py | 1 + tests/config_test.py | 2 +- tests/test-config/config.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/combox/config.py b/combox/config.py index 36a5a71..290bc3c 100644 --- a/combox/config.py +++ b/combox/config.py @@ -75,6 +75,7 @@ def config_cb(config_dir = path.join(os.getenv('HOME'),'.combox/'), config_file_path = path.join(config_dir, 'config.yaml') config_info = {} + config_info['combox_name'] = input_func('name of this combox') config_info['combox_dir'] = path.abspath(input_func('path to combox directory')) silo_help_txt = 'silo directory (default: %s)' % (config_dir) diff --git a/tests/config_test.py b/tests/config_test.py index 9840ba1..95dedd8 100644 --- a/tests/config_test.py +++ b/tests/config_test.py @@ -31,7 +31,7 @@ node_dir_0 = path.join('tests', 'shard-dir-0') node_dir_1 = path.join('tests', 'shard-dir-1') # sample config info. -CONFIG_INFO = [combox_dir, CONFIG_DIR, '2', +CONFIG_INFO = ['testbox', combox_dir, CONFIG_DIR, '2', 'node-0', node_dir_0, '1024', 'node-1', node_dir_1, '1024'] diff --git a/tests/test-config/config.yaml b/tests/test-config/config.yaml index 6c503b3..944b529 100644 --- a/tests/test-config/config.yaml +++ b/tests/test-config/config.yaml @@ -1,4 +1,5 @@ combox_dir: /home/rsd/bgc/combox/tests/files +combox_name: testbox nodes_info: node-0: available: '1024' -- cgit v1.2.3