summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorFabian Affolter <fabian@bernewireless.net>2010-07-12 10:24:28 +0000
committerSol Jerome <sol.jerome@gmail.com>2010-07-16 16:36:15 -0500
commitd1d0a2e78e2405c8a5f342131712f9f79f16a1c4 (patch)
treed56349839054b201546f478708a6afdf3bcd2927 /src/lib/Server
parent9e77f585862829d84821374494f47c5bc7297870 (diff)
downloadbcfg2-d1d0a2e78e2405c8a5f342131712f9f79f16a1c4.tar.gz
bcfg2-d1d0a2e78e2405c8a5f342131712f9f79f16a1c4.tar.bz2
bcfg2-d1d0a2e78e2405c8a5f342131712f9f79f16a1c4.zip
Some comments added
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5969 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Admin/Bundle.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Bundle.py b/src/lib/Server/Admin/Bundle.py
index 1204c6852..e293c6a4f 100644
--- a/src/lib/Server/Admin/Bundle.py
+++ b/src/lib/Server/Admin/Bundle.py
@@ -23,7 +23,7 @@ class Bundle(Bcfg2.Server.Admin.MetadataCore):
Bcfg2.Server.Admin.MetadataCore.__call__(self, args)
reg='((?:[a-z][a-z\\.\\d\\-]+)\\.(?:[a-z][a-z\\-]+))(?![\\w\\.])'
- #Get all bundles out of the Bundle directory
+ #Get all bundles out of the Bundle/ directory
opts = {'repo': Bcfg2.Options.SERVER_REPOSITORY}
setup = Bcfg2.Options.OptionParser(opts)
setup.parse(sys.argv[1:])
@@ -46,6 +46,7 @@ class Bundle(Bcfg2.Server.Admin.MetadataCore):
# except MetadataConsistencyError:
# print "Error in deleting bundle."
# raise SystemExit(1)
+ #Lists all available xml bundles
elif args[0] in ['list-xml', 'ls-xml']:
bundle_name = []
for bundle_path in xml_list:
@@ -53,6 +54,7 @@ class Bundle(Bcfg2.Server.Admin.MetadataCore):
bundle_name.append(rg.search(bundle_path).group(1))
for bundle in bundle_name:
print bundle.split('.')[0]
+ #Lists all available genshi bundles
elif args[0] in ['list-genshi', 'ls-gen']:
bundle_name = []
for bundle_path in genshi_list:
@@ -60,6 +62,9 @@ class Bundle(Bcfg2.Server.Admin.MetadataCore):
bundle_name.append(rg.search(bundle_path).group(1))
for bundle in bundle_name:
print bundle.split('.')[0]
+ #Shows a list of all available bundles and prints bundle
+ #details after the user choose one bundle.
+ #FIXME: Add support for detailed output of genshi bundles
elif args[0] in ['show']:
bundle_name = []
bundle_list = xml_list + genshi_list
@@ -84,7 +89,7 @@ class Bundle(Bcfg2.Server.Admin.MetadataCore):
print 'Details for the "%s" bundle:' % \
(bundle_name[int(lineno)].split('.')[0])
tree = lxml.etree.parse(bundle_list[int(lineno)])
- #Print bundle content
+ #Prints bundle content
#print lxml.etree.tostring(tree)
names = ['Action', 'ConfigFile', 'Directory', 'Package', 'Permission', 'Service', 'SymLink']
for name in names: