[Et-mgmt-commits-list] [SCM] cobbler branch, master now at v0.4.7-10-gb5e9a80
Michael DeHaan
mdehaan at redhat.com
Fri Apr 27 21:23:41 UTC 2007
Hello,
This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.
Updating branch, master,
via b5e9a8038b8fdf6f15aa2474ee6c85dd89cab386 (commit)
via 774b9d931ebda69b9b149a0696a4cefa9c747d99 (commit)
from e7ffce896809af8db172ac274dfcdd9146f15798 (commit)
- Log -----------------------------------------------------------------
commit b5e9a8038b8fdf6f15aa2474ee6c85dd89cab386
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date: Fri Apr 27 17:25:09 2007 -0400
Echo "list" features in report syntax.
commit 774b9d931ebda69b9b149a0696a4cefa9c747d99
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date: Fri Apr 27 17:19:37 2007 -0400
Allow "list" to show specifics of a specific object when given as a
parameter.
-----------------------------------------------------------------------
Diffstat:
cobbler/cobbler.py | 53 +++++++++++++++++++++++++++++++++++++++------------
1 files changed, 40 insertions(+), 13 deletions(-)
diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py
index ab61ec1..f8d3f53 100755
--- a/cobbler/cobbler.py
+++ b/cobbler/cobbler.py
@@ -120,20 +120,28 @@ class BootCLI:
# REPORTING FUNCTIONS
def distro_report(self,args):
- self.__print_sorted(self.api.distros())
- return True
+ if len(args) > 0:
+ return self.__list_names2(self.api.distros(), args)
+ else:
+ return self.__print_sorted(self.api.distros())
def system_report(self,args):
- self.__print_sorted(self.api.systems())
- return True
+ if len(args) > 0:
+ return self.__list_names2(self.api.systems(), args)
+ else:
+ return self.__print_sorted(self.api.systems())
def profile_report(self,args):
- self.__print_sorted(self.api.profiles())
- return True
+ if len(args) > 0:
+ return self.__list_names2(self.api.profiles(), args)
+ else:
+ return self.__print_sorted(self.api.profiles())
def repo_report(self,args):
- self.__print_sorted(self.api.repos())
- return True
+ if len(args) > 0:
+ return self.__list_names2(self.api.repos(), args)
+ else:
+ return self.__print_sorted(self.api.repos())
def report(self,args):
@@ -179,17 +187,36 @@ class BootCLI:
print " %s" % name
return True
+ def __list_names2(self, collection, args):
+ for p in args:
+ obj = collection.find(p)
+ if obj is not None:
+ print obj.printable()
+ return True
+
def system_list(self, args):
- return self.__list_names(self.api.systems())
+ if len(args) > 0:
+ self.__list_names2(self.api.systems(), args)
+ else:
+ return self.__list_names(self.api.systems())
def distro_list(self, args):
- return self.__list_names(self.api.distros())
+ if len(args) > 0:
+ return self.__list_names2(self.api.distros(),args)
+ else:
+ return self.__list_names(self.api.distros())
def profile_list(self, args):
- return self.__list_names(self.api.profiles())
+ if len(args) > 0:
+ return self.__list_names2(self.api.profiles(),args)
+ else:
+ return self.__list_names(self.api.profiles())
def repo_list(self, args):
- return self.__list_names(self.api.repos())
+ if len(args) > 0:
+ return self.__list_names2(self.api.repos(),args)
+ else:
+ return self.__list_names(self.api.repos())
###############################################################
# UTILITY FUNCTIONS
@@ -221,7 +248,7 @@ class BootCLI:
collection.sort(self.__sorter)
for x in collection:
print x.printable()
-
+ return True
######################################################################
# BASIC FRAMEWORK
hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
e7ffce896809af8db172ac274dfcdd9146f15798 \
b5e9a8038b8fdf6f15aa2474ee6c85dd89cab386
More information about the Et-mgmt-commits-list
mailing list