Merge "Put correct release version into metadata.yaml for plugin_reboot" into stable/mitaka
This commit is contained in:
commit
f2204a804b
@ -483,6 +483,22 @@ class FuelPluginBuilder(BaseActions):
|
||||
)['stdout_str']
|
||||
return packet_name
|
||||
|
||||
def fpb_update_release_in_metadata(self, path):
|
||||
"""Update fuel version and openstack release version
|
||||
|
||||
:param path: path to plugin's dir on master node
|
||||
"""
|
||||
metadata_path = os.path.join(path, 'metadata.yaml')
|
||||
output = self.ssh_manager.execute_on_remote(
|
||||
ip=self.admin_ip, cmd="fuel --fuel-version --json",
|
||||
jsonify=True)['stdout_json']
|
||||
fuel_version = [str(output['release'])]
|
||||
openstack_version = str(output['openstack_version'])
|
||||
self.change_remote_yaml(metadata_path, ['fuel_version'], fuel_version)
|
||||
releases = self.get_value_from_remote_yaml(metadata_path, ['releases'])
|
||||
releases[0]['version'] = openstack_version
|
||||
self.put_value_to_remote_yaml(metadata_path, ['releases'], releases)
|
||||
|
||||
def fpb_validate_plugin(self, path):
|
||||
"""
|
||||
Validates plugin for errors
|
||||
|
@ -68,6 +68,7 @@ class RebootPlugin(TestBasic):
|
||||
# create plugin template on the master node
|
||||
self.show_step(3)
|
||||
fpb.fpb_create_plugin(source_plugin_path)
|
||||
fpb.fpb_update_release_in_metadata(source_plugin_path)
|
||||
# replace plugin tasks with our file
|
||||
fpb.fpb_replace_plugin_content(
|
||||
os.path.join(tasks_path, tasks_file),
|
||||
@ -199,6 +200,7 @@ class RebootPlugin(TestBasic):
|
||||
self.show_step(3)
|
||||
# create plugin template on the master node
|
||||
fpb.fpb_create_plugin(source_plugin_path)
|
||||
fpb.fpb_update_release_in_metadata(source_plugin_path)
|
||||
# replace plugin tasks with our file
|
||||
fpb.fpb_replace_plugin_content(
|
||||
os.path.join('/tmp/', tasks_file),
|
||||
|
Loading…
Reference in New Issue
Block a user