Add "cluster_id" column to openstack cluster event list

'cluster_id' is a supported filters key, we'd better to show 'cluster_id'
to help set 'cluster_id' filters key value.

This patch adds "cluster_id" column to  `openstack cluster event list`
Also, we remove "status_reason" column to avoid too wide in a line.

Closes-Bug: #1641900

Change-Id: Iec86b8fe3a967d222a82ca946f1f013f08412e66
This commit is contained in:
jonnary
2016-11-15 18:28:04 +08:00
committed by Qiming Teng
parent 518501c317
commit 2c67978ec9
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ class TestEvent(fakes.TestClusteringv1):
class TestEventList(TestEvent):
columns = ['id', 'generated_at', 'obj_type', 'obj_id', 'obj_name',
'action', 'status', 'status_reason', 'level']
'action', 'status', 'level', 'cluster_id']
response = {"events": [
{
@@ -43,7 +43,7 @@ class TestEventList(TestEvent):
"obj_type": "NODE",
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"status": "CREATING",
"status_reason": "Initializing",
"cluster_id": "f23ff00c-ec4f-412d-bd42-7f6e209819cb",
"generated_at": "2015-03-05T08:53:15",
"user": "a21ded6060534d99840658a777c2af5a"
}
@@ -144,7 +144,7 @@ class TestEventShow(TestEvent):
"obj_type": "NODE",
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"status": "CREATING",
"status_reason": "Initializing",
"cluster_id": "f23ff00c-ec4f-412d-bd42-7f6e209819cb",
"generated_at": "2015-03-05T08:53:15",
"user": "a21ded6060534d99840658a777c2af5a"
}}

View File

@@ -80,7 +80,7 @@ class ListEvent(command.Lister):
senlin_client = self.app.client_manager.clustering
columns = ['id', 'generated_at', 'obj_type', 'obj_id', 'obj_name',
'action', 'status', 'status_reason', 'level']
'action', 'status', 'level', 'cluster_id']
queries = {
'sort': parsed_args.sort,
'limit': parsed_args.limit,