Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional uplink port types in the LogicalInterconnectGroupProvider #225

Closed
jsmartt opened this issue Mar 23, 2017 · 4 comments
Closed

Comments

@jsmartt
Copy link
Contributor

jsmartt commented Mar 23, 2017

Scenario/Intent

After SDK issue #216 gets implemented/fixed, we'll need to add the same support for our cookbooks.

Related resource:

Environment Details

  • oneview Cookbook Version: 2.1.0
  • OneView Version: Synergy

Expected Result

Support Q ports, etc., where we need to specify an enclosure_index to calculate the offset value.

Actual Result

Not currently supported

@vranystepan
Copy link
Contributor

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 ;)

@vranystepan vranystepan self-assigned this May 11, 2017
@vranystepan
Copy link
Contributor

vranystepan commented May 11, 2017

Theoretically we can get interconnect module type from already loaded interconnects as they always have type and bay number and enclosure_index

  1. compile some easily readable list from @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)
  2. edit method load_uplink_sets so this part will be finding needed values in compiled structure

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 :)

@vranystepan
Copy link
Contributor

vranystepan commented May 11, 2017

Ahhh, I've just realized that API300::Synergy contains @data['enclosureIndexes'] by default so we have to do following:

  1. check whether @item.data['enclosureIndexes'] exists (otherwise enclosure_index is 1 or nil, does not matter)
  2. check the length of @item.data['enclosureIndexes'], when the length is 1 - enclosure_index will be @item.data['enclosureIndexes'].first
  3. if length > 1 - uplinks connections info has to contain enclosure_index, example below
uplink_connections = [
  { bay: 3, port: 'Q1', enclosure_index: 1 },
  { bay: 6, port: 'Q1', enclosure_index: 2 }
]

@vranystepan vranystepan removed their assignment Jun 9, 2017
@vranystepan
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants