Revision 5b6f9e35 lib/cmdlib/common.py
b/lib/cmdlib/common.py | ||
---|---|---|
1216 | 1216 |
|
1217 | 1217 |
# Everything else: |
1218 | 1218 |
return False |
1219 |
|
|
1220 |
|
|
1221 |
def AddNodeCertToCandidateCerts(lu, node_uuid, cluster): |
|
1222 |
"""Add the node's client SSL certificate digest to the candidate certs. |
|
1223 |
|
|
1224 |
@type node_uuid: string |
|
1225 |
@param node_uuid: the node's UUID |
|
1226 |
@type cluster: C{object.Cluster} |
|
1227 |
@param cluster: the cluster's configuration |
|
1228 |
|
|
1229 |
""" |
|
1230 |
result = lu.rpc.call_node_crypto_tokens( |
|
1231 |
node_uuid, [constants.CRYPTO_TYPE_SSL_DIGEST]) |
|
1232 |
result.Raise("Could not retrieve the node's (uuid %s) SSL digest." |
|
1233 |
% node_uuid) |
|
1234 |
((crypto_type, digest), ) = result.payload |
|
1235 |
assert crypto_type == constants.CRYPTO_TYPE_SSL_DIGEST |
|
1236 |
|
|
1237 |
utils.AddNodeToCandidateCerts(node_uuid, digest, cluster.candidate_certs) |
Also available in: Unified diff