Show description attr when list and get device profile
Show description attr and modify UT. Change-Id: I88e481866217b3672f42aa390d3606810c4db513
This commit is contained in:
@@ -50,25 +50,29 @@ class ListDeviceProfile(command.Lister):
|
||||
"updated_at",
|
||||
"uuid",
|
||||
"name",
|
||||
"groups"
|
||||
"groups",
|
||||
"description"
|
||||
)
|
||||
columns = (
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"uuid",
|
||||
"name",
|
||||
"groups"
|
||||
"groups",
|
||||
"description"
|
||||
)
|
||||
else:
|
||||
column_headers = (
|
||||
"uuid",
|
||||
"name",
|
||||
"groups",
|
||||
"description"
|
||||
)
|
||||
columns = (
|
||||
"uuid",
|
||||
"name",
|
||||
"groups",
|
||||
"description"
|
||||
)
|
||||
|
||||
data = acc_client.device_profiles()
|
||||
@@ -182,6 +186,7 @@ def _show_device_profile(acc_client, uuid):
|
||||
"uuid",
|
||||
"name",
|
||||
"groups",
|
||||
"description",
|
||||
)
|
||||
try:
|
||||
device_profile = acc_client.get_device_profile(uuid)
|
||||
|
||||
@@ -76,6 +76,7 @@ device_profile_groups = [
|
||||
"trait:CUSTOM_TRAIT_ALWAYS": "required",
|
||||
}
|
||||
]
|
||||
device_profile_description = 'fake_description'
|
||||
|
||||
DEVICE_PROFILE = {
|
||||
'created_at': device_profile_created_at,
|
||||
@@ -84,6 +85,7 @@ DEVICE_PROFILE = {
|
||||
'uuid': device_profile_uuid,
|
||||
'name': device_profile_name,
|
||||
'groups': device_profile_groups,
|
||||
'description': device_profile_description,
|
||||
}
|
||||
|
||||
accelerator_request_uuid = uuid.uuid4().hex
|
||||
|
||||
@@ -53,6 +53,7 @@ class TestDeviceProfileList(TestDeviceProfile):
|
||||
'uuid',
|
||||
'name',
|
||||
'groups',
|
||||
'description'
|
||||
)
|
||||
self.assertEqual(collist, columns)
|
||||
|
||||
@@ -60,6 +61,7 @@ class TestDeviceProfileList(TestDeviceProfile):
|
||||
acc_fakes.device_profile_uuid,
|
||||
acc_fakes.device_profile_name,
|
||||
acc_fakes.device_profile_groups,
|
||||
acc_fakes.device_profile_description,
|
||||
), ]
|
||||
self.assertEqual(datalist, list(data))
|
||||
|
||||
@@ -78,6 +80,7 @@ class TestDeviceProfileList(TestDeviceProfile):
|
||||
'uuid',
|
||||
'name',
|
||||
'groups',
|
||||
'description'
|
||||
)
|
||||
self.assertEqual(collist, columns)
|
||||
|
||||
@@ -87,6 +90,7 @@ class TestDeviceProfileList(TestDeviceProfile):
|
||||
acc_fakes.device_profile_uuid,
|
||||
acc_fakes.device_profile_name,
|
||||
acc_fakes.device_profile_groups,
|
||||
acc_fakes.device_profile_description,
|
||||
), ]
|
||||
self.assertEqual(datalist, list(data))
|
||||
|
||||
@@ -136,6 +140,7 @@ class TestDeviceProfileCreate(TestDeviceProfile):
|
||||
'uuid',
|
||||
'name',
|
||||
'groups',
|
||||
'description'
|
||||
)
|
||||
self.assertEqual(collist, columns)
|
||||
|
||||
@@ -145,5 +150,6 @@ class TestDeviceProfileCreate(TestDeviceProfile):
|
||||
acc_fakes.device_profile_uuid,
|
||||
acc_fakes.device_profile_name,
|
||||
acc_fakes.device_profile_groups,
|
||||
acc_fakes.device_profile_description,
|
||||
]
|
||||
self.assertEqual(datalist, list(data))
|
||||
|
||||
Reference in New Issue
Block a user