From 82ce25593903948b36ab6145d3c1a20b1ca55e78 Mon Sep 17 00:00:00 2001 From: Jason Peacock Date: Mon, 19 Jun 2023 09:43:27 -0500 Subject: [PATCH] Refactor zenPath, binPath, varPath imports to import from ZenUtils.path --- Products/DataCollector/Plugins.py | 3 ++- .../DataCollector/plugins/zenoss/debug/FakeComponents.py | 2 +- .../plugins/zenoss/debug/ReplayProcessedResults.py | 2 +- .../DataCollector/plugins/zenoss/debug/ReplayRawResults.py | 2 +- Products/DataCollector/zenmodeler.py | 3 ++- Products/Jobber/config.py | 2 +- Products/Jobber/log.py | 2 +- Products/ZenCallHome/transport/crypt/__init__.py | 2 +- Products/ZenCallHome/transport/cycler.py | 2 +- Products/ZenEvents/EventClassInst.py | 2 +- Products/ZenEvents/TrapFilter.py | 2 +- Products/ZenEvents/tests/sendSnmpPcap.py | 2 +- Products/ZenEvents/zeneventd.py | 2 +- Products/ZenEvents/zeneventdWorkers.py | 2 +- Products/ZenEvents/zeneventmigrate.py | 2 +- Products/ZenEvents/zensendsyslog.py | 2 +- Products/ZenEvents/zensyslog.py | 2 +- Products/ZenEvents/zentestsyslogrules.py | 2 +- Products/ZenHub/PBDaemon.py | 3 ++- Products/ZenHub/zenhub.py | 7 ++----- Products/ZenHub/zenhubworker.py | 3 ++- Products/ZenMessaging/queuemessaging/schema.py | 2 +- Products/ZenModel/DataRoot.py | 3 ++- Products/ZenModel/IpNetwork.py | 4 ++-- Products/ZenModel/MibOrganizer.py | 3 ++- Products/ZenModel/PerformanceConf.py | 3 ++- Products/ZenModel/RRDDataSource.py | 2 +- Products/ZenModel/ZenModelBase.py | 3 ++- Products/ZenModel/ZenModelRM.py | 3 ++- Products/ZenModel/ZenPack.py | 3 ++- Products/ZenModel/ZenPackLoader.py | 2 +- Products/ZenModel/ZenPackManager.py | 2 +- Products/ZenModel/ZenossInfo.py | 2 +- Products/ZenModel/migrate/Migrate.py | 2 +- Products/ZenModel/migrate/addMariaDBLogFilters.py | 2 +- Products/ZenModel/migrate/addNginxLogFilters.py | 2 +- Products/ZenModel/migrate/addOpenTSDBLogbackConfig.py | 2 +- Products/ZenModel/migrate/addRabbitMQGlobalConf.py | 2 +- Products/ZenModel/migrate/addRabbitMQLogFilters.py | 2 +- Products/ZenModel/migrate/addRedisLogFilters.py | 2 +- Products/ZenModel/migrate/addSolrService.py | 2 +- Products/ZenModel/migrate/addThebeLogFilters.py | 2 +- .../ZenModel/migrate/addZeneventserverstdioLogFilters.py | 2 +- Products/ZenModel/migrate/addZookeeperLogFilters.py | 2 +- Products/ZenModel/migrate/betterstandarderrormessage.py | 2 +- Products/ZenModel/migrate/command.py | 2 +- Products/ZenModel/migrate/datapoints.py | 2 +- .../ZenModel/migrate/evenbettererstandarderrormessage.py | 2 +- .../ZenModel/migrate/evenbetterstandarderrormessage.py | 2 +- .../migrate/evenmorebettererstandarderrormessage.py | 2 +- Products/ZenModel/migrate/fixHbaseLogFilters.py | 2 +- Products/ZenModel/migrate/fixMetricShipperLogFilters.py | 2 +- Products/ZenModel/migrate/fixOpentsdbLogFilters.py | 2 +- Products/ZenModel/migrate/fixZminionLogFilters.py | 2 +- Products/ZenModel/migrate/hoist_perf_data.py | 2 +- Products/ZenModel/migrate/import_export_filesystem.py | 2 +- Products/ZenModel/migrate/kill_cricket.py | 2 +- Products/ZenModel/migrate/menus.py | 2 +- Products/ZenModel/migrate/monitorTemplateMenu.py | 2 +- Products/ZenModel/migrate/moveZepConfig.py | 2 +- Products/ZenModel/migrate/nginxConfigForZauth.py | 2 +- Products/ZenModel/migrate/pagecommand.py | 2 +- Products/ZenModel/migrate/processes.py | 2 +- Products/ZenModel/migrate/procparams.py | 2 +- Products/ZenModel/migrate/removeClearHeartbeatsMenuItem.py | 1 - Products/ZenModel/migrate/smtpsnpp.py | 2 +- Products/ZenModel/migrate/standarderrormessage.py | 2 +- .../ZenModel/migrate/tests/test_addMariaDBLogFilters.py | 2 +- Products/ZenModel/migrate/tests/test_addNginxLogFilters.py | 2 +- .../ZenModel/migrate/tests/test_addRabbitMQLogFilters.py | 2 +- Products/ZenModel/migrate/tests/test_addRedisLogFilters.py | 2 +- Products/ZenModel/migrate/tests/test_addSolrService.py | 2 +- Products/ZenModel/migrate/tests/test_addThebeLogFilters.py | 2 +- .../migrate/tests/test_addZeneventserverstdioLogFilters.py | 2 +- .../ZenModel/migrate/tests/test_addZookeeperLogFilters.py | 2 +- Products/ZenModel/migrate/tests/test_fixHbaseLogFilters.py | 2 +- .../migrate/tests/test_fixMetricShipperLogFilters.py | 2 +- .../ZenModel/migrate/tests/test_fixOpentsdbLogFilters.py | 2 +- .../ZenModel/migrate/tests/test_fixZminionLogFilters.py | 2 +- .../migrate/tests/test_updateRegionServerGraphs.py | 2 +- Products/ZenModel/migrate/twopointohobjects.py | 2 +- Products/ZenModel/migrate/updateOpenTSDBOriginalConfig.py | 2 +- Products/ZenModel/migrate/updateSolrConfigs.py | 2 +- .../ZenModel/migrate/updateZeneventserverstdioLogPaths.py | 2 +- Products/ZenModel/migrate/winmodelerUnderModeler.py | 2 +- Products/ZenModel/migrate/zpsitecustomize.py | 2 +- Products/ZenModel/tests/testImport.py | 2 +- Products/ZenModel/zenbuild.py | 2 +- Products/ZenModel/zendmd.py | 3 ++- Products/ZenModel/zenmib.py | 2 +- Products/ZenRRD/tests/testzenprocess.py | 2 +- Products/ZenRelations/schemadoc.py | 2 +- Products/ZenRelations/tests/testImport.py | 2 +- Products/ZenReports/ReportLoader.py | 2 +- Products/ZenReports/ReportServer.py | 3 ++- Products/ZenStatus/zenping.py | 3 ++- Products/ZenUI3/browser/testing.py | 2 +- Products/ZenUI3/browser/views.py | 2 +- Products/ZenUtils/CmdBase.py | 3 ++- Products/ZenUtils/ConfDaemon.py | 2 +- Products/ZenUtils/EggifyZenPack.py | 2 +- Products/ZenUtils/GlobalConfig.py | 3 ++- Products/ZenUtils/RunCommand.py | 2 +- Products/ZenUtils/Watchdog.py | 2 +- Products/ZenUtils/ZCmdBase.py | 3 ++- Products/ZenUtils/ZenBackup.py | 3 ++- Products/ZenUtils/ZenCheckZenDS.py | 2 +- Products/ZenUtils/ZenDaemon.py | 3 ++- Products/ZenUtils/ZenPackCmd.py | 3 ++- Products/ZenUtils/ZenPackDaemons.py | 2 +- Products/ZenUtils/ZenRestore.py | 3 ++- Products/ZenUtils/ZenScriptBase.py | 3 ++- Products/ZenUtils/configlog.py | 2 +- Products/ZenUtils/dbverify.py | 2 +- Products/ZenUtils/deprecated.py | 2 +- Products/ZenUtils/mib/tests/test_smidump.py | 2 +- Products/ZenUtils/tbdetail.py | 2 +- Products/ZenUtils/tests/testDeprecated.py | 2 +- Products/ZenUtils/tests/testFindEggs.py | 2 +- Products/ZenUtils/zenpack.py | 3 ++- Products/ZenWidgets/Portlet.py | 2 +- Products/Zuul/facades/mibfacade.py | 3 ++- Products/Zuul/facades/networkfacade.py | 2 +- Products/Zuul/facades/processfacade.py | 2 +- Products/Zuul/routers/nav.py | 2 +- 125 files changed, 149 insertions(+), 130 deletions(-) diff --git a/Products/DataCollector/Plugins.py b/Products/DataCollector/Plugins.py index ae5b1b3f72..83e55b1f92 100644 --- a/Products/DataCollector/Plugins.py +++ b/Products/DataCollector/Plugins.py @@ -42,7 +42,8 @@ class that shares the module's name from twisted.spread import pb -from Products.ZenUtils.Utils import importClass, zenPath +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import importClass log = logging.getLogger("zen.Plugins") diff --git a/Products/DataCollector/plugins/zenoss/debug/FakeComponents.py b/Products/DataCollector/plugins/zenoss/debug/FakeComponents.py index ba36860ae3..d9fda23db5 100644 --- a/Products/DataCollector/plugins/zenoss/debug/FakeComponents.py +++ b/Products/DataCollector/plugins/zenoss/debug/FakeComponents.py @@ -32,7 +32,7 @@ from ConfigParser import RawConfigParser from Products.DataCollector.plugins.CollectorPlugin import PythonPlugin -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class MissingModelerPluginSectionArgument(Exception): diff --git a/Products/DataCollector/plugins/zenoss/debug/ReplayProcessedResults.py b/Products/DataCollector/plugins/zenoss/debug/ReplayProcessedResults.py index 9b6033b4d1..8023f23aad 100644 --- a/Products/DataCollector/plugins/zenoss/debug/ReplayProcessedResults.py +++ b/Products/DataCollector/plugins/zenoss/debug/ReplayProcessedResults.py @@ -31,7 +31,7 @@ from ConfigParser import RawConfigParser from Products.DataCollector.plugins.CollectorPlugin import PythonPlugin -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class ReplayProcessedResults(PythonPlugin): diff --git a/Products/DataCollector/plugins/zenoss/debug/ReplayRawResults.py b/Products/DataCollector/plugins/zenoss/debug/ReplayRawResults.py index fe8fbf973b..63fba67e75 100644 --- a/Products/DataCollector/plugins/zenoss/debug/ReplayRawResults.py +++ b/Products/DataCollector/plugins/zenoss/debug/ReplayRawResults.py @@ -35,7 +35,7 @@ from Products.DataCollector.Plugins import loadPlugins from Products.DataCollector.plugins.CollectorPlugin import PythonPlugin -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.zenmodeler.ReplayRawResults") diff --git a/Products/DataCollector/zenmodeler.py b/Products/DataCollector/zenmodeler.py index b14f3196c7..55b6196073 100644 --- a/Products/DataCollector/zenmodeler.py +++ b/Products/DataCollector/zenmodeler.py @@ -61,7 +61,8 @@ from Products.ZenUtils.DaemonStats import DaemonStats from Products.ZenUtils.Driver import drive, driveLater from Products.ZenUtils.metricwriter import ThresholdNotifier -from Products.ZenUtils.Utils import unused, zenPath +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import unused from Products.Zuul.utils import safe_hasattr as hasattr # needed for Twisted's PB (Perspective Broker) to work diff --git a/Products/Jobber/config.py b/Products/Jobber/config.py index 7f79295d39..1bd04def3f 100644 --- a/Products/Jobber/config.py +++ b/Products/Jobber/config.py @@ -12,7 +12,7 @@ from Products.ZenUtils.config import Config, ConfigLoader from Products.ZenUtils.GlobalConfig import getGlobalConfiguration from Products.ZenUtils.RedisUtils import DEFAULT_REDIS_URL -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath __all__ = ("Celery", "ZenJobs") diff --git a/Products/Jobber/log.py b/Products/Jobber/log.py index 28070a41b4..1287fc3495 100644 --- a/Products/Jobber/log.py +++ b/Products/Jobber/log.py @@ -22,7 +22,7 @@ from inotify_simple import INotify, flags as Flags from zope.component import getUtility -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from .config import ZenJobs from .interfaces import IJobStore diff --git a/Products/ZenCallHome/transport/crypt/__init__.py b/Products/ZenCallHome/transport/crypt/__init__.py index 02ccf91e38..36cd52669c 100644 --- a/Products/ZenCallHome/transport/crypt/__init__.py +++ b/Products/ZenCallHome/transport/crypt/__init__.py @@ -11,7 +11,7 @@ import os import subprocess -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath logger = logging.getLogger("zen.callhome") diff --git a/Products/ZenCallHome/transport/cycler.py b/Products/ZenCallHome/transport/cycler.py index 93cbf2a2e7..7b6f50d178 100644 --- a/Products/ZenCallHome/transport/cycler.py +++ b/Products/ZenCallHome/transport/cycler.py @@ -20,7 +20,7 @@ from Products.ZenCallHome.CallHomeStatus import CallHomeStatus from Products.ZenCallHome.transport import CallHome from Products.ZenCallHome.transport.methods.directpost import direct_post -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.Zuul.utils import safe_hasattr # number of seconds between metrics updates diff --git a/Products/ZenEvents/EventClassInst.py b/Products/ZenEvents/EventClassInst.py index 3082810c95..64c6d87a29 100644 --- a/Products/ZenEvents/EventClassInst.py +++ b/Products/ZenEvents/EventClassInst.py @@ -43,7 +43,7 @@ from Products.ZenUtils.Time import SaveMessage from Products import Zuul from Products.Zuul.interfaces import IInfo -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils.daemonconfig import IDaemonConfig from zenoss.protocols.jsonformat import to_dict diff --git a/Products/ZenEvents/TrapFilter.py b/Products/ZenEvents/TrapFilter.py index f5775c3c01..f2ac504dfe 100644 --- a/Products/ZenEvents/TrapFilter.py +++ b/Products/ZenEvents/TrapFilter.py @@ -27,7 +27,7 @@ from Products.ZenHub.interfaces import ICollectorEventTransformer, \ TRANSFORM_CONTINUE, \ TRANSFORM_DROP -from Products.ZenUtils.Utils import unused, zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.zentrap") diff --git a/Products/ZenEvents/tests/sendSnmpPcap.py b/Products/ZenEvents/tests/sendSnmpPcap.py index 6b5e922acf..55be2778c6 100644 --- a/Products/ZenEvents/tests/sendSnmpPcap.py +++ b/Products/ZenEvents/tests/sendSnmpPcap.py @@ -11,7 +11,7 @@ import os import socket -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath def main(): "Run a tcpdump PCAP file to zentrap" diff --git a/Products/ZenEvents/zeneventd.py b/Products/ZenEvents/zeneventd.py index a3c5dbb8e8..b496ff1b12 100644 --- a/Products/ZenEvents/zeneventd.py +++ b/Products/ZenEvents/zeneventd.py @@ -44,7 +44,7 @@ from Products.ZenUtils.daemonconfig import IDaemonConfig from Products.ZenUtils.guid import guid from Products.ZenUtils.MetricReporter import MetricReporter -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils.ZCmdBase import ZCmdBase diff --git a/Products/ZenEvents/zeneventdWorkers.py b/Products/ZenEvents/zeneventdWorkers.py index ec63a5b3a7..5042a15c25 100644 --- a/Products/ZenEvents/zeneventdWorkers.py +++ b/Products/ZenEvents/zeneventdWorkers.py @@ -23,7 +23,7 @@ from zenoss.protocols.jsonformat import to_dict from zenoss.protocols.eventlet.amqp import Publishable, getProtobufPubSub from Products.ZenCollector.utils.workers import workersBuildOptions -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from metrology import Metrology diff --git a/Products/ZenEvents/zeneventmigrate.py b/Products/ZenEvents/zeneventmigrate.py index 1be669772b..3b726038c3 100644 --- a/Products/ZenEvents/zeneventmigrate.py +++ b/Products/ZenEvents/zeneventmigrate.py @@ -61,7 +61,7 @@ from Products.ZenEvents.syslog_h import fac_values, LOG_FAC from Products.ZenUtils.AmqpDataManager import AmqpTransaction from Products.ZenUtils.ZenScriptBase import ZenScriptBase -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils.guid.interfaces import IGlobalIdentifier from zope.component import getUtility from Products.ZenMessaging.queuemessaging.interfaces import IQueuePublisher diff --git a/Products/ZenEvents/zensendsyslog.py b/Products/ZenEvents/zensendsyslog.py index 07241c3e82..959722aec2 100644 --- a/Products/ZenEvents/zensendsyslog.py +++ b/Products/ZenEvents/zensendsyslog.py @@ -10,7 +10,7 @@ import socket import time -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath defaultInfile = zenPath("log/origsyslog.log") from Products.ZenUtils.CmdBase import CmdBase diff --git a/Products/ZenEvents/zensyslog.py b/Products/ZenEvents/zensyslog.py index 612bf94b0d..70532db4a9 100644 --- a/Products/ZenEvents/zensyslog.py +++ b/Products/ZenEvents/zensyslog.py @@ -39,7 +39,7 @@ from Products.ZenEvents.SyslogProcessing import SyslogProcessor -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils.IpUtil import asyncNameLookup from Products.ZenEvents.EventServer import Stats diff --git a/Products/ZenEvents/zentestsyslogrules.py b/Products/ZenEvents/zentestsyslogrules.py index c3bd20a0bb..5560b120ce 100755 --- a/Products/ZenEvents/zentestsyslogrules.py +++ b/Products/ZenEvents/zentestsyslogrules.py @@ -18,7 +18,7 @@ from Products.ZenEvents.SyslogProcessing import SyslogProcessor from Products.ZenUtils.CmdBase import CmdBase -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath defaultInfile = zenPath("log/origsyslog.log") # The format of the capture syslog message is: diff --git a/Products/ZenHub/PBDaemon.py b/Products/ZenHub/PBDaemon.py index a832fa39d9..4f9243d4a3 100644 --- a/Products/ZenHub/PBDaemon.py +++ b/Products/ZenHub/PBDaemon.py @@ -60,7 +60,8 @@ ThresholdNotifier, ) from Products.ZenUtils.PBUtil import ReconnectingPBClientFactory -from Products.ZenUtils.Utils import zenPath, atomicWrite +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import atomicWrite from Products.ZenUtils.ZenDaemon import ZenDaemon from .interfaces import ( diff --git a/Products/ZenHub/zenhub.py b/Products/ZenHub/zenhub.py index 249fb07f91..df98aaa234 100755 --- a/Products/ZenHub/zenhub.py +++ b/Products/ZenHub/zenhub.py @@ -29,11 +29,8 @@ from Products.ZenEvents.ZenEventClasses import App_Start from Products.ZenMessaging.queuemessaging.interfaces import IEventPublisher from Products.ZenUtils.debugtools import ContinuousProfiler -from Products.ZenUtils.Utils import ( - load_config, - load_config_override, - zenPath, -) +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import load_config, load_config_override from Products.ZenUtils.ZCmdBase import ZCmdBase from Products.ZenHub.interfaces import ( diff --git a/Products/ZenHub/zenhubworker.py b/Products/ZenHub/zenhubworker.py index 3fa6f9d99d..f3a9821fc5 100755 --- a/Products/ZenHub/zenhubworker.py +++ b/Products/ZenHub/zenhubworker.py @@ -43,7 +43,8 @@ from Products.ZenUtils.debugtools import ContinuousProfiler from Products.ZenUtils.PBUtil import setKeepAlive from Products.ZenUtils.Time import isoDateTime -from Products.ZenUtils.Utils import zenPath, atomicWrite, load_config +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import atomicWrite, load_config from Products.ZenUtils.ZCmdBase import ZCmdBase IDLE = "None/None" diff --git a/Products/ZenMessaging/queuemessaging/schema.py b/Products/ZenMessaging/queuemessaging/schema.py index d9ed42b0db..0ab1405357 100644 --- a/Products/ZenMessaging/queuemessaging/schema.py +++ b/Products/ZenMessaging/queuemessaging/schema.py @@ -25,7 +25,7 @@ from zope.component import getUtility from Products.ZenUtils.PkgResources import pkg_resources -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath def _loadQjs(pack_path): diff --git a/Products/ZenModel/DataRoot.py b/Products/ZenModel/DataRoot.py index ed8ab0e8d3..e1a97561be 100644 --- a/Products/ZenModel/DataRoot.py +++ b/Products/ZenModel/DataRoot.py @@ -42,7 +42,8 @@ import sys import string from Products.ZenMessaging.audit import audit -from Products.ZenUtils.Utils import zenPath, binPath, unpublished +from Products.ZenUtils.path import binPath, zenPath +from Products.ZenUtils.Utils import unpublished from Products.ZenUtils.jsonutils import json from Products.ZenUtils.ZenTales import talesCompile, getEngine from Products.ZenUtils.GlobalConfig import globalConfToDict diff --git a/Products/ZenModel/IpNetwork.py b/Products/ZenModel/IpNetwork.py index ce78e64607..4b2f95ffa6 100644 --- a/Products/ZenModel/IpNetwork.py +++ b/Products/ZenModel/IpNetwork.py @@ -40,10 +40,10 @@ from Products.ZenModel.Exceptions import * +from Products.ZenUtils.path import binPath from Products.ZenUtils.Utils import isXmlRpc, setupLoggingHeader, executeCommand -from Products.ZenUtils.Utils import binPath, clearWebLoggingStream from Products.ZenUtils import NetworkTree -from Products.ZenUtils.Utils import unused, zenPath, unpublished, edgesToXML +from Products.ZenUtils.Utils import unused, unpublished, edgesToXML from Products.Jobber.jobs import SubprocessJob from Products.ZenWidgets import messaging diff --git a/Products/ZenModel/MibOrganizer.py b/Products/ZenModel/MibOrganizer.py index 0f4f20c691..fa0fc87823 100644 --- a/Products/ZenModel/MibOrganizer.py +++ b/Products/ZenModel/MibOrganizer.py @@ -19,7 +19,8 @@ from Products.ZenRelations.RelSchema import ToOne, ToManyCont from Products.ZenUtils.Search import makeCaseInsensitiveKeywordIndex from Products.ZenWidgets import messaging -from Products.ZenUtils.Utils import atomicWrite, binPath, zenPath +from Products.ZenUtils.path import binPath, zenPath +from Products.ZenUtils.Utils import atomicWrite from Organizer import Organizer from MibModule import MibModule diff --git a/Products/ZenModel/PerformanceConf.py b/Products/ZenModel/PerformanceConf.py index ec2a693772..7ebbec4acb 100644 --- a/Products/ZenModel/PerformanceConf.py +++ b/Products/ZenModel/PerformanceConf.py @@ -33,7 +33,8 @@ from Products.Jobber.jobs import SubprocessJob from Products.ZenRelations.RelSchema import ToMany, ToOne from Products.ZenUtils.deprecated import deprecated -from Products.ZenUtils.Utils import binPath, unused, isXmlRpc, executeCommand +from Products.ZenUtils.path import binPath +from Products.ZenUtils.Utils import unused, isXmlRpc, executeCommand from Products.ZenUtils.GlobalConfig import getGlobalConfiguration from Products.ZenModel.ZDeviceLoader import CreateDeviceJob from Products.ZenWidgets import messaging diff --git a/Products/ZenModel/RRDDataSource.py b/Products/ZenModel/RRDDataSource.py index fc315777b8..15d4ca17bb 100644 --- a/Products/ZenModel/RRDDataSource.py +++ b/Products/ZenModel/RRDDataSource.py @@ -8,7 +8,7 @@ ############################################################################## -from Products.ZenUtils.Utils import binPath +from Products.ZenUtils.path import binPath __doc__="""RRDDataSource diff --git a/Products/ZenModel/ZenModelBase.py b/Products/ZenModel/ZenModelBase.py index 5fc8e3cd85..cf561d6a7a 100644 --- a/Products/ZenModel/ZenModelBase.py +++ b/Products/ZenModel/ZenModelBase.py @@ -35,7 +35,8 @@ from Products.ZenModel.interfaces import IZenDocProvider from Products.ZenRelations.ZenPropertyManager import iscustprop -from Products.ZenUtils.Utils import zenpathsplit, zenpathjoin, getDisplayType +from Products.ZenUtils.path import zenpathjoin, zenpathsplit +from Products.ZenUtils.Utils import getDisplayType from Products.ZenUtils.Utils import createHierarchyObj, getHierarchyObj from Products.ZenUtils.Utils import getObjByPath, unpublished diff --git a/Products/ZenModel/ZenModelRM.py b/Products/ZenModel/ZenModelRM.py index ee639f3a1d..983095e84e 100644 --- a/Products/ZenModel/ZenModelRM.py +++ b/Products/ZenModel/ZenModelRM.py @@ -28,7 +28,8 @@ from ZenModelBase import ZenModelBase, iscustprop from ZenPacker import ZenPacker from Products.ZenWidgets import messaging -from Products.ZenUtils.Utils import getSubObjects, zenPath +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import getSubObjects from Products.ZenRelations.ImportRM import ImportRM from Products.ZenRelations.RelationshipManager import RelationshipManager from Products.ZenModel.ZenossSecurity import ( diff --git a/Products/ZenModel/ZenPack.py b/Products/ZenModel/ZenPack.py index 8db220f5d9..8b09c414c5 100644 --- a/Products/ZenModel/ZenPack.py +++ b/Products/ZenModel/ZenPack.py @@ -31,7 +31,8 @@ from AccessControl.class_init import InitializeClass from Products.ZenModel.ZenModelRM import ZenModelRM from Products.ZenRelations.RelSchema import * -from Products.ZenUtils.Utils import importClass, zenPath, varPath +from Products.ZenUtils.path import varPath, zenPath +from Products.ZenUtils.Utils import importClass from Products.ZenUtils.Version import getVersionTupleFromString from Products.ZenUtils.Version import Version as VersionBase from Products.ZenUtils.PkgResources import pkg_resources diff --git a/Products/ZenModel/ZenPackLoader.py b/Products/ZenModel/ZenPackLoader.py index bd000d75b7..bae29fece9 100644 --- a/Products/ZenModel/ZenPackLoader.py +++ b/Products/ZenModel/ZenPackLoader.py @@ -12,7 +12,7 @@ from Products.ZenReports.ReportLoader import ReportLoader from Products.ZenUtils.events import pausedAndOptimizedIndexing -from Products.ZenUtils.Utils import zenPath, binPath +from Products.ZenUtils.path import binPath, zenPath from Products.ZenUtils.guid.interfaces import IGUIDManager from Products.ZenUtils.config import ConfigFile from Products.Zuul import getFacade diff --git a/Products/ZenModel/ZenPackManager.py b/Products/ZenModel/ZenPackManager.py index 611b0f8251..282b32cd88 100644 --- a/Products/ZenModel/ZenPackManager.py +++ b/Products/ZenModel/ZenPackManager.py @@ -18,7 +18,7 @@ from AccessControl import ClassSecurityInfo from Products.ZenMessaging.audit import audit from Products.ZenUtils.csrf import validate_csrf_token -from Products.ZenUtils.Utils import binPath, varPath +from Products.ZenUtils.path import binPath, varPath from Products.ZenWidgets import messaging import os import tempfile diff --git a/Products/ZenModel/ZenossInfo.py b/Products/ZenModel/ZenossInfo.py index 3a86117887..26651c965c 100644 --- a/Products/ZenModel/ZenossInfo.py +++ b/Products/ZenModel/ZenossInfo.py @@ -32,7 +32,7 @@ from Products.ZenUtils.GlobalConfig import getGlobalConfiguration from Products.ZenUtils.Version import (Version, VersionNotSupported, getVersionTupleFromString) -from Products.ZenUtils.Utils import zenPath, binPath, isZenBinFile +from Products.ZenUtils.path import binPath, isZenBinFile, zenPath from Products.ZenWidgets import messaging from Products.ZenMessaging.audit import audit from Products.ZenModel.ZenossSecurity import ( diff --git a/Products/ZenModel/migrate/Migrate.py b/Products/ZenModel/migrate/Migrate.py index 2783df2e49..7f67dfeb6d 100644 --- a/Products/ZenModel/migrate/Migrate.py +++ b/Products/ZenModel/migrate/Migrate.py @@ -18,7 +18,7 @@ from Products.ZenUtils.ZenScriptBase import ZenScriptBase from Products.ZenUtils.Version import Version as VersionBase from Products.ZenReports.ReportLoader import ReportLoader -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenModel.ZVersion import VERSION import sys diff --git a/Products/ZenModel/migrate/addMariaDBLogFilters.py b/Products/ZenModel/migrate/addMariaDBLogFilters.py index a5691420e7..1b61bdf545 100644 --- a/Products/ZenModel/migrate/addMariaDBLogFilters.py +++ b/Products/ZenModel/migrate/addMariaDBLogFilters.py @@ -12,7 +12,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/addNginxLogFilters.py b/Products/ZenModel/migrate/addNginxLogFilters.py index 6b0a05524f..964391dad1 100644 --- a/Products/ZenModel/migrate/addNginxLogFilters.py +++ b/Products/ZenModel/migrate/addNginxLogFilters.py @@ -13,7 +13,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/addOpenTSDBLogbackConfig.py b/Products/ZenModel/migrate/addOpenTSDBLogbackConfig.py index 4635f70ab1..499348273c 100644 --- a/Products/ZenModel/migrate/addOpenTSDBLogbackConfig.py +++ b/Products/ZenModel/migrate/addOpenTSDBLogbackConfig.py @@ -12,7 +12,7 @@ log = logging.getLogger("zen.migrate") import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import servicemigration as sm sm.require("1.0.0") diff --git a/Products/ZenModel/migrate/addRabbitMQGlobalConf.py b/Products/ZenModel/migrate/addRabbitMQGlobalConf.py index d39ed27859..b147d88432 100644 --- a/Products/ZenModel/migrate/addRabbitMQGlobalConf.py +++ b/Products/ZenModel/migrate/addRabbitMQGlobalConf.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.5") diff --git a/Products/ZenModel/migrate/addRabbitMQLogFilters.py b/Products/ZenModel/migrate/addRabbitMQLogFilters.py index edc29706f0..7cc8fe0875 100644 --- a/Products/ZenModel/migrate/addRabbitMQLogFilters.py +++ b/Products/ZenModel/migrate/addRabbitMQLogFilters.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.10") diff --git a/Products/ZenModel/migrate/addRedisLogFilters.py b/Products/ZenModel/migrate/addRedisLogFilters.py index 4c175aa274..d1d6fe3a48 100644 --- a/Products/ZenModel/migrate/addRedisLogFilters.py +++ b/Products/ZenModel/migrate/addRedisLogFilters.py @@ -13,7 +13,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/addSolrService.py b/Products/ZenModel/migrate/addSolrService.py index 91ff480fe8..6ced94fbfa 100644 --- a/Products/ZenModel/migrate/addSolrService.py +++ b/Products/ZenModel/migrate/addSolrService.py @@ -16,7 +16,7 @@ import servicemigration as sm sm.require("1.1.11") from servicemigration import HealthCheck -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class AddSolrService(Migrate.Step): """ diff --git a/Products/ZenModel/migrate/addThebeLogFilters.py b/Products/ZenModel/migrate/addThebeLogFilters.py index e0e29153a2..ada589dde9 100644 --- a/Products/ZenModel/migrate/addThebeLogFilters.py +++ b/Products/ZenModel/migrate/addThebeLogFilters.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.10") diff --git a/Products/ZenModel/migrate/addZeneventserverstdioLogFilters.py b/Products/ZenModel/migrate/addZeneventserverstdioLogFilters.py index f6ee6ae63d..d92db9117c 100644 --- a/Products/ZenModel/migrate/addZeneventserverstdioLogFilters.py +++ b/Products/ZenModel/migrate/addZeneventserverstdioLogFilters.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.10") diff --git a/Products/ZenModel/migrate/addZookeeperLogFilters.py b/Products/ZenModel/migrate/addZookeeperLogFilters.py index 65d2e30df5..9c7cc30f0d 100644 --- a/Products/ZenModel/migrate/addZookeeperLogFilters.py +++ b/Products/ZenModel/migrate/addZookeeperLogFilters.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.10") diff --git a/Products/ZenModel/migrate/betterstandarderrormessage.py b/Products/ZenModel/migrate/betterstandarderrormessage.py index 8dfe2680f2..56dc0a7a42 100644 --- a/Products/ZenModel/migrate/betterstandarderrormessage.py +++ b/Products/ZenModel/migrate/betterstandarderrormessage.py @@ -17,7 +17,7 @@ __version__ = "$Revision$"[11:-2] import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class BetterStandardErrorMessage(Migrate.Step): version = Migrate.Version(1, 1, 0) diff --git a/Products/ZenModel/migrate/command.py b/Products/ZenModel/migrate/command.py index 12aa30293f..286acea056 100644 --- a/Products/ZenModel/migrate/command.py +++ b/Products/ZenModel/migrate/command.py @@ -27,7 +27,7 @@ def update(self, dmd, oldname, name, default, **kw): dmd.Devices._setProperty(name, default, **kw) def cutover(self, dmd): - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath self.update(dmd, "zNagiosPath", "zCommandPath", zenPath('libexec')) if dmd.Devices.hasProperty("zNagiosCycleTime"): dmd.Devices._delProperty("zNagiosCycleTime") diff --git a/Products/ZenModel/migrate/datapoints.py b/Products/ZenModel/migrate/datapoints.py index 37396b101b..94137d44e6 100644 --- a/Products/ZenModel/migrate/datapoints.py +++ b/Products/ZenModel/migrate/datapoints.py @@ -66,7 +66,7 @@ def cutoverDataSource(self, s): s.datapoints._setObject(p.id, p) def cutoverTemplate(self, t, rrdPath): - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath oldbase = zenPath('perf') for s in t.datasources()[:]: self.cutoverDataSource(s) diff --git a/Products/ZenModel/migrate/evenbettererstandarderrormessage.py b/Products/ZenModel/migrate/evenbettererstandarderrormessage.py index 5c9fdeb20d..e274693fb7 100644 --- a/Products/ZenModel/migrate/evenbettererstandarderrormessage.py +++ b/Products/ZenModel/migrate/evenbettererstandarderrormessage.py @@ -15,7 +15,7 @@ ''' import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class EvenBettererStandardErrorMessage(Migrate.Step): version = Migrate.Version(2, 1, 1) diff --git a/Products/ZenModel/migrate/evenbetterstandarderrormessage.py b/Products/ZenModel/migrate/evenbetterstandarderrormessage.py index 210c8579b3..031a074d2c 100644 --- a/Products/ZenModel/migrate/evenbetterstandarderrormessage.py +++ b/Products/ZenModel/migrate/evenbetterstandarderrormessage.py @@ -15,7 +15,7 @@ ''' import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class EvenBetterStandardErrorMessage(Migrate.Step): version = Migrate.Version(2, 0, 0) diff --git a/Products/ZenModel/migrate/evenmorebettererstandarderrormessage.py b/Products/ZenModel/migrate/evenmorebettererstandarderrormessage.py index dc09cfb3d5..bb2fecca2a 100644 --- a/Products/ZenModel/migrate/evenmorebettererstandarderrormessage.py +++ b/Products/ZenModel/migrate/evenmorebettererstandarderrormessage.py @@ -15,7 +15,7 @@ ''' import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class EvenMoreBettererStandardErrorMessage(Migrate.Step): version = Migrate.Version(2, 3, 0) diff --git a/Products/ZenModel/migrate/fixHbaseLogFilters.py b/Products/ZenModel/migrate/fixHbaseLogFilters.py index 0a2a3128de..a757235f8c 100644 --- a/Products/ZenModel/migrate/fixHbaseLogFilters.py +++ b/Products/ZenModel/migrate/fixHbaseLogFilters.py @@ -13,7 +13,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/fixMetricShipperLogFilters.py b/Products/ZenModel/migrate/fixMetricShipperLogFilters.py index b18c7d927b..c352839876 100644 --- a/Products/ZenModel/migrate/fixMetricShipperLogFilters.py +++ b/Products/ZenModel/migrate/fixMetricShipperLogFilters.py @@ -13,7 +13,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/fixOpentsdbLogFilters.py b/Products/ZenModel/migrate/fixOpentsdbLogFilters.py index 5caf6138f8..ec739b63cf 100644 --- a/Products/ZenModel/migrate/fixOpentsdbLogFilters.py +++ b/Products/ZenModel/migrate/fixOpentsdbLogFilters.py @@ -13,7 +13,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/fixZminionLogFilters.py b/Products/ZenModel/migrate/fixZminionLogFilters.py index ee91691a5e..2fc2da4e96 100644 --- a/Products/ZenModel/migrate/fixZminionLogFilters.py +++ b/Products/ZenModel/migrate/fixZminionLogFilters.py @@ -13,7 +13,7 @@ import logging log = logging.getLogger("zen.migrate") -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import Migrate import servicemigration as sm diff --git a/Products/ZenModel/migrate/hoist_perf_data.py b/Products/ZenModel/migrate/hoist_perf_data.py index 6d3710e443..1f22811587 100644 --- a/Products/ZenModel/migrate/hoist_perf_data.py +++ b/Products/ZenModel/migrate/hoist_perf_data.py @@ -32,7 +32,7 @@ def __init__(self): def cutover(self, dmd): names = dmd.getDmdRoot('Devices').getOrganizerNames(True) - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath oldbase = zenPath('perf', 'Devices') names.sort() names.reverse() diff --git a/Products/ZenModel/migrate/import_export_filesystem.py b/Products/ZenModel/migrate/import_export_filesystem.py index f472ae45ab..531061d3fb 100644 --- a/Products/ZenModel/migrate/import_export_filesystem.py +++ b/Products/ZenModel/migrate/import_export_filesystem.py @@ -21,7 +21,7 @@ import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class ImportExportFilesystem(Migrate.Step): version = Migrate.Version(0, 23, 0) diff --git a/Products/ZenModel/migrate/kill_cricket.py b/Products/ZenModel/migrate/kill_cricket.py index 76dbbd5e09..17150e09f8 100644 --- a/Products/ZenModel/migrate/kill_cricket.py +++ b/Products/ZenModel/migrate/kill_cricket.py @@ -22,7 +22,7 @@ import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class KillCricket(Migrate.Step): version = Migrate.Version(0, 20, 0) diff --git a/Products/ZenModel/migrate/menus.py b/Products/ZenModel/migrate/menus.py index d63fed8980..b69aa0f488 100644 --- a/Products/ZenModel/migrate/menus.py +++ b/Products/ZenModel/migrate/menus.py @@ -17,7 +17,7 @@ ''' import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath menuxml = zenPath("Products/ZenModel/data/menus.xml") ZenPackItems = dict( diff --git a/Products/ZenModel/migrate/monitorTemplateMenu.py b/Products/ZenModel/migrate/monitorTemplateMenu.py index 0b7eceea25..bdc9011253 100644 --- a/Products/ZenModel/migrate/monitorTemplateMenu.py +++ b/Products/ZenModel/migrate/monitorTemplateMenu.py @@ -37,7 +37,7 @@ def cutover(self, dmd): dmd.Monitors.buildRelations() if len(dmd.Monitors.rrdTemplates()) == 0: from Products.ZenRelations.ImportRM import ImportRM - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath template = zenPath('Products/ZenModel/migrate/monitorTemplate.xml') im = ImportRM(noopts=True, app=dmd.zport) im.loadObjectFromXML(xmlfile=template) diff --git a/Products/ZenModel/migrate/moveZepConfig.py b/Products/ZenModel/migrate/moveZepConfig.py index c38699949a..8ed8e1383b 100644 --- a/Products/ZenModel/migrate/moveZepConfig.py +++ b/Products/ZenModel/migrate/moveZepConfig.py @@ -13,7 +13,7 @@ """ import os import logging -from Products.ZenUtils.Utils import unused, zenPath +from Products.ZenUtils.path import zenPath from Products.ZenModel.migrate import Migrate from Products.Zuul import getFacade diff --git a/Products/ZenModel/migrate/nginxConfigForZauth.py b/Products/ZenModel/migrate/nginxConfigForZauth.py index 71bfc414a5..153e705806 100644 --- a/Products/ZenModel/migrate/nginxConfigForZauth.py +++ b/Products/ZenModel/migrate/nginxConfigForZauth.py @@ -4,7 +4,7 @@ import re import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.0.0") diff --git a/Products/ZenModel/migrate/pagecommand.py b/Products/ZenModel/migrate/pagecommand.py index e0a41241ea..f8ee4422b0 100644 --- a/Products/ZenModel/migrate/pagecommand.py +++ b/Products/ZenModel/migrate/pagecommand.py @@ -39,7 +39,7 @@ def parseconfig(options): class OptionsBucket: pass -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class pagecommand(Migrate.Step): version = Migrate.Version(2, 2, 0) diff --git a/Products/ZenModel/migrate/processes.py b/Products/ZenModel/migrate/processes.py index beb953059f..02813b8faa 100644 --- a/Products/ZenModel/migrate/processes.py +++ b/Products/ZenModel/migrate/processes.py @@ -17,7 +17,7 @@ __version__ = "$Revision$"[11:-2] import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Processes(Migrate.Step): version = Migrate.Version(0, 22, 0) diff --git a/Products/ZenModel/migrate/procparams.py b/Products/ZenModel/migrate/procparams.py index 08e130bb67..94055c0cb8 100644 --- a/Products/ZenModel/migrate/procparams.py +++ b/Products/ZenModel/migrate/procparams.py @@ -14,7 +14,7 @@ ''' import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import os diff --git a/Products/ZenModel/migrate/removeClearHeartbeatsMenuItem.py b/Products/ZenModel/migrate/removeClearHeartbeatsMenuItem.py index f7e26a4cb5..87d16cfeb0 100644 --- a/Products/ZenModel/migrate/removeClearHeartbeatsMenuItem.py +++ b/Products/ZenModel/migrate/removeClearHeartbeatsMenuItem.py @@ -13,7 +13,6 @@ """ import os import logging -from Products.ZenUtils.Utils import unused, zenPath from Products.ZenModel.migrate import Migrate from Products.Zuul import getFacade diff --git a/Products/ZenModel/migrate/smtpsnpp.py b/Products/ZenModel/migrate/smtpsnpp.py index b8923b1b2c..665b06f7a8 100644 --- a/Products/ZenModel/migrate/smtpsnpp.py +++ b/Products/ZenModel/migrate/smtpsnpp.py @@ -38,7 +38,7 @@ def parseconfig(options): class OptionsBucket: pass -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class smtpsnpp(Migrate.Step): version = Migrate.Version(1, 0, 0) diff --git a/Products/ZenModel/migrate/standarderrormessage.py b/Products/ZenModel/migrate/standarderrormessage.py index c76117e8cc..796e4da85b 100644 --- a/Products/ZenModel/migrate/standarderrormessage.py +++ b/Products/ZenModel/migrate/standarderrormessage.py @@ -17,7 +17,7 @@ __version__ = "$Revision$"[11:-2] import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class StandardErrorMessage(Migrate.Step): version = Migrate.Version(0, 23, 0) diff --git a/Products/ZenModel/migrate/tests/test_addMariaDBLogFilters.py b/Products/ZenModel/migrate/tests/test_addMariaDBLogFilters.py index d7e159307e..f251ff2c3e 100644 --- a/Products/ZenModel/migrate/tests/test_addMariaDBLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addMariaDBLogFilters.py @@ -3,7 +3,7 @@ import unittest import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_addMariaDBLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): """ diff --git a/Products/ZenModel/migrate/tests/test_addNginxLogFilters.py b/Products/ZenModel/migrate/tests/test_addNginxLogFilters.py index 42599add0e..9d25af1b6e 100644 --- a/Products/ZenModel/migrate/tests/test_addNginxLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addNginxLogFilters.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_addRedisLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_addRabbitMQLogFilters.py b/Products/ZenModel/migrate/tests/test_addRabbitMQLogFilters.py index 95988ba153..82fa5b40fd 100644 --- a/Products/ZenModel/migrate/tests/test_addRabbitMQLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addRabbitMQLogFilters.py @@ -9,7 +9,7 @@ import common import unittest -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class test_addRabbitMQLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): """ diff --git a/Products/ZenModel/migrate/tests/test_addRedisLogFilters.py b/Products/ZenModel/migrate/tests/test_addRedisLogFilters.py index 796db4c925..a73042638c 100644 --- a/Products/ZenModel/migrate/tests/test_addRedisLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addRedisLogFilters.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_addRedisLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_addSolrService.py b/Products/ZenModel/migrate/tests/test_addSolrService.py index a371b1c245..1bde89f78f 100644 --- a/Products/ZenModel/migrate/tests/test_addSolrService.py +++ b/Products/ZenModel/migrate/tests/test_addSolrService.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_addSolrService(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_addThebeLogFilters.py b/Products/ZenModel/migrate/tests/test_addThebeLogFilters.py index 91b12b9809..78cc591a49 100644 --- a/Products/ZenModel/migrate/tests/test_addThebeLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addThebeLogFilters.py @@ -9,7 +9,7 @@ import common import unittest -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class test_addThebeLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): """ diff --git a/Products/ZenModel/migrate/tests/test_addZeneventserverstdioLogFilters.py b/Products/ZenModel/migrate/tests/test_addZeneventserverstdioLogFilters.py index 48297777d1..1155f7179d 100644 --- a/Products/ZenModel/migrate/tests/test_addZeneventserverstdioLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addZeneventserverstdioLogFilters.py @@ -9,7 +9,7 @@ import common import unittest -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class test_addZeneventserverstdioLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): """ diff --git a/Products/ZenModel/migrate/tests/test_addZookeeperLogFilters.py b/Products/ZenModel/migrate/tests/test_addZookeeperLogFilters.py index 9884e38307..9b0961ede1 100644 --- a/Products/ZenModel/migrate/tests/test_addZookeeperLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_addZookeeperLogFilters.py @@ -9,7 +9,7 @@ import common import unittest -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class test_addZookeeperLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): """ diff --git a/Products/ZenModel/migrate/tests/test_fixHbaseLogFilters.py b/Products/ZenModel/migrate/tests/test_fixHbaseLogFilters.py index c4e54acb31..56cb255104 100644 --- a/Products/ZenModel/migrate/tests/test_fixHbaseLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_fixHbaseLogFilters.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_fixHbaseLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_fixMetricShipperLogFilters.py b/Products/ZenModel/migrate/tests/test_fixMetricShipperLogFilters.py index d38a1d378f..ee2e64d76d 100644 --- a/Products/ZenModel/migrate/tests/test_fixMetricShipperLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_fixMetricShipperLogFilters.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_fixMetricShipperLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_fixOpentsdbLogFilters.py b/Products/ZenModel/migrate/tests/test_fixOpentsdbLogFilters.py index 1654da5cee..e6c29fd2eb 100644 --- a/Products/ZenModel/migrate/tests/test_fixOpentsdbLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_fixOpentsdbLogFilters.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_fixOpentsdbLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_fixZminionLogFilters.py b/Products/ZenModel/migrate/tests/test_fixZminionLogFilters.py index 28e8dfe315..c3aacbb079 100644 --- a/Products/ZenModel/migrate/tests/test_fixZminionLogFilters.py +++ b/Products/ZenModel/migrate/tests/test_fixZminionLogFilters.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_fixZminionLogFilters(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/tests/test_updateRegionServerGraphs.py b/Products/ZenModel/migrate/tests/test_updateRegionServerGraphs.py index baba184c4a..b286b159e9 100644 --- a/Products/ZenModel/migrate/tests/test_updateRegionServerGraphs.py +++ b/Products/ZenModel/migrate/tests/test_updateRegionServerGraphs.py @@ -5,7 +5,7 @@ import common -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Test_updateRegionServerGraphs(unittest.TestCase, common.ServiceMigrationTestCase): diff --git a/Products/ZenModel/migrate/twopointohobjects.py b/Products/ZenModel/migrate/twopointohobjects.py index 7ecb6bafb2..18bd09feb8 100644 --- a/Products/ZenModel/migrate/twopointohobjects.py +++ b/Products/ZenModel/migrate/twopointohobjects.py @@ -35,7 +35,7 @@ def _loopback(self, dmd): dmd.Devices.manage_addRRDTemplate('softwareLoopback') def _zCommandPath(self, dmd): - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath dmd.Devices.zCommandPath = zenPath('libexec') def _cleanupClass(self, dmd): diff --git a/Products/ZenModel/migrate/updateOpenTSDBOriginalConfig.py b/Products/ZenModel/migrate/updateOpenTSDBOriginalConfig.py index 9d1f1ca73c..8a66cd7d65 100644 --- a/Products/ZenModel/migrate/updateOpenTSDBOriginalConfig.py +++ b/Products/ZenModel/migrate/updateOpenTSDBOriginalConfig.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.5") diff --git a/Products/ZenModel/migrate/updateSolrConfigs.py b/Products/ZenModel/migrate/updateSolrConfigs.py index eb4445f7c9..c832e04a34 100644 --- a/Products/ZenModel/migrate/updateSolrConfigs.py +++ b/Products/ZenModel/migrate/updateSolrConfigs.py @@ -14,7 +14,7 @@ import logging import Migrate import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") diff --git a/Products/ZenModel/migrate/updateZeneventserverstdioLogPaths.py b/Products/ZenModel/migrate/updateZeneventserverstdioLogPaths.py index 1cebc04ad1..9c1db7eb4b 100644 --- a/Products/ZenModel/migrate/updateZeneventserverstdioLogPaths.py +++ b/Products/ZenModel/migrate/updateZeneventserverstdioLogPaths.py @@ -11,7 +11,7 @@ import Migrate import os import servicemigration as sm -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.migrate") sm.require("1.1.10") diff --git a/Products/ZenModel/migrate/winmodelerUnderModeler.py b/Products/ZenModel/migrate/winmodelerUnderModeler.py index 4db33ab418..f491d78c6d 100644 --- a/Products/ZenModel/migrate/winmodelerUnderModeler.py +++ b/Products/ZenModel/migrate/winmodelerUnderModeler.py @@ -16,7 +16,7 @@ class WinModelerUnderModeler(Migrate.Step): def cutover(self, dmd): import os - from Products.ZenUtils.Utils import binPath + from Products.ZenUtils.path import binPath os.system('%s stop >/dev/null 2>&1' % binPath('zenwinmodeler')) conn = dmd.ZenEventManager.connect() curr = conn.cursor() diff --git a/Products/ZenModel/migrate/zpsitecustomize.py b/Products/ZenModel/migrate/zpsitecustomize.py index eebda2131f..53cf4fea28 100644 --- a/Products/ZenModel/migrate/zpsitecustomize.py +++ b/Products/ZenModel/migrate/zpsitecustomize.py @@ -12,7 +12,7 @@ ''' import Migrate -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class zpSiteCustomize(Migrate.Step): version = Migrate.Version(2, 2, 0) diff --git a/Products/ZenModel/tests/testImport.py b/Products/ZenModel/tests/testImport.py index c3028061c1..7e7385444f 100644 --- a/Products/ZenModel/tests/testImport.py +++ b/Products/ZenModel/tests/testImport.py @@ -14,7 +14,7 @@ class TestImportEverything(BaseTestCase): def testImportEverything(self): import os - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath modules = ['ZenModel', 'ZenRelations', 'ZenRRD', 'ZenUtils', 'ZenEvents', 'ZenHub'] for module in modules: diff --git a/Products/ZenModel/zenbuild.py b/Products/ZenModel/zenbuild.py index f61c8505ca..eec28fa4df 100644 --- a/Products/ZenModel/zenbuild.py +++ b/Products/ZenModel/zenbuild.py @@ -22,7 +22,7 @@ import subprocess import sys -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils import Security from Products.ZenUtils.CmdBase import CmdBase diff --git a/Products/ZenModel/zendmd.py b/Products/ZenModel/zendmd.py index eda5cb5e44..51b0739ff6 100644 --- a/Products/ZenModel/zendmd.py +++ b/Products/ZenModel/zendmd.py @@ -86,7 +86,8 @@ from Products.CMFCore.utils import getToolByName from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import noSecurityManager -from Products.ZenUtils.Utils import zenPath, set_context +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import set_context from Products.ZenModel.IpNetwork import IpNetworkPrinterFactory from Products.ZenMessaging import audit from Products.Zuul.utils import safe_hasattr diff --git a/Products/ZenModel/zenmib.py b/Products/ZenModel/zenmib.py index d69c177e99..1105847ce9 100644 --- a/Products/ZenModel/zenmib.py +++ b/Products/ZenModel/zenmib.py @@ -62,7 +62,7 @@ PackageManager, SMIConfigFile, SMIDump, SMIDumpTool, ModuleManager, MibOrganizerPath, getMibModuleMap, MIBLoader ) -from Products.ZenUtils.Utils import zenPath, unused +from Products.ZenUtils.path import zenPath diff --git a/Products/ZenRRD/tests/testzenprocess.py b/Products/ZenRRD/tests/testzenprocess.py index bf7a2fd9e8..3d3f78c0fe 100644 --- a/Products/ZenRRD/tests/testzenprocess.py +++ b/Products/ZenRRD/tests/testzenprocess.py @@ -17,7 +17,7 @@ from Products.ZenHub.services.ProcessConfig import ProcessProxy from Products.ZenRRD.zenprocess import mapResultsToDicts, ZenProcessTask -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.testzenprocess") diff --git a/Products/ZenRelations/schemadoc.py b/Products/ZenRelations/schemadoc.py index d45a8fcc59..c72a458b37 100644 --- a/Products/ZenRelations/schemadoc.py +++ b/Products/ZenRelations/schemadoc.py @@ -13,7 +13,7 @@ import sys from Products.ZenRelations.utils import importClasses -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath logging.basicConfig() root = logging.getLogger() diff --git a/Products/ZenRelations/tests/testImport.py b/Products/ZenRelations/tests/testImport.py index c19d207400..1ea55b984a 100644 --- a/Products/ZenRelations/tests/testImport.py +++ b/Products/ZenRelations/tests/testImport.py @@ -15,7 +15,7 @@ class TestImportEverything(BaseTestCase): def testImportEverything(self): import os - from Products.ZenUtils.Utils import zenPath + from Products.ZenUtils.path import zenPath for fs, ds, d in os.walk(zenPath("Products", self.module)): for f in fs: diff --git a/Products/ZenReports/ReportLoader.py b/Products/ZenReports/ReportLoader.py index 1216371352..b3a07c53dc 100644 --- a/Products/ZenReports/ReportLoader.py +++ b/Products/ZenReports/ReportLoader.py @@ -19,7 +19,7 @@ import logging from Products.ZenUtils.ZCmdBase import ZCmdBase -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenModel.Report import Report diff --git a/Products/ZenReports/ReportServer.py b/Products/ZenReports/ReportServer.py index ee4b6a4620..f475bc2309 100644 --- a/Products/ZenReports/ReportServer.py +++ b/Products/ZenReports/ReportServer.py @@ -26,7 +26,8 @@ from Products.ZenModel.ZenModelRM import ZenModelRM from Products.ZenModel.ZenossSecurity import ZEN_COMMON -from Products.ZenUtils.Utils import importClass, zenPath +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import importClass log = logging.getLogger('zen.reportserver') diff --git a/Products/ZenStatus/zenping.py b/Products/ZenStatus/zenping.py index 87461c0971..6336584c40 100644 --- a/Products/ZenStatus/zenping.py +++ b/Products/ZenStatus/zenping.py @@ -26,7 +26,8 @@ from Products.ZenCollector.daemon import CollectorDaemon from Products.ZenUtils import IpUtil from Products.ZenUtils.FileCache import FileCache -from Products.ZenUtils.Utils import unused, zenPath +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import unused # perform some imports to allow twisted's PB to serialize these objects from Products.ZenCollector.services.config import DeviceProxy diff --git a/Products/ZenUI3/browser/testing.py b/Products/ZenUI3/browser/testing.py index 2c36bab3e9..68e9c1403c 100644 --- a/Products/ZenUI3/browser/testing.py +++ b/Products/ZenUI3/browser/testing.py @@ -11,7 +11,7 @@ log = logging.getLogger('zen.UITests') from Products.Five.browser import BrowserView from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUI3.browser.javascript import getAllZenPackResources diff --git a/Products/ZenUI3/browser/views.py b/Products/ZenUI3/browser/views.py index 4202221e07..e3ec6bf41e 100644 --- a/Products/ZenUI3/browser/views.py +++ b/Products/ZenUI3/browser/views.py @@ -21,7 +21,7 @@ from Products import Zuul from Products.ZenUtils.guid.interfaces import IGUIDManager from Products.ZenUtils.virtual_root import IVirtualRoot -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenModel.DataRoot import DataRoot diff --git a/Products/ZenUtils/CmdBase.py b/Products/ZenUtils/CmdBase.py index 6ac50b3f88..0118175f6f 100644 --- a/Products/ZenUtils/CmdBase.py +++ b/Products/ZenUtils/CmdBase.py @@ -36,7 +36,8 @@ # See http://dev.zenoss.org/trac/ticket/3146 for details from Products.ZenUtils.PkgResources import pkg_resources -from Products.ZenUtils.Utils import unused, load_config_override, zenPath, getAllParserOptionsGen +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import unused, load_config_override, getAllParserOptionsGen from Products.ZenUtils.GlobalConfig import _convertConfigLinesToArguments, applyGlobalConfToParser unused(pkg_resources) diff --git a/Products/ZenUtils/ConfDaemon.py b/Products/ZenUtils/ConfDaemon.py index 29fa1003e4..01b04cc024 100644 --- a/Products/ZenUtils/ConfDaemon.py +++ b/Products/ZenUtils/ConfDaemon.py @@ -23,7 +23,7 @@ import time from CmdBase import CmdBase -from Utils import zenPath +from .path import zenPath class ConfDaemon(CmdBase): diff --git a/Products/ZenUtils/EggifyZenPack.py b/Products/ZenUtils/EggifyZenPack.py index 4123ce769e..580e0829b4 100644 --- a/Products/ZenUtils/EggifyZenPack.py +++ b/Products/ZenUtils/EggifyZenPack.py @@ -10,9 +10,9 @@ __doc__ = "Convert old-style zenpacks to zenpack eggs" +from Pruducts.ZenUtils.path import zenPath from Products.ZenUtils.ZenScriptBase import ZenScriptBase from Products.ZenModel.ZenPack import ZenPackException -from Utils import zenPath import ZenPackCmd import os, sys import shutil diff --git a/Products/ZenUtils/GlobalConfig.py b/Products/ZenUtils/GlobalConfig.py index 3244e5c6c1..c932c54d7b 100644 --- a/Products/ZenUtils/GlobalConfig.py +++ b/Products/ZenUtils/GlobalConfig.py @@ -15,7 +15,8 @@ import re import os.path -from Products.ZenUtils.Utils import zenPath, getAllParserOptionsGen +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import getAllParserOptionsGen from Products.ZenUtils.config import Config, ConfigLoader diff --git a/Products/ZenUtils/RunCommand.py b/Products/ZenUtils/RunCommand.py index a36054b7ac..06f8aa84bd 100755 --- a/Products/ZenUtils/RunCommand.py +++ b/Products/ZenUtils/RunCommand.py @@ -28,7 +28,7 @@ import signal from Products.ZenUtils.ZenScriptBase import ZenScriptBase -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class CollectorStats: diff --git a/Products/ZenUtils/Watchdog.py b/Products/ZenUtils/Watchdog.py index b222ac4067..ef630ab441 100644 --- a/Products/ZenUtils/Watchdog.py +++ b/Products/ZenUtils/Watchdog.py @@ -16,7 +16,7 @@ ''' -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath import logging import socket as s diff --git a/Products/ZenUtils/ZCmdBase.py b/Products/ZenUtils/ZCmdBase.py index a1f309be24..051d822f51 100644 --- a/Products/ZenUtils/ZCmdBase.py +++ b/Products/ZenUtils/ZCmdBase.py @@ -24,7 +24,8 @@ from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import noSecurityManager -from Products.ZenUtils.Utils import getObjByPath, zenPath +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import getObjByPath from Products.ZenUtils.ZodbFactory import IZodbFactoryLookup from Exceptions import ZentinelException diff --git a/Products/ZenUtils/ZenBackup.py b/Products/ZenUtils/ZenBackup.py index 428981d5f3..7cf4304747 100755 --- a/Products/ZenUtils/ZenBackup.py +++ b/Products/ZenUtils/ZenBackup.py @@ -28,7 +28,8 @@ from itertools import imap from ZCmdBase import ZCmdBase -from Products.ZenUtils.Utils import zenPath, binPath, readable_time, unused +from Products.ZenUtils.path import binPath, zenPath +from Products.ZenUtils.Utils import readable_time from ZenBackupBase import * from zope.interface import implements from Products.Zuul.interfaces import IPreBackupEvent, IPostBackupEvent diff --git a/Products/ZenUtils/ZenCheckZenDS.py b/Products/ZenUtils/ZenCheckZenDS.py index 7705740132..9f9b94faaf 100644 --- a/Products/ZenUtils/ZenCheckZenDS.py +++ b/Products/ZenUtils/ZenCheckZenDS.py @@ -19,7 +19,7 @@ from Products.ZenUtils.config import ConfigFile from Products.ZenUtils.configlog import ZenRotatingFileHandler -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath logging.basicConfig(level=logging.INFO) LOG = logging.getLogger("zen.zencheckzends") diff --git a/Products/ZenUtils/ZenDaemon.py b/Products/ZenUtils/ZenDaemon.py index 2e33408841..7e7fda39f6 100755 --- a/Products/ZenUtils/ZenDaemon.py +++ b/Products/ZenUtils/ZenDaemon.py @@ -26,7 +26,8 @@ from Products.ZenMessaging.audit import audit from Products.ZenUtils.CmdBase import CmdBase -from Products.ZenUtils.Utils import zenPath, HtmlFormatter, binPath, setLogLevel +from Products.ZenUtils.path import binPath, zenPath +from Products.ZenUtils.Utils import HtmlFormatter, setLogLevel from Products.ZenUtils.Watchdog import Reporter from Products.Zuul.utils import safe_hasattr as hasattr from Products.ZenUtils.dumpthreads import dump_threads diff --git a/Products/ZenUtils/ZenPackCmd.py b/Products/ZenUtils/ZenPackCmd.py index b688b2a369..951a8f08d5 100644 --- a/Products/ZenUtils/ZenPackCmd.py +++ b/Products/ZenUtils/ZenPackCmd.py @@ -12,7 +12,8 @@ from ZODB.transact import transact from Products.ZenUtils.ZenScriptBase import ZenScriptBase -from Products.ZenUtils.Utils import cleanupSkins, zenPath, binPath, getObjByPath,atomicWrite, varPath +from Products.ZenUtils.path import binPath, varPath, zenPath +from Products.ZenUtils.Utils import cleanupSkins, getObjByPath, atomicWrite from Products.ZenModel import ZVersion from Products.ZenModel.ZenPack import ZenPackException, \ diff --git a/Products/ZenUtils/ZenPackDaemons.py b/Products/ZenUtils/ZenPackDaemons.py index b680315505..b8de119a22 100644 --- a/Products/ZenUtils/ZenPackDaemons.py +++ b/Products/ZenUtils/ZenPackDaemons.py @@ -19,7 +19,7 @@ from Products.ZenUtils.ZenScriptBase import ZenScriptBase from Products.ZenUtils.ZenPackCmd import ZENPACK_ENTRY_POINT from Products.ZenModel.ZenPackLoader import ZPLDaemons -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class ZenPackDaemons(ZenScriptBase): diff --git a/Products/ZenUtils/ZenRestore.py b/Products/ZenUtils/ZenRestore.py index 48e0e749d4..85cf7d7c73 100755 --- a/Products/ZenUtils/ZenRestore.py +++ b/Products/ZenUtils/ZenRestore.py @@ -22,7 +22,8 @@ import ConfigParser from ZCmdBase import ZCmdBase -from Products.ZenUtils.Utils import zenPath, binPath, requiresDaemonShutdown +from Products.ZenUtils.path import binPath, zenPath +from Products.ZenUtils.Utils import requiresDaemonShutdown from ZenBackupBase import * diff --git a/Products/ZenUtils/ZenScriptBase.py b/Products/ZenUtils/ZenScriptBase.py index 5493c7e0e4..1ea0d58b3d 100644 --- a/Products/ZenUtils/ZenScriptBase.py +++ b/Products/ZenUtils/ZenScriptBase.py @@ -19,7 +19,8 @@ from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import noSecurityManager from transaction import commit -from Products.ZenUtils.Utils import getObjByPath, zenPath, set_context +from Products.ZenUtils.path import zenPath +from Products.ZenUtils.Utils import getObjByPath, set_context from Products.ZenUtils.CmdBase import CmdBase from Products.ZenUtils.ZodbFactory import IZodbFactoryLookup diff --git a/Products/ZenUtils/configlog.py b/Products/ZenUtils/configlog.py index ccc2ca0c40..5e047c0636 100644 --- a/Products/ZenUtils/configlog.py +++ b/Products/ZenUtils/configlog.py @@ -35,7 +35,7 @@ from logging.handlers import RotatingFileHandler from logging.handlers import TimedRotatingFileHandler -from .Utils import zenPath +from .path import zenPath log = logging.getLogger("zen.configlog") diff --git a/Products/ZenUtils/dbverify.py b/Products/ZenUtils/dbverify.py index 143f2eb8c6..5aacb13552 100755 --- a/Products/ZenUtils/dbverify.py +++ b/Products/ZenUtils/dbverify.py @@ -13,7 +13,7 @@ from optparse import OptionParser import subprocess import re -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class Main(object): diff --git a/Products/ZenUtils/deprecated.py b/Products/ZenUtils/deprecated.py index b16076be9a..b7361d11b8 100644 --- a/Products/ZenUtils/deprecated.py +++ b/Products/ZenUtils/deprecated.py @@ -12,7 +12,7 @@ import logging import traceback from decorator import decorator -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath class DeprecatedLogger(object): diff --git a/Products/ZenUtils/mib/tests/test_smidump.py b/Products/ZenUtils/mib/tests/test_smidump.py index 2108813819..b888449264 100644 --- a/Products/ZenUtils/mib/tests/test_smidump.py +++ b/Products/ZenUtils/mib/tests/test_smidump.py @@ -13,7 +13,7 @@ from subprocess import PIPE from unittest import TestCase -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils.mib import SMIConfigFile, SMIDump, SMIDumpTool, MIBFile from Products.ZenUtils.mib import smidump diff --git a/Products/ZenUtils/tbdetail.py b/Products/ZenUtils/tbdetail.py index 5f25fb7f99..7efa043d5d 100644 --- a/Products/ZenUtils/tbdetail.py +++ b/Products/ZenUtils/tbdetail.py @@ -11,7 +11,7 @@ import re import cgitb from cStringIO import StringIO -from Products.ZenUtils.Utils import unused, zenPath +from Products.ZenUtils.path import zenPath _PATTERN = re.compile( diff --git a/Products/ZenUtils/tests/testDeprecated.py b/Products/ZenUtils/tests/testDeprecated.py index 09ef971374..ffa0c8c9c9 100644 --- a/Products/ZenUtils/tests/testDeprecated.py +++ b/Products/ZenUtils/tests/testDeprecated.py @@ -19,7 +19,7 @@ import os.path import Globals from Products.ZenTestCase.BaseTestCase import BaseTestCase -from Products.ZenUtils.Utils import zenPath # TODO: this test shouldn't rely on zenPath +from Products.ZenUtils.path import zenPath from Products.ZenUtils.deprecated import deprecated, DeprecatedLogger TEST_LOGFILE = 'dEpReCaTeD.TeStLoG' # something unique diff --git a/Products/ZenUtils/tests/testFindEggs.py b/Products/ZenUtils/tests/testFindEggs.py index 2e67771edd..6bb19fe5b0 100644 --- a/Products/ZenUtils/tests/testFindEggs.py +++ b/Products/ZenUtils/tests/testFindEggs.py @@ -14,7 +14,7 @@ from Products.ZenTestCase.BaseTestCase import BaseTestCase from Products.ZenUtils.zenpack import ZenPackCmd -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath @contextmanager diff --git a/Products/ZenUtils/zenpack.py b/Products/ZenUtils/zenpack.py index 0abecf6c56..387010c540 100644 --- a/Products/ZenUtils/zenpack.py +++ b/Products/ZenUtils/zenpack.py @@ -40,7 +40,8 @@ ZenPackNeedMigrateException ) from Products.ZenUtils.ZenScriptBase import ZenScriptBase -from Products.ZenUtils.Utils import cleanupSkins, zenPath, binPath, varPath, get_temp_dir +from Products.ZenUtils.path import binPath, varPath, zenPath +from Products.ZenUtils.Utils import cleanupSkins, get_temp_dir import Products.ZenModel.ZenPackLoader as ZPL from Products.ZenModel.ZenPackLoader import CONFIG_FILE, CONFIG_SECTION_ABOUT from Products.ZenModel.ZVersion import VERSION diff --git a/Products/ZenWidgets/Portlet.py b/Products/ZenWidgets/Portlet.py index 6fd6af4ec7..92cb2c2118 100644 --- a/Products/ZenWidgets/Portlet.py +++ b/Products/ZenWidgets/Portlet.py @@ -17,7 +17,7 @@ from Products.ZenModel.ZenModelRM import ZenModelRM from Products.ZenModel.ZenossSecurity import ZEN_COMMON from Products.ZenRelations.RelSchema import ToManyCont, ToOne -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath log = logging.getLogger("zen.Portlet") diff --git a/Products/Zuul/facades/mibfacade.py b/Products/Zuul/facades/mibfacade.py index 66f9018b52..bc5cefdd52 100644 --- a/Products/Zuul/facades/mibfacade.py +++ b/Products/Zuul/facades/mibfacade.py @@ -20,7 +20,8 @@ MibOrganizerNode, MibNode, FakeTopLevelNodeInfo ) from Products.Jobber.jobs import SubprocessJob -from Products.ZenUtils.Utils import binPath, snmptranslate +from Products.ZenUtils.path import binPath +from Products.ZenUtils.Utils import snmptranslate from Products.ZenModel.MibOrganizer import MibOrganizer from Products.ZenModel.MibModule import MibModule diff --git a/Products/Zuul/facades/networkfacade.py b/Products/Zuul/facades/networkfacade.py index 8194d96f7a..755b04b545 100644 --- a/Products/Zuul/facades/networkfacade.py +++ b/Products/Zuul/facades/networkfacade.py @@ -14,7 +14,7 @@ from Products.ZenModel.IpNetwork import AutoDiscoveryJob from Products.ZenWidgets.messaging import IMessageSender from Products.Jobber.jobs import SubprocessJob -from Products.ZenUtils.Utils import binPath +from Products.ZenUtils.path import binPath from Products.Zuul import getFacade from Products.Zuul.catalog.interfaces import IModelCatalogTool from Products.Zuul.facades import TreeFacade diff --git a/Products/Zuul/facades/processfacade.py b/Products/Zuul/facades/processfacade.py index d488ca5cd3..c9c8d2b104 100644 --- a/Products/Zuul/facades/processfacade.py +++ b/Products/Zuul/facades/processfacade.py @@ -158,7 +158,7 @@ def getProcessList(self, deviceGuid): s = '' try: import subprocess - from Products.ZenUtils.Utils import binPath + from Products.ZenUtils.path import binPath device = IGUIDManager(self._dmd).getObject(deviceGuid) s = '# ' + device.id zenmodelerOpts = ['run', '--now', '--debug', '-v10', '-d', device.id] diff --git a/Products/Zuul/routers/nav.py b/Products/Zuul/routers/nav.py index 37b19c4f76..eb939a77a4 100644 --- a/Products/Zuul/routers/nav.py +++ b/Products/Zuul/routers/nav.py @@ -18,7 +18,7 @@ from Products.ZenUtils.Ext import DirectRouter from Products.ZenUtils.extdirect.router import DirectResponse from Products.ZenUI3.security.security import permissionsForContext -from Products.ZenUtils.Utils import zenPath +from Products.ZenUtils.path import zenPath # page stats logger log = logging.getLogger('zen.pagestats') # create file handler which logs even debug messages