python-hpOneView
python-hpOneView copied to clipboard
Query string required to force extract_bundle
Scenario/Intent
I want to extract an artifact bundle using the function extract_bundle https://github.com/HewlettPackard/python-hpOneView/blob/master/hpOneView/image_streamer/resources/artifact_bundles.py#L265
Environment Details
- OneView SDK Version: 3.3.0
- OneView Appliance Version: 3.10.02-0298793
- OneView Client API Version: [API version listed in your configuration file or dictionary]
- Python Version: Python 3.5.2
- Platform: Ubuntu 16.04
Steps to Reproduce
Using the python-hpOneview example code. Add an artifact bundle. Extract that artifact bundle. You will see a pop up window appear that asks for an 'OK' before extracting.
Expected Result
Successful extract in the activity panelPlan Scripts and Build Plans to appear in the UI
Actual Result
I have to navigate to Image Streamer's 'Artifact Bundle' section and this pop up appears:

Possible Solution
You will need to attach a query string onto the end of the URI to ensure that the extract call is forced:
# Extract an Artifact Bundle
artifact_bundle['uri'] += '?extract=true&forceImport=true'
response = image_streamer_client.artifact_bundles.extract_bundle(artifact_bundle)