ansible-collections / netapp

Development area for Netapp collections
49 stars 36 forks source link

Incorrect placement of "platformSerialNumber" in the resulting json structure #102

Closed dprts closed 3 years ago

dprts commented 3 years ago
SUMMARY

With the latest version of CloudManager modules (21.4.0), deployment of a single node CVO in AWS using BYOL fails with:

Error: unexpected response on creating cvo aws: 
400, 
b'{\"message\":\"Platform serial number is required for license cot-premium-byol\",\"causeMessage\":\"BadRequestException: Platform serial number is required for license cot-premium-byol\"}

After checking how the API call is constructed in CloudManager and correcting assignment at na_cloudmanager_cvo_aws.py#L587 to:

        if self.parameters.get('platform_serial_number') is not None:
            json['vsaMetadata'].update({"platformSerialNumber": self.parameters['platform_serial_number']})

deployment job is executed.

ISSUE TYPE
COMPONENT NAME

na_cloudmanager_cvo_aws

STEPS TO REPRODUCE
  - name: Create NetApp Cloud Manager CVO for AWS single
    netapp.cloudmanager.na_cloudmanager_cvo_aws:
    ---snip---
      ontap_version: "ONTAP-9.8.T1"
      use_latest_version: false
      license_type: "cot-premium-byol"
      platform_serial_number: "PLATFORM_SERIAL_NUMBER"
      instance_type: "m5.2xlarge"
    ---snip---

is translated to:

{
---snip---
  "vsaMetadata": {
    "ontapVersion": "ONTAP-9.8.T1",
    "useLatestVersion": false,
    "licenseType": "cot-premium-byol",
    "instanceType": "m5.2xlarge"
  },
 "platformSerialNumber": "PLATFORM_SERIAL_NUMBER",
---snip---
}
EXPECTED RESULTS
{
  ---snip---
  "vsaMetadata": {
    "ontapVersion": "ONTAP-9.8.T1",
    "useLatestVersion": false,
    "licenseType": "cot-premium-byol",
    "instanceType": "m5.2xlarge",
    "platformSerialNumber": "PLATFORM_SERIAL_NUMBER"
  },
  ---snip---
}
lonico commented 3 years ago

Will be fixed in 21.5.0.

lonico commented 3 years ago

fixed in 21.5.0. (published on 4/22)