Ticket #3056 (closed defect: Duplicate)

Opened 7 months ago

Last modified 7 weeks ago

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)")

Change History

Changed 7 months ago by edahl

  • owner changed from edahl to ecn

Changed 7 months ago by ecn

  • status changed from new to closed
  • resolution set to fixed

(In [9163]) * fixes #3056 : rename new auto-allocate option to assign-devclass-script

Changed 7 months ago by kpg123

  • status changed from closed to reopened
  • resolution fixed deleted

The help information in zendisc.py wasn't updated to be something that someone could understand *without* reading the code.

The docstring for the function also wasn't updated.

Also, the documentation hasn't been updated with an example script.

Changed 6 months ago by ecn

  • status changed from reopened to closed
  • resolution set to duplicate

Closed because #3279 has been opened.

Changed 7 weeks ago by bbibeault

  • reviewed set to 1
Note: See TracTickets for help on using tickets.