Commit 7c16e286 authored by Lucas Nussbaum's avatar Lucas Nussbaum Committed by Simon Delamare
Browse files

Complete entries using default values provided at the linecard level (Bug 8587)

parent a1583788
......@@ -75,6 +75,15 @@ def create_network_equipment(network_uid, network, refapi_path, site_uid=nil)
ports = []
linecard.delete("ports").each do |port_index, port|
port = {"uid"=>port} if port.is_a? String
if port.is_a? Hash
# complete entries (see bug 8587)
if port['port'].nil? and linecard['port']
port['port'] = linecard['port']
if port['kind'].nil? and linecard['kind']
port['kind'] = linecard['kind']
ports[port_index] = port
linecard["ports"] ={|p| p || {}}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment