-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathawsfacade.py
31 lines (25 loc) · 1.05 KB
/
awsfacade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2010, 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
log = logging.getLogger('zen.AWSFacade')
from zope.interface import implements
from Products.Zuul.facades import ZuulFacade
from ZenPacks.zenoss.ZenAWS.interfaces import IAWSFacade
class AWSFacade(ZuulFacade):
implements(IAWSFacade)
"""
Facade for the AWS ZenPack
"""
def configure(self, access_id, secret,
devicePath='', devicePathForWindows=''):
# There is one special host 'EC2Manager' which *MUST* exist
mgrPath = '/zport/dmd/Devices/AWS/EC2/devices/EC2Manager'
mgr = self._dmd.restrictedTraverse(mgrPath)
mgr.manage_editEC2Manager(access_id, secret,
devicePath, devicePathForWindows)