HewlettPackard / oneview-puppet

This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Terraform and Ansible Collection
https://forge.puppet.com/hewlettpackard/oneview
Apache License 2.0
8 stars 17 forks source link

Failing to create a oneview enclosure group with ipRangeUris #301

Closed riconem closed 3 years ago

riconem commented 3 years ago

Scenario/Intent

Creating a oneview_enclosure_groupresource with ipRangeUris.

Environment Details

Steps to Reproduce

Create a oneview_enclosure_groupresource with the following parameters.

oneviewconf::oneview_enclosure_group:
  Enclosure_Group_with_ipRangeUris:
    ensure: present
    data:
      enclosureCount: 2
      ipAddressingMode: IpPool
      ipRangeUris:
      - "/rest/id-pools/ipv4/ranges/ba9f9b64-0796-4aab-8ef7-e7edd058f422"
      name: Enclosure_Group_with_ipRangeUris
      stackingMode: Enclosure
      interconnectBayMappingCount: 4
      interconnectBayMappings:
      - logicalInterconnectGroupUri: "/rest/sas-logical-interconnect-groups/d29c9b6c-416f-48fa-9b76-28a12ec16df5"
        interconnectBay: 1
      - logicalInterconnectGroupUri: "/rest/logical-interconnect-groups/e06ccd2c-2489-47f3-816f-7a0bfc0d7fba"
        interconnectBay: 3
      - logicalInterconnectGroupUri: "/rest/sas-logical-interconnect-groups/d29c9b6c-416f-48fa-9b76-28a12ec16df5"
        interconnectBay: 4
      - logicalInterconnectGroupUri: "/rest/logical-interconnect-groups/e06ccd2c-2489-47f3-816f-7a0bfc0d7fba"
        interconnectBay: 6

These are similar parameters like in the HPE Oneview REST API Documentation. See the following.

Create an enclosure group named "eg-pool" for a single enclosure with IPv4 and IPv6 address pools. (Request)

POST https://{appl}/rest/enclosure-groups

Content-Type: application/json
Auth: abcdefghijklmnopqrstuvwxyz012345
X-Api-Version: 1200

{
    "name" : "eg-pool",
    "ipAddressingMode": "IpPool",
    "ipRangeUris":["/rest/id-pools/ipv4/ranges/bd2f32a6-6f7a-4c4a-b9e0-9eb1fb05440e",
                 "/rest/id-pools/ipv4/ranges/85a3a784-f9a1-4781-bb8a-93d9bb2ec73c"],
    "ipv6AddressingMode": "IpPool",
    "ipv6RangeUris":["/rest/id-pools/ipv6/ranges/ed2f32a6-6f7a-4c4a-b9e0-7eb1fb05440a",
                 "/rest/id-pools/ipv6/ranges/75a3a784-f9a1-4781-bb8a-73d9bb2ec73b"],
    "interconnectBayMappings":
     [
        {
            "interconnectBay": 3,
            "logicalInterconnectGroupUri": "/rest/logical-interconnect-groups/9fa49ccc-e787-4fed-8e6e-5ffc1874b469"
        },
        {
            "interconnectBay": 6,
            "logicalInterconnectGroupUri": "/rest/logical-interconnect-groups/9fa49ccc-e787-4fed-8e6e-5ffc1874b469"
        }
    ],
}

Expected Result

Creating a oneview_enclosure_groupresource with ipRangeUris.

Actual Result

No creation. See Console Error.

Error: /Stage[main]/Oneviewconf::Dtt/Oneviewconf::Dtt_enclosure_group[Enclosure_Group_with_ipRangeUris]/Oneview_enclosure_group[Enclosure_Group_with_ipRangeUris]: Could not evaluate: uninitialized constant OneviewSDK::API1200::Synergy::IpRangeU
Did you mean?  Range
VenkateshRavula commented 3 years ago

@riconem, we are looking into this issue and also the fix you provided.

VenkateshRavula commented 3 years ago

Merged the fix you provided. Closing the issue.

riconem commented 3 years ago

Thank you! Have a nice day 👋