diff --git a/watcherclient/tests/functional/v1/test_action_plan.py b/watcherclient/tests/functional/v1/test_action_plan.py index fa60fd6..3cd3340 100644 --- a/watcherclient/tests/functional/v1/test_action_plan.py +++ b/watcherclient/tests/functional/v1/test_action_plan.py @@ -28,7 +28,8 @@ class ActionPlanTests(base.TestCase): dummy_name = 'dummy' list_fields = ['UUID', 'Audit', 'State', 'Updated At', 'Global efficacy'] detailed_list_fields = list_fields + ['Created At', 'Deleted At', - 'Strategy', 'Efficacy indicators'] + 'Strategy', 'Efficacy indicators', + 'Hostname'] audit_template_name = 'a' + uuidutils.generate_uuid() audit_uuid = None diff --git a/watcherclient/tests/functional/v1/test_audit.py b/watcherclient/tests/functional/v1/test_audit.py index 7032107..ee74da7 100644 --- a/watcherclient/tests/functional/v1/test_audit.py +++ b/watcherclient/tests/functional/v1/test_audit.py @@ -30,7 +30,7 @@ class AuditTests(base.TestCase): detailed_list_fields = list_fields + ['Created At', 'Updated At', 'Deleted At', 'Parameters', 'Interval', 'Audit Scope', - 'Next Run Time'] + 'Next Run Time', 'Hostname'] audit_template_name = 'a' + uuidutils.generate_uuid() audit_uuid = None diff --git a/watcherclient/tests/unit/v1/test_action_plan_shell.py b/watcherclient/tests/unit/v1/test_action_plan_shell.py index 655a8ff..b377641 100644 --- a/watcherclient/tests/unit/v1/test_action_plan_shell.py +++ b/watcherclient/tests/unit/v1/test_action_plan_shell.py @@ -44,6 +44,7 @@ ACTION_PLAN_1 = { "description": "Dummy Global Efficacy2"} ], 'deleted_at': None, + 'hostname': '' } ACTION_PLAN_2 = { @@ -63,6 +64,7 @@ ACTION_PLAN_2 = { "description": "Dummy Global Efficacy", }], 'deleted_at': None, + 'hostname': '' } diff --git a/watcherclient/tests/unit/v1/test_audit_shell.py b/watcherclient/tests/unit/v1/test_audit_shell.py index 56942bb..a835d36 100755 --- a/watcherclient/tests/unit/v1/test_audit_shell.py +++ b/watcherclient/tests/unit/v1/test_audit_shell.py @@ -69,6 +69,7 @@ AUDIT_1 = { 'auto_trigger': False, 'next_run_time': None, 'name': 'my_audit1', + 'hostname': '', } AUDIT_2 = { @@ -88,6 +89,7 @@ AUDIT_2 = { 'auto_trigger': False, 'next_run_time': None, 'name': 'my_audit2', + 'hostname': '', } AUDIT_3 = { @@ -107,6 +109,7 @@ AUDIT_3 = { 'auto_trigger': True, 'next_run_time': None, 'name': 'my_audit3', + 'hostname': '', } diff --git a/watcherclient/v1/resource_fields.py b/watcherclient/v1/resource_fields.py index 0c5d7f8..5682bf5 100755 --- a/watcherclient/v1/resource_fields.py +++ b/watcherclient/v1/resource_fields.py @@ -32,12 +32,13 @@ AUDIT_TEMPLATE_SHORT_LIST_FIELD_LABELS = ['UUID', 'Name', 'Goal', 'Strategy'] # Audit AUDIT_FIELDS = ['uuid', 'name', 'created_at', 'updated_at', 'deleted_at', 'state', 'audit_type', 'parameters', 'interval', 'goal_name', - 'strategy_name', 'scope', 'auto_trigger', 'next_run_time'] + 'strategy_name', 'scope', 'auto_trigger', 'next_run_time', + 'hostname'] AUDIT_FIELD_LABELS = ['UUID', 'Name', 'Created At', 'Updated At', 'Deleted At', 'State', 'Audit Type', 'Parameters', 'Interval', 'Goal', 'Strategy', 'Audit Scope', 'Auto Trigger', - 'Next Run Time'] + 'Next Run Time', 'Hostname'] AUDIT_SHORT_LIST_FIELDS = ['uuid', 'name', 'audit_type', 'state', 'goal_name', 'strategy_name', @@ -49,11 +50,12 @@ AUDIT_SHORT_LIST_FIELD_LABELS = ['UUID', 'Name', 'Audit Type', 'State', 'Goal', # Action Plan ACTION_PLAN_FIELDS = ['uuid', 'created_at', 'updated_at', 'deleted_at', 'audit_uuid', 'strategy_name', 'state', - 'efficacy_indicators', 'global_efficacy'] + 'efficacy_indicators', 'global_efficacy', 'hostname'] ACTION_PLAN_FIELD_LABELS = ['UUID', 'Created At', 'Updated At', 'Deleted At', 'Audit', 'Strategy', 'State', - 'Efficacy indicators', 'Global efficacy'] + 'Efficacy indicators', 'Global efficacy', + 'Hostname'] ACTION_PLAN_SHORT_LIST_FIELDS = ['uuid', 'audit_uuid', 'state', 'updated_at', 'global_efficacy']