Add beta property to magnum-driver-manage details
Depends-On: https://review.opendev.org/c/openstack/magnum/+/892728 Change-Id: Id762f2957a87f3c6e3289db09ed8bb092146eedc
This commit is contained in:
parent
34c82bdb96
commit
439c4315e9
|
@ -33,8 +33,8 @@ class DriverList(lister.Lister):
|
|||
field_labels = ['Name']
|
||||
|
||||
if parsed_args.details:
|
||||
fields.extend(['server_type', 'os', 'coe'])
|
||||
field_labels.extend(['Server_Type', 'OS', 'COE'])
|
||||
fields.extend(['server_type', 'os', 'coe', 'beta'])
|
||||
field_labels.extend(['Server_Type', 'OS', 'COE', 'Beta'])
|
||||
if parsed_args.paths:
|
||||
fields.append('path')
|
||||
field_labels.append('Template Path')
|
||||
|
@ -73,6 +73,7 @@ class DriverList(lister.Lister):
|
|||
row = dict()
|
||||
row.update(template)
|
||||
row.update(cluster_type)
|
||||
row['beta'] = cls.beta
|
||||
rows.append(row)
|
||||
else:
|
||||
rows.append(template)
|
||||
|
|
|
@ -27,7 +27,7 @@ class TestMagnumDriverManage(base.TestCase):
|
|||
fake_entry = mock.MagicMock()
|
||||
fake_entry.name = 'magnum_' + 'test_' + \
|
||||
'foo_' + 'bar'*num_of_entries
|
||||
fake_cls = mock.MagicMock()
|
||||
fake_cls = mock.MagicMock(beta=False)
|
||||
fake_definition = fake_cls()
|
||||
fake_definition.provides = [{'coe': 'foo', 'os': 'bar',
|
||||
'server_type': 'test'}]
|
||||
|
@ -54,9 +54,9 @@ class TestMagnumDriverManage(base.TestCase):
|
|||
driver_manage.main(args)
|
||||
mock_driver.load_entry_points.assert_called_once_with()
|
||||
mock_produce.assert_called_once_with(mock.ANY, mock.ANY,
|
||||
[('magnum_test_foo_bar',
|
||||
'test',
|
||||
'bar', 'foo', 'fake_path')])
|
||||
[('magnum_test_foo_bar', 'test',
|
||||
'bar', 'foo', False,
|
||||
'fake_path')])
|
||||
|
||||
# NOTE(hieulq): we fake the entrypoints then we need to mock the cliff
|
||||
# produce_output in order to assert with fake value
|
||||
|
|
Loading…
Reference in New Issue