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']
|
field_labels = ['Name']
|
||||||
|
|
||||||
if parsed_args.details:
|
if parsed_args.details:
|
||||||
fields.extend(['server_type', 'os', 'coe'])
|
fields.extend(['server_type', 'os', 'coe', 'beta'])
|
||||||
field_labels.extend(['Server_Type', 'OS', 'COE'])
|
field_labels.extend(['Server_Type', 'OS', 'COE', 'Beta'])
|
||||||
if parsed_args.paths:
|
if parsed_args.paths:
|
||||||
fields.append('path')
|
fields.append('path')
|
||||||
field_labels.append('Template Path')
|
field_labels.append('Template Path')
|
||||||
|
@ -73,6 +73,7 @@ class DriverList(lister.Lister):
|
||||||
row = dict()
|
row = dict()
|
||||||
row.update(template)
|
row.update(template)
|
||||||
row.update(cluster_type)
|
row.update(cluster_type)
|
||||||
|
row['beta'] = cls.beta
|
||||||
rows.append(row)
|
rows.append(row)
|
||||||
else:
|
else:
|
||||||
rows.append(template)
|
rows.append(template)
|
||||||
|
|
|
@ -27,7 +27,7 @@ class TestMagnumDriverManage(base.TestCase):
|
||||||
fake_entry = mock.MagicMock()
|
fake_entry = mock.MagicMock()
|
||||||
fake_entry.name = 'magnum_' + 'test_' + \
|
fake_entry.name = 'magnum_' + 'test_' + \
|
||||||
'foo_' + 'bar'*num_of_entries
|
'foo_' + 'bar'*num_of_entries
|
||||||
fake_cls = mock.MagicMock()
|
fake_cls = mock.MagicMock(beta=False)
|
||||||
fake_definition = fake_cls()
|
fake_definition = fake_cls()
|
||||||
fake_definition.provides = [{'coe': 'foo', 'os': 'bar',
|
fake_definition.provides = [{'coe': 'foo', 'os': 'bar',
|
||||||
'server_type': 'test'}]
|
'server_type': 'test'}]
|
||||||
|
@ -54,9 +54,9 @@ class TestMagnumDriverManage(base.TestCase):
|
||||||
driver_manage.main(args)
|
driver_manage.main(args)
|
||||||
mock_driver.load_entry_points.assert_called_once_with()
|
mock_driver.load_entry_points.assert_called_once_with()
|
||||||
mock_produce.assert_called_once_with(mock.ANY, mock.ANY,
|
mock_produce.assert_called_once_with(mock.ANY, mock.ANY,
|
||||||
[('magnum_test_foo_bar',
|
[('magnum_test_foo_bar', 'test',
|
||||||
'test',
|
'bar', 'foo', False,
|
||||||
'bar', 'foo', 'fake_path')])
|
'fake_path')])
|
||||||
|
|
||||||
# NOTE(hieulq): we fake the entrypoints then we need to mock the cliff
|
# NOTE(hieulq): we fake the entrypoints then we need to mock the cliff
|
||||||
# produce_output in order to assert with fake value
|
# produce_output in order to assert with fake value
|
||||||
|
|
Loading…
Reference in New Issue