Ticket #3056 (closed defect: Duplicate)
Rename zendisc command-line option '--auto-allocate' to '--assign-devclass-script'
| Reported by: | kpg123 | Owned by: | ecn |
|---|---|---|---|
| Priority: | 3 - Medium | Milestone: | zenoss-2.2 |
| Component: | All | Version: | 2.1.91 |
| Keywords: | Cc: | contribue | |
| Community Patch Attached: | Deployed @ Customer: | ||
| Installer: | Maintenance Target: | ||
| Specific ZenPack: | Maintenance Status: | ||
| Documentation Note?: | Required | Regression: |
Description
In order to determine what the command-line parameter auto-allocate means, one needs to dig into the code to determine what it means. assign-devclass-script conveys much more information into what the option actually does.
This should be completed with some documentation to describe the arguments that are passed to the script and what the return value should look like, as well as error checking requirements.
Index: zendisc.py
===================================================================
--- zendisc.py (revision 8390)
+++ zendisc.py (working copy)
@@ -347,7 +347,7 @@
d.addBoth(self.printResults)
def autoAllocate(self, device=None):
- """Execute a script that will auto allocate devices into their
+ """Execute a script that will auto assign devices into their
Device Classes"""
self.log.info("trying to auto-allocate device %s" % device.id )
if not device:
@@ -419,9 +419,9 @@
dest='useFileDescriptor', default=None,
help="Use the given (priveleged) file descriptor for ping")
- self.parser.add_option('--auto-allocate', dest='autoAllocate',
+ self.parser.add_option('--assign-devclass-script', dest='autoAllocate',
action="store_true", default=False,
- help="have zendisc auto allocate devices after discovery")
+ help="Script to use to map devices to their device class path (eg /Devices/Server/Linux)")