Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cluther committed Sep 13, 2013
2 parents 2ee6753 + a71c210 commit ecdda83
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
21 changes: 21 additions & 0 deletions ZenPacks/zenoss/CloudStack/locallibs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2013, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################


def add_local_lib_path():
'''
Helper to add the ZenPack's lib directory to sys.path.
'''
import os
import site

site.addsitedir(os.path.join(os.path.dirname(__file__), 'lib'))


add_local_lib_path()
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
from Products.DataCollector.plugins.CollectorPlugin import PythonPlugin
from Products.DataCollector.plugins.DataMaps import ObjectMap, RelationshipMap

from ZenPacks.zenoss.CloudStack.utils import add_local_lib_path
add_local_lib_path()
# Imported or side effect of adding ZenPack's lib directory to sys.path.
import ZenPacks.zenoss.CloudStack.locallibs

# Requires that locallibs first be imported.
import txcloudstack


Expand Down
5 changes: 3 additions & 2 deletions ZenPacks/zenoss/CloudStack/poll_cloudstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
from twisted.internet import reactor
from twisted.internet.defer import DeferredList

from utils import add_local_lib_path
add_local_lib_path()
# Imported or side effect of adding ZenPack's lib directory to sys.path.
import locallibs

# Requires that locallibs first be imported.
import txcloudstack

# Map of listEvents level response parameter to Zenoss severity.
Expand Down
6 changes: 4 additions & 2 deletions ZenPacks/zenoss/CloudStack/tests/testTXCloudStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@

from Products.ZenTestCase.BaseTestCase import BaseTestCase

from ZenPacks.zenoss.CloudStack.utils import add_local_lib_path
from ZenPacks.zenoss.CloudStack.tests.utils import mockGetPage

add_local_lib_path()
# Imported or side effect of adding ZenPack's lib directory to sys.path.
import ZenPacks.zenoss.CloudStack.locallibs

# Requires that locallibs first be imported.
import txcloudstack


Expand Down
8 changes: 0 additions & 8 deletions ZenPacks/zenoss/CloudStack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
from Products.ZenUtils.guid.interfaces import IGlobalIdentifier


def add_local_lib_path():
"""Helper to add the ZenPack's lib directory to PYTHONPATH."""
import os
import site

site.addsitedir(os.path.join(os.path.dirname(__file__), 'lib'))


def guid(obj):
'''
Return GUID for obj.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# or saved. Do not modify them directly here.
# NB: PACKAGES is deprecated
NAME = "ZenPacks.zenoss.CloudStack"
VERSION = "1.1.0"
VERSION = "1.1.1"
AUTHOR = "Zenoss Labs <labs@zenoss.com>"
LICENSE = "GPLv2"
NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss']
Expand Down

0 comments on commit ecdda83

Please sign in to comment.