Open russellseymour opened 6 years ago
Reproduced on simulator and on live HP Synergy Oneview:
For reference, the above was attempting to use: https://github.com/HewlettPackard/oneview-chef
oneview_enclosure_group
oneview_enclosure_group 'EnclosureGroup_1' do
client <my_client>
data <resource_data>
logical_interconnect_groups ['LIG_name1', { name: 'LIG_name2', enclosureIndex: 1 }]
script <script_string> # String. Used in set_script action only.
action [:create, :create_if_missing, :delete, :set_script]
end
logical_interconnect_groups: Array of data used to build the interconnect bay configuration. Each item can either be a string containing the LIG name or a hash containing the LIG name and enclosureIndex. Note that the enclosureIndex is not used on API200.
After a suggestion from HPE, arrived at the following which now seems to work in the live testing environment:
# Create enclosure group
eg = node['infrastructure']['enclosure_group']
oneview_enclosure_group eg['name'] do
client my_client
data(
stackingMode: 'Enclosure',
interconnectBayMappingCount: 6,
ipAddressingMode: 'DHCP'
)
logical_interconnect_groups ["#{lig_ethernet['name']}"]
only_if { eg['create'] }
end
Using the
oneview_enclosure_group
cookbook resource should allow you to specify the interconnects that are to be attached to it.The logical interconnect group is successfully created using the `oneview_logical_interconnect_group' resource (https://github.com/chef/inspec-oneview/blob/russellseymour/infrastructure/test/integration/build/cookbooks/infrastructure/recipes/default.rb#L42)
However when this is added to the
oneview_enclosure_group
the group is created without any interconnects.