diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index cfd817a852..3d97cd2094 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -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