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

Idempotence error: Running a ensure => 'present' on a oneview_firmware_bundle resource #153

Closed frippe75 closed 7 years ago

frippe75 commented 7 years ago

Scenario/Intent

Have a manifest ensuring the presence of a firmware bundle

Environment Details

Steps to Reproduce

Apply the following manifest twice in a row:

oneview_firmware_bundle{'firmware1':
    ensure => 'present',
    data   => {
      firmware_bundle_path => './SPP_2016.04.20170417_for_HPE_Synergy_874800-001.iso'
    }
}

Expected Result

Nothing.

Actual Result

Error: /Stage[main]/Main/Oneview_firmware_bundle[firmware_composer]/ensure: change from absent to present failed: Could not set 'present' on ensure: 400 BAD REQUEST {"data":{},"errorCode":"FWBASELINE_ALREADY_EXISTS","details":"","nestedErrors":[],"errorSource":null,"recommendedActions":["For adding a firmware bundle that is already present in the repository, delete the existing bundle {\"name\":\"Custom_SPP_Gen9_HF_102_1006 2017 03 27\", \"uri\":\"/rest/firmware-drivers/SPP_2016_04_20170417_for_HPE_Synergy_874800-001\"} and try again."],"message":"The file you are attempting to upload is a duplicate of the firmware bundle {\"name\":\"Custom_SPP_Gen9_HF_102_1006 2017 03 27\", \"uri\":\"/rest/firmware-drivers/SPP_2016_04_20170417_for_HPE_Synergy_874800-001\"} which is already present in the firmware bundles repository."} at /puppet/examples/frippe_synergy.pp:3