Revision d57ae7f7
b/lib/rpc.py | ||
---|---|---|
92 | 92 |
self.port = utils.GetNodeDaemonPort() |
93 | 93 |
self.nc = {} |
94 | 94 |
|
95 |
self._ssl_params = \ |
|
96 |
http.HttpSslParams(ssl_key_path=constants.SSL_CERT_FILE, |
|
97 |
ssl_cert_path=constants.SSL_CERT_FILE) |
|
98 |
|
|
95 | 99 |
def ConnectList(self, node_list, address_list=None): |
96 | 100 |
"""Add a list of nodes to the target nodes. |
97 | 101 |
|
... | ... | |
122 | 126 |
if address is None: |
123 | 127 |
address = name |
124 | 128 |
|
125 |
# TODO: Cache key and certificate for different requests |
|
126 |
ssl_params = http.HttpSslParams(ssl_key_path=constants.SSL_CERT_FILE, |
|
127 |
ssl_cert_path=constants.SSL_CERT_FILE) |
|
128 |
|
|
129 | 129 |
self.nc[name] = http.HttpClientRequest(address, self.port, http.HTTP_PUT, |
130 | 130 |
"/%s" % self.procedure, |
131 | 131 |
post_data=self.body, |
132 |
ssl_params=ssl_params, |
|
132 |
ssl_params=self._ssl_params,
|
|
133 | 133 |
ssl_verify_peer=True) |
134 | 134 |
|
135 | 135 |
def GetResults(self): |
... | ... | |
150 | 150 |
results[name] = serializer.LoadJson(req.resp_body) |
151 | 151 |
continue |
152 | 152 |
|
153 |
# TODO: Better error reporting |
|
153 | 154 |
if req.error: |
154 | 155 |
msg = req.error |
155 | 156 |
else: |
Also available in: Unified diff