summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-01-21 07:08:18 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-01-21 07:08:18 -0500
commit6b56bb9eeb303cd7121d8c8fc8b7e791b0cffa63 (patch)
tree0f854568e807e38c03bb9828324bf02858c4bceb
parent4321e9dcadf929b81b6528b7cb3174c80772b5aa (diff)
now the config file also makes note of the 'silo' directory.
silo directory is the location where the silo (silo.db) containing information about files in the combox directory is stored. modified: combox/config.py modified: tests/config_test.py modified: tests/test-config/config.yaml
-rw-r--r--combox/config.py7
-rw-r--r--tests/config_test.py2
-rw-r--r--tests/test-config/config.yaml1
3 files changed, 9 insertions, 1 deletions
diff --git a/combox/config.py b/combox/config.py
index 7e1998e..36a5a71 100644
--- a/combox/config.py
+++ b/combox/config.py
@@ -76,6 +76,13 @@ def config_cb(config_dir = path.join(os.getenv('HOME'),'.combox/'),
config_info = {}
config_info['combox_dir'] = path.abspath(input_func('path to combox directory'))
+
+ silo_help_txt = 'silo directory (default: %s)' % (config_dir)
+ config_info['silo_dir'] = path.abspath(input_func(silo_help_txt))
+
+ if not config_info['silo_dir']:
+ config_info['silo_dir'] = config_dir
+
config_info['topsecret'] = pass_func()
no_nodes = int(input_func('number of nodes'))
diff --git a/tests/config_test.py b/tests/config_test.py
index bfbcbb4..9840ba1 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, '2',
+CONFIG_INFO = [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 765b06b..6c503b3 100644
--- a/tests/test-config/config.yaml
+++ b/tests/test-config/config.yaml
@@ -8,4 +8,5 @@ nodes_info:
available: '1024'
path: /home/rsd/bgc/combox/tests/shard-dir-1
size: '1024'
+silo_dir: /home/rsd/bgc/combox/tests/test-config
topsecret: topsecret