1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-13 13:17:39 +03:00

M #-: provision extends append parent directory (#758)

This commit is contained in:
Alejandro Huertas Herrero 2021-02-04 18:42:32 +01:00 committed by GitHub
parent 1c04ca3c37
commit 5d1ea1ef73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
require 'pathname'
module OneProvision
# Provision configuration class
@ -377,6 +379,10 @@ module OneProvision
yaml['extends'] = [yaml['extends']].flatten
yaml['extends'].reverse.each do |f|
unless Pathname.new(f).absolute?
f = "#{File.expand_path('..', name)}/#{f}"
end
base = partial_load(f)
yaml.delete('extends')