- def make_connection(self, host):\r
- # create a HTTPS connection object from a host descriptor\r
- # host may be a string, or a (host, x509-dict) tuple\r
- import httplib\r
- host, extra_headers, x509 = self.get_host_info(host)\r
- try:\r
- HTTPS = httplib.HTTPS()\r
- except AttributeError:\r
- raise NotImplementedError(\r
- "your version of httplib doesn't support HTTPS"\r
- )\r
- else:\r
- return httplib.HTTPS(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {}))\r
-\r
- def getparser(self):\r
- unmarshaller = ExceptionUnmarshaller()\r
- parser = xmlrpclib.ExpatParser(unmarshaller)\r
- return parser, unmarshaller\r
-\r
-##\r
-# The GeniClient class provides stubs for executing Geni operations. A given\r
-# client object connects to one server. To connect to multiple servers, create\r
-# multiple GeniClient objects.\r
-#\r
-# The Geni protocol uses an HTTPS connection, and the client's side of the\r
-# connection uses his private key. Generally, this private key must match the\r
-# public key that is containing in the GID that the client is providing for\r
-# those functions that take a GID.\r
-\r
+ def make_connection(self, host):
+ # create a HTTPS connection object from a host descriptor
+ # host may be a string, or a (host, x509-dict) tuple
+ import httplib
+ host, extra_headers, x509 = self.get_host_info(host)
+ try:
+ HTTPS = httplib.HTTPS()
+ except AttributeError:
+ raise NotImplementedError(
+ "your version of httplib doesn't support HTTPS"
+ )
+ else:
+ return httplib.HTTPS(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {}))
+
+ def getparser(self):
+ unmarshaller = ExceptionUnmarshaller()
+ parser = xmlrpclib.ExpatParser(unmarshaller)
+ return parser, unmarshaller
+
+##
+# The GeniClient class provides stubs for executing Geni operations. A given
+# client object connects to one server. To connect to multiple servers, create
+# multiple GeniClient objects.
+#
+# The Geni protocol uses an HTTPS connection, and the client's side of the
+# connection uses his private key. Generally, this private key must match the
+# public key that is containing in the GID that the client is providing for
+# those functions that take a GID.
+