Property:ComplexityTags

From Zenoss Wiki
Jump to: navigation, search

This is a property of type String. It is intended to be a list of the following supported tags: The allowed values for this property are:

  • BasicConfig
  • EventTransforms
  • CommandPlugins
  • CommandPlugins
  • Scripts
  • Datasources
  • ModelerPlugins
  • UI
  • ModelExtensions
  • APIs
  • CollectorDaemons
  • HubServices
  • Impact
  • Analytics
  • UnitTests


The ComplexityTags property values are intended to be determined via an automated analysis of each ZenPack release by our auto-builder, and associated with each ZenPack release on the wiki via external JSON data import using the External Data Extension. They are designed to provide an understanding of ZenPack capabilities that are supported in each ZenPack release.

Code Analysis

This section describes what code analysis is performed to determine the ComplexityTags values.

$ZP_DIR in the following notes refers to the directory within the namespace. Not the directory containing setup.py, but ZenPacks/blah/Name/. This directory tree can be determined by using the Python name of the ZenPack, encoded in the Property:ZenPack name property of each ZenPack.

General Configuration (BasicConfig)

Defined by one or more <object> elements in $ZP_DIR/objects/*.xml Something like xml.getElementsByTagName('object') and count the results. Or an XPath query with lxml.

Event Transforms (EventTransforms)

Defined by the presence of EventClass or EventClassInst objects in $ZP_DIR/objects/*.xml with content in the transform property. Search xml files for object elements with the class attribute set to EventClassInst with a nested property element with an id attribute of transform.

Command Datasource Plugins (CommandPlugins)

Defined by the presence of a script within the ZenPack referenced in the commandTemplate property of a BasicDataSource class object in $ZP_DIR/objects/*.xml. Commonly these scripts are found in $ZP_DIR/libexec/, but this isn't mandatory or the case for many ZenPacks. Search xml files for object elements with the class attribute set to BasicDataSource with a nested property element with an id attribute of sourcetype with a value of COMMAND.

Miscellaneous Scripts (Scripts)

Defined by the presence of executable files in $ZP_DIR/bin/. Non-recursive.

Datasource Types (Datasources)

Defined by the presence of *.py files in $ZP_DIR/datasources/. Non-recursive. Ignore __init__.py. Verify that a found Foo.py contains ^class Foo\(

Modeler Plugins (ModelerPlugins)

Defined by the presence of *.py files in $ZP_DIR/modeler/plugins/. Recursive. Ignore __init__.py. Verify that a found Foo.py contains ^class Foo\(

User Interface Components (UI)

Defined by the presence of resourceDirectory or viewlet elements in $ZP_DIR/*.zcml. (recursively) Tags could look like <resourceDirectory> or <browser:resourceDirectory> or some other user-defined namespace. Ignore the namespace and look for resourceDirectory and viewlet tags.

Model Extension (ModelExtensions)

Defined by the presence of modules and classes defined in $ZP_DIR that are subclasses of ZenModelBase. Sometimes hinted at by __init__.productNames, but not mandatory. This one could be tricky to determine without executing code. Non-recursive. A good regular expression would look something like the following.. Products.ZenModel.(Device|DeviceComponent|ManagedEntity|HWComponent|OSComponent|FileSystem|IpInterface|OSProcess|CPU|PowerSupply|TemperatureSensor|Fan|ExpansionCard|HardDisk|IpService|WinService|Software)

New APIs (APIs)

Defined by the presence of the following regex in $ZP_DIR/*.py recursively. ^class [^\(]+\(.*?ZuulFacade

Collector Daemons (CollectorDaemons)

Defined by the presence of executable files in $ZP_DIR/daemons/. Non-recursive.

Hub Services (HubServices)

Defined by the presence of *.py in $ZP_DIR/services/. Non-recursive. Ignore __init__.py. Typically associated with a collector daemon.

Impact Adapters (Impact)

Defined by the presence of subscriber elements in $ZP_DIR/*.zcml (recursively) with a provides attribute referencing a subclass of ZenPacks.zenoss.Impact.impactd.interfaces.IRelationshipDataProvider, ZenPacks.zenoss.Impact.impactd.interfaces.INodeTriggers, or ZenPacks.zenoss.Impact.stated.interfaces.IStateProvider. RelationshipDataProviders: Find <subscriber> tags in **/*.zcml where the provides attribute is ZenPacks.zenoss.Impact.impactd.interfaces.IRelationshipDataProvider. NodeTriggers: Find <subscriber> tags in **/*.zcml where the provides attribute is ZenPacks.zenoss.Impact.impactd.interfaces.INodeTriggers.

StateProvider: Find <subscriber> tags in **/*.zcml where the provides attribute is ZenPacks.zenoss.Impact.stated.interfaces.IStateProvider. A ZenPack should be said to have Impact adapters if any of the above are found.

Analytics Adapters (Analytics)

Defined by the presence of adapter or subscriber elements in $ZP_DIR/*.zcml (recursively) with a provides attribute reference a subclass of Products.Zuul.interfaces.IReportableFactory or Products.Zuul.interfaces.IReportableFactory. ReportableFactory: Find <subscriber> tags in **/*.zcml where the provides attribute is Products.Zuul.interfaces.IReportableFactory.

Reportable: Find <adapter> tags in **/*.zcml where the provides attribute is Products.Zuul.interfaces.IReportable.

Unit Tests (UnitTests)

Defined by the presence of Python modules in $ZP_DIR/tests/. Recursive. Ignore __init__.py.

Pages using the property "ComplexityTags"

Showing 25 pages using this property.

(previous 25) (next 25)

A

A10 +UI  +, HubServices  +, ModelerPlugins  +,
A10 +UI  +, HubServices  +, ModelerPlugins  +,
AIX SNMP +CommandPlugins  +, BasicConfig  +, ModelerPlugins  +,
APC Automatic Transfer Switches (ATS) +UI  +, BasicConfig  +, ModelerPlugins  +,
APC Automatic Transfer Switches (ATS) +UI  +, BasicConfig  +, ModelerPlugins  +,
APC Netbotz +BasicConfig  +
APC PDU Aggregate A/B Monitor +CommandPlugins  +, BasicConfig  +
APC Power Distribution Units (PDU) +UI  +, BasicConfig  +, ModelerPlugins  +,
APC Power Distribution Units (PDU) +UI  +, BasicConfig  +, ModelerPlugins  +,
APC PowerNet/MasterSwitch AP9225 +BasicConfig  +, ModelerPlugins  +, ModelExtensions  +
APC UPS +UI  +, BasicConfig  +, ModelerPlugins  +,
APC UPS +UI  +, BasicConfig  +, ModelerPlugins  +,
Adva FSP3000R7 +UI  +, ModelerPlugins  +, ModelExtensions  +
AdvaFSP150CC +UI  +, ModelerPlugins  +, ModelExtensions  +
Advanced Device Details +BasicConfig  +, UI  +, ModelExtensions  +
Advanced Device Details +BasicConfig  +, UI  +, ModelExtensions  +
Advanced Device Details +BasicConfig  +, UI  +, ModelExtensions  +
Advanced Device Details +BasicConfig  +, UI  +, ModelExtensions  +
Advanced Device Details +BasicConfig  +, UI  +, ModelExtensions  +
Allied Telesis Switch +ModelerPlugins  +
Alpha Technologies CXC Controller +HubServices  +, BasicConfig  +, UI  +,
Alvarion Wireless +CommandPlugins  +, BasicConfig  +, ModelerPlugins  +
Amazon Web Services +Datasources  +, APIs  +, UI  +,
Amazon Web Services +Datasources  +, APIs  +, UI  +,
Amazon Web Services +Datasources  +, APIs  +, UI  +,
(previous 25) (next 25)