Closed jsmartt closed 7 years ago
I know that oneview-sdk with these enhancements ( HewlettPackard/oneview-sdk-ruby#230 ) needs to be released first but i will preliminary look at it ;)
Theoretically we can get interconnect module type
from already loaded interconnects as they always have type
and bay
number and enclosure_index
@item.data['interconnectMapTemplate']['interconnectMapEntryTemplates']
['logicalLocation']['locationEntries'].find { |entry| entry['type'] == 'Bay' }
['logicalLocation']['locationEntries'].find { |entry| entry['type'] == 'Enclosure' }
['permittedInterconnectTypeUri']
(and fetch the type or name from OneView)I can see a few challenges here ... for example these 16Gb Synergy FC switches and their enclosure_index = -1
. I need to create some mockup and test in the real environment :)
Ahhh, I've just realized that API300::Synergy contains @data['enclosureIndexes']
by default so we have to do following:
@item.data['enclosureIndexes']
exists (otherwise enclosure_index
is 1
or nil
, does not matter)@item.data['enclosureIndexes']
, when the length is 1 - enclosure_index
will be @item.data['enclosureIndexes'].first
enclosure_index
, example belowuplink_connections = [
{ bay: 3, port: 'Q1', enclosure_index: 1 },
{ bay: 6, port: 'Q1', enclosure_index: 2 }
]
hmmm .... I can see how it has been solved in Puppet library, that's actually great and straightforward solution.
parsed_uplink_info[:connections].each do |link|
link[:type] ||= nil
link[:enclosure_index] ||= 1
up.add_uplink(link[:bay], link[:port], link[:type], link[:enclosure_index])
end
I will try to implement & test this week.
Scenario/Intent
After SDK issue #216 gets implemented/fixed, we'll need to add the same support for our cookbooks.
Related resource:
Environment Details
Expected Result
Support Q ports, etc., where we need to specify an enclosure_index to calculate the offset value.
Actual Result
Not currently supported