Add project_id field to ssl_cert GET response
Change-Id: I48d60678c20f15351fbcc0f951e47af75a92a4f6
This commit is contained in:
parent
c36d1d0c39
commit
ac9c1b99ea
|
@ -22,7 +22,7 @@ from poppy.common import util
|
|||
|
||||
class Model(collections.OrderedDict):
|
||||
|
||||
'response class for SSLCertificate'
|
||||
"""response class for SSLCertificate."""
|
||||
|
||||
def __init__(self, ssl_certificate):
|
||||
super(Model, self).__init__()
|
||||
|
@ -31,3 +31,4 @@ class Model(collections.OrderedDict):
|
|||
self['cert_type'] = ssl_certificate.cert_type
|
||||
self['cert_details'] = ssl_certificate.cert_details
|
||||
self['status'] = ssl_certificate.get_cert_status()
|
||||
self['project_id'] = ssl_certificate.project_id
|
||||
|
|
|
@ -78,6 +78,7 @@ class TestCreateSSLCertificate(base.TestBase):
|
|||
self.assertEqual(cert['domain_name'], self.domain_name)
|
||||
self.assertEqual(cert['flavor_id'], flavor_id)
|
||||
self.assertEqual(cert['cert_type'], self.cert_type)
|
||||
self.assertEqual(cert['project_id'], project_id)
|
||||
|
||||
def tearDown(self):
|
||||
# Do not call delete cert for negative test
|
||||
|
|
|
@ -109,6 +109,8 @@ class SSLCertificateControllerTest(base.FunctionalTest):
|
|||
response_list[0]["domain_name"])
|
||||
self.assertEqual(ssl_certificate_json["flavor_id"],
|
||||
response_list[0]["flavor_id"])
|
||||
self.assertEqual(ssl_certificate_json["project_id"],
|
||||
response_list[0]["project_id"])
|
||||
|
||||
def test_get_ssl_certificate_existing_domain_different_project_id(self):
|
||||
domain = 'www.iexist.com'
|
||||
|
|
Loading…
Reference in New Issue