From 78b6473ef7c5713ab607faba0c2c89869f91979a Mon Sep 17 00:00:00 2001 From: git-harry Date: Fri, 10 Feb 2017 15:23:34 +0000 Subject: [PATCH] Fix last updated field name for resources Craton resources have a property, `updated_at`. This commit corrects the client to look for that property using the correct name. Without the change the client is looking for `update_at` which causes the output for that property to be blank. Change-Id: If041f97594038e2e66ba3a664a514e5d2447bd18 --- cratonclient/tests/unit/shell/v1/test_hosts_shell.py | 2 +- cratonclient/v1/cells.py | 2 +- cratonclient/v1/hosts.py | 2 +- cratonclient/v1/projects.py | 2 +- cratonclient/v1/regions.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cratonclient/tests/unit/shell/v1/test_hosts_shell.py b/cratonclient/tests/unit/shell/v1/test_hosts_shell.py index ad52bd0..2793d3a 100644 --- a/cratonclient/tests/unit/shell/v1/test_hosts_shell.py +++ b/cratonclient/tests/unit/shell/v1/test_hosts_shell.py @@ -105,7 +105,7 @@ class TestDoHostList(base.TestShellCommandUsingPrintList): 'note', 'project_id', 'region_id', - 'update_at', + 'updated_at', ]) def test_with_limit(self): diff --git a/cratonclient/v1/cells.py b/cratonclient/v1/cells.py index 173420f..6a40a22 100644 --- a/cratonclient/v1/cells.py +++ b/cratonclient/v1/cells.py @@ -36,5 +36,5 @@ CELL_FIELDS = { 'name': 'Name', 'note': 'Note', 'created_at': 'Created At', - 'update_at': 'Updated At' + 'updated_at': 'Updated At' } diff --git a/cratonclient/v1/hosts.py b/cratonclient/v1/hosts.py index aac22ee..bf615af 100644 --- a/cratonclient/v1/hosts.py +++ b/cratonclient/v1/hosts.py @@ -40,6 +40,6 @@ HOST_FIELDS = { 'active': 'Active', 'note': 'Note', 'created_at': 'Created At', - 'update_at': 'Updated At', + 'updated_at': 'Updated At', 'labels': 'Labels', } diff --git a/cratonclient/v1/projects.py b/cratonclient/v1/projects.py index 0df920b..371f873 100644 --- a/cratonclient/v1/projects.py +++ b/cratonclient/v1/projects.py @@ -33,5 +33,5 @@ PROJECT_FIELDS = { 'id': 'ID', 'name': 'Name', 'created_at': 'Created At', - 'update_at': 'Updated At' + 'updated_at': 'Updated At' } diff --git a/cratonclient/v1/regions.py b/cratonclient/v1/regions.py index 1e66e0a..ae5c9f1 100644 --- a/cratonclient/v1/regions.py +++ b/cratonclient/v1/regions.py @@ -35,5 +35,5 @@ REGION_FIELDS = { 'name': 'Name', 'note': 'Note', 'created_at': 'Created At', - 'update_at': 'Updated At' + 'updated_at': 'Updated At' }