Rename replicationcontroller_data to manifest
Change-Id: Ib79f3b54557a19c818e19a815926aebf64cfb54a
This commit is contained in:
parent
099003d99e
commit
7d8a68d9e2
|
@ -89,7 +89,7 @@ class ReplicationController(base.APIBase):
|
|||
manifest_url = wtypes.text
|
||||
"""URL for ReplicationController file to create the RC"""
|
||||
|
||||
replicationcontroller_data = wtypes.text
|
||||
manifest = wtypes.text
|
||||
"""Data for service to create the ReplicationController"""
|
||||
|
||||
links = wsme.wsattr([link.Link], readonly=True)
|
||||
|
@ -159,9 +159,9 @@ class ReplicationController(base.APIBase):
|
|||
# Set replication controller name and labels from its manifest
|
||||
# TODO(jay-lau-513): retrieve replication controller name from
|
||||
# manifest_url
|
||||
if (hasattr(self, "replicationcontroller_data")
|
||||
and self.replicationcontroller_data is not None):
|
||||
manifest = k8s_manifest.parse(self.replicationcontroller_data)
|
||||
if (hasattr(self, "manifest")
|
||||
and self.manifest is not None):
|
||||
manifest = k8s_manifest.parse(self.manifest)
|
||||
self.name = manifest["id"]
|
||||
if "labels" in manifest:
|
||||
self.labels = manifest["labels"]
|
||||
|
@ -330,8 +330,8 @@ class ReplicationControllersController(rest.RestController):
|
|||
# ignore manifest_url as it was used for create rc
|
||||
if field == 'manifest_url':
|
||||
continue
|
||||
# ignore replicationcontroller_data as it was used for create rc
|
||||
if field == 'replicationcontroller_data':
|
||||
# ignore manifest as it was used for create rc
|
||||
if field == 'manifest':
|
||||
continue
|
||||
try:
|
||||
patch_val = getattr(rc, field)
|
||||
|
|
|
@ -32,7 +32,7 @@ class TestRCController(db_base.DbTestCase):
|
|||
params = '''
|
||||
{
|
||||
"bay_uuid": "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
|
||||
"replicationcontroller_data": "\
|
||||
"manifest": "\
|
||||
{\
|
||||
\\"id\\": \\"name_of_rc\\", \
|
||||
\\"replicas\\": 3, \
|
||||
|
|
Loading…
Reference in New Issue