Merge "Make trunk commands handle timestamps for trunk resources"
This commit is contained in:
@@ -159,10 +159,14 @@ class ListNetworkTrunk(command.Lister):
|
|||||||
headers += (
|
headers += (
|
||||||
'Status',
|
'Status',
|
||||||
'State',
|
'State',
|
||||||
|
'Created At',
|
||||||
|
'Updated At',
|
||||||
)
|
)
|
||||||
columns += (
|
columns += (
|
||||||
'status',
|
'status',
|
||||||
'admin_state_up',
|
'admin_state_up',
|
||||||
|
'created_at',
|
||||||
|
'updated_at'
|
||||||
)
|
)
|
||||||
return (headers,
|
return (headers,
|
||||||
(utils.get_dict_properties(
|
(utils.get_dict_properties(
|
||||||
|
@@ -295,7 +295,9 @@ class TestShowNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
|||||||
|
|
||||||
class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
||||||
# Create trunks to be listed.
|
# 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 = (
|
columns = (
|
||||||
'ID',
|
'ID',
|
||||||
@@ -306,6 +308,8 @@ class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
|||||||
columns_long = columns + (
|
columns_long = columns + (
|
||||||
'Status',
|
'Status',
|
||||||
'State',
|
'State',
|
||||||
|
'Created At',
|
||||||
|
'Updated At'
|
||||||
)
|
)
|
||||||
data = []
|
data = []
|
||||||
for t in _trunks:
|
for t in _trunks:
|
||||||
@@ -324,6 +328,8 @@ class TestListNetworkTrunk(test_fakes.TestNeutronClientOSCV2):
|
|||||||
t['description'],
|
t['description'],
|
||||||
t['status'],
|
t['status'],
|
||||||
trunk._format_admin_state(t['admin_state_up']),
|
trunk._format_admin_state(t['admin_state_up']),
|
||||||
|
'2001-01-01 00:00:00',
|
||||||
|
'2001-01-01 00:00:00',
|
||||||
))
|
))
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
Reference in New Issue
Block a user