summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-01-16 03:52:41 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-01-16 03:52:41 +0000
commit9707537bb7184a9109a7595459b4c4e84ef5b4f3 (patch)
tree6d6dae5e1a17bf9a0819e87a99581e41fe96fd59
parented4ac10a78038a4d748e5076e6dec49437301281 (diff)
downloadbcfg2-9707537bb7184a9109a7595459b4c4e84ef5b4f3.tar.gz
bcfg2-9707537bb7184a9109a7595459b4c4e84ef5b4f3.tar.bz2
bcfg2-9707537bb7184a9109a7595459b4c4e84ef5b4f3.zip
Implement support for -b foo:bar:baz on the command line (Resolves Ticket #516)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4244 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Client/Frame.py2
-rw-r--r--src/lib/Options.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py
index b341d65fd..d0477f752 100644
--- a/src/lib/Client/Frame.py
+++ b/src/lib/Client/Frame.py
@@ -170,7 +170,7 @@ class Frame:
# first perform bundle filtering
if self.setup['bundle']:
bundles = [b for b in self.config.findall('./Bundle') \
- if b.get('name') == self.setup['bundle']]
+ if b.get('name') in self.setup['bundle']]
self.whitelist = [e for e in self.whitelist if \
True in [e in b for b in bundles]]
else:
diff --git a/src/lib/Options.py b/src/lib/Options.py
index d797fdc9c..17c13c09b 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -128,6 +128,7 @@ class OptionSet(dict):
self[key] = val
list_split = lambda x:x.replace(' ','').split(',')
+colon_split = lambda x:x.split(':')
CFILE = Option('Specify configuration file', DEFAULT_CONFIG_LOCATION, cmd='-C',
odesc='<conffile>')
@@ -182,7 +183,7 @@ CLIENT_CACHE = Option('store the configuration in a file',
CLIENT_REMOVE = Option('force removal of additional configuration items',
default=False, cmd='-r', odesc="<entry type|all>")
CLIENT_BUNDLE = Option('only configure the given bundle', default=False,
- cmd='-b', odesc='<bundle>')
+ cmd='-b', odesc='<bundle>', cook=colon_split)
CLIENT_KEVLAR = Option('run in kevlar (bulletproof) mode', default=False,
cmd='-k', )
CLIENT_BUILD = Option('run in build mode', default=False, cmd='-B', )