Make trunk commands handle timestamps for trunk resources
Partial-implements: blueprint vlan-aware-vms Change-Id: I853ae5d01401cf9df429b2e3f4565c2aef8a34dd
This commit is contained in:
parent
89d4a9a2ea
commit
496969e05d
|
@ -159,10 +159,14 @@ class ListNetworkTrunk(command.Lister):
|
|||
headers += (
|
||||
'Status',
|
||||
'State',
|
||||
'Created At',
|
||||
'Updated At',
|
||||
)
|
||||
columns += (
|
||||
'status',
|
||||
'admin_state_up',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)
|
||||
return (headers,
|
||||
(utils.get_dict_properties(
|
||||
|
|
|
@ -295,7 +295,9 @@ class TestShowNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
|||
|
||||
class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
||||
# Create trunks to be listed.
|
||||
_trunks = fakes.FakeTrunk.create_trunks(count=3)
|
||||
_trunks = fakes.FakeTrunk.create_trunks(
|
||||
{'created_at': '2001-01-01 00:00:00',
|
||||
'updated_at': '2001-01-01 00:00:00'}, count=3)
|
||||
|
||||
columns = (
|
||||
'ID',
|
||||
|
@ -306,6 +308,8 @@ class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
|||
columns_long = columns + (
|
||||
'Status',
|
||||
'State',
|
||||
'Created At',
|
||||
'Updated At'
|
||||
)
|
||||
data = []
|
||||
for t in _trunks:
|
||||
|
@ -324,6 +328,8 @@ class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
|||
t['description'],
|
||||
t['status'],
|
||||
trunk._format_admin_state(t['admin_state_up']),
|
||||
'2001-01-01 00:00:00',
|
||||
'2001-01-01 00:00:00',
|
||||
))
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue