Changeset 1254 for opsi/server/dass-opsi-tools/usr/bin
- Timestamp:
- Feb 15, 2021, 6:34:36 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
opsi/server/dass-opsi-tools/usr/bin/opsiclient
r1239 r1254 8 8 9 9 __author__ = "Joerg Steffens" 10 __copyright__ = "Copyright 2012-20 18, dass IT GmbH"10 __copyright__ = "Copyright 2012-2021, dass IT GmbH" 11 11 __license__ = "GPL" 12 __version__ = "1. 2"12 __version__ = "1.3" 13 13 __email__ = "joerg.steffens@dass-it.de" 14 14 … … 30 30 import time 31 31 32 try: 33 import jsonrpc 34 except ImportError: 35 import jsonrpclib 36 32 from tinyrpc.protocols.jsonrpc import JSONRPCProtocol 33 from tinyrpc.transports.http import HttpPostClientTransport 34 from tinyrpc import RPCClient 37 35 38 36 UrlJsonRpc="https://<username>:<password>@opsi:4447/rpc" … … 89 87 self.nagios=nagios 90 88 self.urlJsonRpc=urlJsonRpc 91 if 'jsonrpc' in sys.modules: 92 self.rpc=jsonrpc.ServiceProxy(self.urlJsonRpc) 93 else: 94 self.rpc=jsonrpclib.ServerProxy(self.urlJsonRpc) 89 self.rpc = RPCClient(JSONRPCProtocol(), HttpPostClientTransport(self.urlJsonRpc, verify=False)).get_proxy() 90 95 91 self.logger.debug( "initialized: " + self.urlJsonRpc ) 96 92 self.logger.debug(dir(self.rpc))
Note:
See TracChangeset
for help on using the changeset viewer.