mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-04 14:12:01 +09:00
B #-: Fix CLI json/yaml output for xsd with several top-level elements (#4685)
This commit is contained in:
1 parent
2450d99464
commit
111169de33
1 file changed
+6
@@ -1435,6 +1435,12 @@ Bash symbols must be escaped on STDIN passing'
|
||||
|
||||
hash = hash['schema']['element']
|
||||
|
||||
# Schemas may define several top-level elements (e.g. vnet.xsd
|
||||
# defines MIRROR and VNET), pick the one matching the resource
|
||||
if hash.is_a?(Array)
|
||||
hash = hash.find {|e| e['name'] == ename } || hash.first
|
||||
end
|
||||
|
||||
replace_refs(hash)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user