Skip to content

Commit

Permalink
Bump dev version to 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Dubrovyk committed May 8, 2024
2 parents 1638496 + f13935e commit 2fb5a3c
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 9 deletions.
3 changes: 3 additions & 0 deletions ZenPacks/zenoss/Microsoft/Windows/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
xmlns:zcml="http://namespaces.zope.org/zcml"
>

<!-- Include the zenjobs job definitions. -->
<include file="jobs.zcml"/>

<subscriber handler=".handlers.onServiceDataSourceMoved" />

<!-- components -->
Expand Down
2 changes: 1 addition & 1 deletion ZenPacks/zenoss/Microsoft/Windows/device_classes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ device_classes:
protocol: WinRM
zProperties:
zPythonClass: ZenPacks.zenoss.Microsoft.Windows.Device
zCollectorPlugins: [zenoss.winrm.OperatingSystem, zenoss.winrm.CPUs, zenoss.winrm.FileSystems, zenoss.winrm.Interfaces, zenoss.winrm.Services, zenoss.winrm.Processes, zenoss.winrm.Software, zenoss.winrm.HardDisks]
zCollectorPlugins: [zenoss.winrm.OperatingSystem, zenoss.winrm.CPUs, zenoss.winrm.FileSystems, zenoss.winrm.Interfaces, zenoss.winrm.Services, zenoss.winrm.Processes, zenoss.winrm.HardDisks]
zDeviceTemplates: [Device, Active Directory, IIS, MSExchange2010IS]
/Server/Microsoft/Cluster:
remove: true
Expand Down
2 changes: 1 addition & 1 deletion ZenPacks/zenoss/Microsoft/Windows/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def onServiceDataSourceMoved(ob, event):

if dmd and not temporary:
for job in dmd.JobManager.getPendingJobs():
if job.type == ReindexWinServices.getJobType():
if getattr(job, 'name') == "ZenPacks.zenoss.Microsoft.Windows.jobs.ReindexWinServices":
log.debug('handler: ReindexWinServices already pending')
return

Expand Down
17 changes: 17 additions & 0 deletions ZenPacks/zenoss/Microsoft/Windows/jobs.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!--
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2024, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################
-->
<configure xmlns="http://namespaces.zope.org/zope">
<include package="Products.Jobber" file="meta.zcml"/>
<job class=".jobs.ReindexWinServices"/>
<job class=".jobs.RemoveWinRMServices"/>
<job class=".jobs.ResetClassTypes"/>
</configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2024, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################

import logging
from Products.ZenModel.ZenPack import ZenPackMigration
from Products.ZenModel.migrate.Migrate import Version

log = logging.getLogger("zen.migrate")


class RemoveSoftwareModelerPluginFromDefaults(ZenPackMigration):
# Main class that contains the migrate() method.
# Note version setting.
version = Version(3, 1, 1)

def get_objects(self, dmd):
objects = []
dcObject = dmd.Devices.getOrganizer('/Server/Microsoft/Windows')
objects.append(dcObject)
objects.extend(dcObject.getOverriddenObjects("zCollectorPlugins", showDevices=True))
for ob in objects:
yield ob

def migrate(self, pack):
try:
for ob in self.get_objects(pack.dmd):
zCollectorPlugins = getattr(ob, "zCollectorPlugins", [])
if 'zenoss.winrm.Software' in zCollectorPlugins:
zCollectorPlugins.remove('zenoss.winrm.Software')
ob.setZenProperty('zCollectorPlugins', zCollectorPlugins)
log.info("Successfully removed 'zenoss.winrm.Software' modeler plugin from the defaults.")
except Exception as e:
log.warning("Failed to remove 'zenoss.winrm.Software' modeler plugin with a message - {}".format(e))
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_onError_status(self):

config = MagicMock(
id='127.0.0.1',
datasources=[MagicMock(params={'eventlog': sentinel.eventlog})],
datasources=[MagicMock(params={'eventlog': sentinel.eventlog}, zWinRMKRBErrorThreshold=0)],
)

for err in winrm_errors:
Expand Down
13 changes: 11 additions & 2 deletions docs/body.md
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,8 @@ authentication in the Zenoss web interface.
Note: Do not add the WinCluster plugin to the */Server/Microsoft/Windows* device class.
The */Server/Microsoft/Windows* device class uses a python class that is different from the python class
used in the */Server/Microsoft/Cluster* device class, and they have different relationships.
During the addition of the Cluster node, if this node is associated with the Cluster, it will automatically
detect and discover the Cluster device in */Server/Microsoft/Cluster* device class.

### Adding a Cluster Device

Expand All @@ -1093,8 +1095,8 @@ authentication in the Zenoss web interface.
- *Name or IP* must be resolvable and accessible from the collector server chosen in the *Collector* field.
7. Click *ADD*.

Note: The cluster nodes will automatically be added to */Server/Microsoft/Windows* class path.
Once modeled, any cluster nodes associated with the cluster are added to device class */Server/Microsoft/Windows*.
Note: The Сluster nodes will automatically be added to */Server/Microsoft/Windows* class path during the Cluster device discovering.
Once modeled, any Сluster nodes associated with the Сluster are added to device class */Server/Microsoft/Windows*.
The **only** three valid modeler plugins for device class */Server/Microsoft/Cluster* are WinCluster, OperatingSystem, and WinMSSQL.

------------------------------------------------------------------------
Expand Down Expand Up @@ -2055,6 +2057,13 @@ Monitoring Templates
Changes
-------

3.1.1

- Make Microsoft.Windows ZenPack compatible with Ubuntu-based CZ 7.2.0 (ZPS-8850)
- Fix device deletion during "Reindex windows services" job execution (ZPS-8862)
- Remove the Software modeler plugin from the default selection for /Server/Microsoft/Windows (ZPS-8911)
- Tested with Zenoss Cloud, Zenoss 6.7.0, Service Impact 5.6.0 and Analytic 6.0.0

3.1.0

- Fixed CPU/Memory increasing on Windows target device (ZPS-3171)
Expand Down
8 changes: 4 additions & 4 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Releases
--------

Version 3.1.0 - <a class="external" href="https://delivery.zenoss.com/" rel="nofollow">Download</a>
: Released on 2023/08/31
Version 3.1.1 - <a class="external" href="https://delivery.zenoss.com/" rel="nofollow">Download</a>
: Released on 2024/05/08
: Requires <a href="/product/zenpacks/pythoncollector" title="ZenPack:PythonCollector">PythonCollector ZenPack</a>, <a href="/product/zenpacks/zenpacklib" title="ZenPack:ZenPackLib">ZenPackLib ZenPack</a>
: Compatible with Zenoss 6.x and Zenoss Cloud

Version 3.0.2 - <a class="external" href="https://delivery.zenoss.com/" rel="nofollow">Download</a>
: Released on 2022/06/30
Version 3.1.0 - <a class="external" href="https://delivery.zenoss.com/" rel="nofollow">Download</a>
: Released on 2023/08/31
: Requires <a href="/product/zenpacks/pythoncollector" title="ZenPack:PythonCollector">PythonCollector ZenPack</a>, <a href="/product/zenpacks/zenpacklib" title="ZenPack:ZenPackLib">ZenPackLib ZenPack</a>
: Compatible with Zenoss 6.x and Zenoss Cloud

0 comments on commit 2fb5a3c

Please sign in to comment.