Add the filed of description to shell command for action.

blueprint dynamic-action-description

Change-Id: I927cf966530059d9c7af1e6e60a8d75dd3e6b812
This commit is contained in:
zte-hanrong
2016-12-23 10:19:49 +08:00
committed by licanwei
parent 2f2d05d657
commit 08fbccc684
2 changed files with 5 additions and 2 deletions

3
watcherclient/tests/unit/v1/test_action_shell.py Normal file → Executable file
View File

@@ -30,6 +30,7 @@ ACTION_1 = {
'action_type': 'migrate',
'parents': ['239f02a5-9649-4e14-9d33-ac2bf67cb755'],
'input_parameters': {"test": 1},
'description': 'test',
'created_at': datetime.datetime.now().isoformat(),
'updated_at': None,
'deleted_at': None,
@@ -42,6 +43,7 @@ ACTION_2 = {
'action_type': 'migrate',
'parents': ['67653274-eb24-c7ba-70f6-a84e73d80843'],
'input_parameters': {"test": 2},
'description': 'test',
'created_at': datetime.datetime.now().isoformat(),
'updated_at': None,
'deleted_at': None,
@@ -53,6 +55,7 @@ ACTION_3 = {
'parents': [],
'state': 'PENDING',
'action_type': 'sleep',
'description': 'test',
'created_at': datetime.datetime.now().isoformat(),
'updated_at': None,
'deleted_at': None,

4
watcherclient/v1/resource_fields.py Normal file → Executable file
View File

@@ -64,11 +64,11 @@ ACTION_PLAN_SHORT_LIST_FIELD_LABELS = ['UUID', 'Audit', 'State',
# Action
ACTION_FIELDS = ['uuid', 'created_at', 'updated_at', 'deleted_at', 'parents',
'state', 'action_plan_uuid', 'action_type',
'input_parameters']
'input_parameters', 'description']
ACTION_FIELD_LABELS = ['UUID', 'Created At', 'Updated At', 'Deleted At',
'Parents', 'State', 'Action Plan', 'Action',
'Parameters']
'Parameters', 'Description']
ACTION_SHORT_LIST_FIELDS = ['uuid', 'parents',
'state', 'action_plan_uuid', 'action_type']