Skip to content

Commit

Permalink
Fix enclosure type for synergy
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvirani committed Sep 10, 2020
1 parent f00b16a commit 7a63f61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/shared_samples/logical_interconnect_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Resource Class used in this sample
lig_class = OneviewSDK.resource_named('LogicalInterconnectGroup', @client.api_version)

variant = OneviewSDK.const_get("API#{@client.api_version}").variant unless @client.api_version < 300
# variant = OneviewSDK.const_get("API#{@client.api_version}").variant unless @client.api_version < 300

# To set variant to Synergy as the default variant is C7000
variant = 'Synergy'
Expand Down Expand Up @@ -121,6 +121,7 @@
if variant == 'Synergy'
lig['redundancyType'] = 'Redundant'
lig['interconnectBaySet'] = 3
lig['enclosureType'] = 'SY12000'

# Adds the following interconnects to the bays 3 and 6 with an Interconnect Type, respectively
lig.add_interconnect(3, VIRTUAL_CONNECT_SE_40_SYNERGY)
Expand Down Expand Up @@ -164,10 +165,11 @@
puts "#{type} was updated successfully:"
puts lig.data

puts eth01['uri']
if variant == 'Synergy'
puts "\nAdding an internal network with uri = #{eth01['uri']}"
lig.retrieve!
lig.add_internal_network(eth01)
lig['internalNetworkUris'] = [eth01['uri']]
lig.update
lig.retrieve!
puts "\nAdded an internal network with uri = #{eth01['uri']} successfully."
Expand Down

0 comments on commit 7a63f61

Please sign in to comment.