equipment plugin group added
Related-Bug: 1520287 Related to blueprint external-dashboard-links-support-in-nailgun Change-Id: I8fda5cdee6cf5af56b879e21925950c89e8e8f5f
This commit is contained in:
parent
3d056b7663
commit
f54c307add
|
@ -1,6 +1,6 @@
|
|||
# Changelog
|
||||
|
||||
## 4.0.0 (2015-12-14)
|
||||
## 4.0.0 (unreleased)
|
||||
|
||||
New package version "4.0.0" includes the following features:
|
||||
|
||||
|
@ -8,6 +8,7 @@ New package version "4.0.0" includes the following features:
|
|||
plugin on previously deployed environments.
|
||||
- Plugin can specify settings group using "group" field in metadata in
|
||||
environment_config.yaml file.
|
||||
- New group `equipment` added to groups list in `metadata.yaml`.
|
||||
|
||||
Bugfixes:
|
||||
|
||||
|
@ -120,4 +121,4 @@ Initial public release
|
|||
|
||||
- Plugin create
|
||||
- Plugin build
|
||||
- Plugin check
|
||||
- Plugin check
|
|
@ -15,7 +15,8 @@ authors: ['Specify author or company name']
|
|||
# A link to the plugin's page
|
||||
homepage: 'https://github.com/openstack/fuel-plugins'
|
||||
# Specify a group which your plugin implements, possible options:
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor,
|
||||
# equipment
|
||||
groups: []
|
||||
# Change `false` to `true` if the plugin can be installed in the environment
|
||||
# after the deployment.
|
||||
|
|
|
@ -15,7 +15,8 @@ authors: ['Specify author or company name']
|
|||
# A link to the plugin's page
|
||||
homepage: 'https://github.com/openstack/fuel-plugins'
|
||||
# Specify a group which your plugin implements, possible options:
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor,
|
||||
# equipment
|
||||
groups: []
|
||||
# Change `false` to `true` if the plugin can be installed in the environment
|
||||
# after the deployment.
|
||||
|
|
|
@ -28,6 +28,31 @@ class TestValidatorV4(TestValidatorV3):
|
|||
validator_class = ValidatorV4
|
||||
schema_class = SchemaV4
|
||||
|
||||
def setUp(self):
|
||||
super(TestValidatorV4, self).setUp()
|
||||
self.metadata = {
|
||||
'name': 'plugin_name-12',
|
||||
'title': 'plugin_name-12',
|
||||
'version': '1.2.3',
|
||||
'package_version': '4.0.0',
|
||||
'description': 'Description',
|
||||
'fuel_version': ['8.0.0'],
|
||||
'licenses': ['Apache', 'BSD'],
|
||||
'authors': ['Author1', 'Author2'],
|
||||
'homepage': 'http://test.com',
|
||||
'releases': [
|
||||
{
|
||||
"os": "ubuntu",
|
||||
"version": "liberty-8.0",
|
||||
"mode": ['ha'],
|
||||
"deployment_scripts_path": "deployment_scripts/",
|
||||
"repository_path": "repositories/ubuntu"
|
||||
}
|
||||
],
|
||||
'groups': [],
|
||||
'is_hotpluggable': False
|
||||
}
|
||||
|
||||
def test_check_schemas(self):
|
||||
mocked_methods = [
|
||||
'check_metadata_schema',
|
||||
|
@ -243,6 +268,23 @@ class TestValidatorV4(TestValidatorV3):
|
|||
utils_mock.parse_yaml.return_value = [data]
|
||||
self.validator.check_components_schema()
|
||||
|
||||
@mock.patch('fuel_plugin_builder.validators.base.utils')
|
||||
def test_groups(self, utils_mock):
|
||||
groups_data = [
|
||||
["network"],
|
||||
["storage"],
|
||||
["storage::cinder"],
|
||||
["storage::glance"],
|
||||
["hypervisor"],
|
||||
["equipment"],
|
||||
["storage::cinder", "equipment"],
|
||||
[]
|
||||
]
|
||||
for gd in groups_data:
|
||||
self.metadata['groups'] = gd
|
||||
utils_mock.parse_yaml.return_value = self.metadata
|
||||
self.assertEqual(None, self.validator.check_metadata_schema())
|
||||
|
||||
@mock.patch('fuel_plugin_builder.validators.base.utils')
|
||||
def test_check_deployment_task_reexecute_on(self, utils_mock):
|
||||
mock_data = [{
|
||||
|
|
|
@ -307,6 +307,7 @@ class SchemaV4(SchemaV3):
|
|||
schema = super(SchemaV4, self).metadata_schema
|
||||
schema['required'].append('is_hotpluggable')
|
||||
schema['properties']['is_hotpluggable'] = {'type': 'boolean'}
|
||||
schema['properties']['groups']['items']['enum'].append('equipment')
|
||||
return schema
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue