Skip to content

Commit

Permalink
Add warning to VDC keystore update method
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianmo committed Sep 26, 2017
1 parent 6d20dd4 commit 0231f84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ecsclient/common/provisioning/vdc_keystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def get(self):
def set(self, private_key, certificate_chain):
"""
Set the private key and certificate chain being used by ECS.
WARNING: Note that the certificate will not be updated until ECS is
restarted. Restarting ECS is out of the scope of this library.
Required role(s):
Expand All @@ -51,5 +53,6 @@ def set(self, private_key, certificate_chain):
}
}

log.info("Setting the private key and certificate chain")
log.info("Setting the private key and certificate chain (ECS must be "
"restarted for this change to take effect)")
return self.conn.put('vdc/keystore', json_payload=payload)
3 changes: 2 additions & 1 deletion tests/functional/test_vdc_keystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ def test_vdc_keystore_set(self):
certificate = helper.get_sample_certificate()
response = self.client.vdc_keystore.set(private_key, certificate)
self.assertValidSchema(response, schemas.VDC_KEYSTORE)
# TODO: Find out why the returned certificate different
# Can't validate the certificate and private key at this point
# because it does not take effect until the ECS is manually restarted
# self.assertSameCertificate(certificate, response['chain'])

0 comments on commit 0231f84

Please sign in to comment.