Skip to content

Commit

Permalink
Merge b1a3b79 into 2a0e13d
Browse files Browse the repository at this point in the history
  • Loading branch information
VenkateshRavula committed Feb 2, 2021
2 parents 2a0e13d + b1a3b79 commit b24f179
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v2.9.1(Unreleased)
#### Bug fixes & Enhancements:
- [#301] (https://github.com/HewlettPackard/oneview-puppet/issues/301) Failing to create a oneview enclosure group with ipRangeUris
- [#304] (https://github.com/HewlettPackard/oneview-puppet/issues/304) Failing to create a oneview logical interconnect group with real networkUris

# v2.9.0(2020-11-11)
### Notes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ def set_network(uplink_set, network_type, network_uris)
net_type = network_type == 'Ethernet' ? :EthernetNetwork : :FCNetwork
net_class = OneviewSDK.resource_named(net_type, login[:api_version], login[:hardware_variant])
network_uris.each do |network_uri|
next if network_uri.to_s[0..6].include?('/rest/')
# Added a block to handle network uris in an uplinkset
if network_uri.to_s[0..6].include?('/rest/')
net = net_class.new(@client, uri: network_uri)
raise "Network in networkUris not found. Uri specified for the network: #{network_uri}" unless net.retrieve!
uplink_set.add_network(net)
next
end
net = net_class.new(@client, name: network_uri)
raise "Network in networkUris not found. Name specified for the network: #{network_uri}" unless net.retrieve!
uplink_set.add_network(net)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
{ 'bay' => 2,
'port' => 'X8' }],
'networkUris' => [
{ name: 'test_network' }
{ name: 'test_network' },
{ uri: '/rest/fake_uri' }
]
}
],
Expand Down

0 comments on commit b24f179

Please sign in to comment.