Rename config_sync_status field

This commits updates the 'config_sync_status' field name to
'deploy_config_sync_status' in order to distiguish from the
config-out-of-date information related to the 250.001 alarm.

Test Plan:
PASS: Build distributedcloud package. Install it on a DC system
alongside the client changes. Verify that the client receives
the updated field name and that the name printed on the output
command is the expected.
PASS: Verify the correct functionality of the 'dcmanager
subcloud show --detail' command.

Story: 2010719
Task: 48089

Change-Id: I8e573947dfa61700f15bba4313939bb7a7959d53
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
This commit is contained in:
Enzo Candotti 2023-05-24 16:58:40 -03:00
parent 217b207b68
commit e2985c370e
3 changed files with 8 additions and 7 deletions

View File

@ -21,7 +21,7 @@
"data_install": null,
"data_upgrade": null,
"oam_floating_ip": "192.168.101.2",
"config_sync_status": "Deployment: configurations up-to-date"
"deploy_config_sync_status": "Deployment: configurations up-to-date"
"endpoint_sync_status": [
{
"sync_status": "in-sync",

View File

@ -1216,7 +1216,7 @@ class SubcloudsController(object):
if detail is not None:
oam_floating_ip = "unavailable"
config_sync_status = "unknown"
deploy_config_sync_status = "unknown"
if subcloud.availability_status == dccommon_consts.AVAILABILITY_ONLINE:
# Get the keystone client that will be used
@ -1230,10 +1230,10 @@ class SubcloudsController(object):
deploy_config_state = self._get_deploy_config_sync_status(
context, subcloud.name, sc_ks_client)
if deploy_config_state is not None:
config_sync_status = deploy_config_state
deploy_config_sync_status = deploy_config_state
extra_details = {"oam_floating_ip": oam_floating_ip,
"config_sync_status": config_sync_status}
"deploy_config_sync_status": deploy_config_sync_status}
subcloud_dict.update(extra_details)
return subcloud_dict

View File

@ -1082,7 +1082,8 @@ class TestSubcloudAPIOther(testroot.DCManagerApiTest):
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, http_client.OK)
self.assertEqual('10.10.10.2', response.json['oam_floating_ip'])
self.assertEqual('Deployment: configurations up-to-date', response.json['config_sync_status'])
self.assertEqual(
'Deployment: configurations up-to-date', response.json['deploy_config_sync_status'])
@mock.patch.object(rpc_client, 'ManagerClient')
def test_get_offline_subcloud_with_additional_detail(self,
@ -1093,7 +1094,7 @@ class TestSubcloudAPIOther(testroot.DCManagerApiTest):
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, http_client.OK)
self.assertEqual('unavailable', response.json['oam_floating_ip'])
self.assertEqual('unknown', response.json['config_sync_status'])
self.assertEqual('unknown', response.json['deploy_config_sync_status'])
@mock.patch.object(subclouds.SubcloudsController,
'_get_deploy_config_sync_status')
@ -1117,7 +1118,7 @@ class TestSubcloudAPIOther(testroot.DCManagerApiTest):
response = self.app.get(get_url, headers=FAKE_HEADERS)
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.status_code, http_client.OK)
self.assertEqual('unknown', response.json['config_sync_status'])
self.assertEqual('unknown', response.json['deploy_config_sync_status'])
@mock.patch.object(subclouds.SubcloudsController,
'_get_oam_addresses')