36be4bf575
* This depends on the approval of vishy's changes here: https://review.openstack.org/#change,3199 * Adds novaclient library code, and cli. CLI Use: nova x509-create-cert [private_key_filename] [cert_filename] nova x509-get-root-cert [cert_filename] Change-Id: If5b833b90bfb5bc16ea4636abb667717a67065d3
21 lines
547 B
Python
21 lines
547 B
Python
from novaclient import exceptions
|
|
from novaclient.v1_1 import certs
|
|
from tests import utils
|
|
from tests.v1_1 import fakes
|
|
|
|
|
|
cs = fakes.FakeClient()
|
|
|
|
|
|
class FlavorsTest(utils.TestCase):
|
|
|
|
def test_create_cert(self):
|
|
cert = cs.certs.create()
|
|
cs.assert_called('POST', '/os-certificates')
|
|
self.assertTrue(isinstance(cert, certs.Certificate))
|
|
|
|
def test_get_root_cert(self):
|
|
cert = cs.certs.get()
|
|
cs.assert_called('GET', '/os-certificates/root')
|
|
self.assertTrue(isinstance(cert, certs.Certificate))
|