Closed kmullican closed 7 years ago
Deployment plans are not supported on Server Profile Templates until the 3.10 release (500 API), so you would need to use the 500 API to get the information. The previous version (OneView 3.0, API 300) The SPT didn't support having a Deployment Plan, only a Server Profile supported them. So the behavior you are describing is expected and correct. Deployment plans should only show up on a Server Profile Temple when using the 500 API.
What I'm getting at is that the "OneView 3.0" section of the GitHub README specifically states how to set api_version to 300 for OneView 3.0, but does not mention anything about the new OneView 3.10 and the requirement for setting api_version to 500 (which is required in order to use templates on Synergy).
Hey guys, I've made some updates on the README to clarify this behaviour and explain how to set the API version to the desired one. @kmullican @bsoutham feel free to take a look and share your thoughts on the PR #307
@fgbulsoni thanks, where can I preview the updated README.md?
Here you can see the whole README, and here is a preview of the new section:
The OneView Python SDK supports the API endpoints for HPE OneView 2.0, 3.0 and 3.10.
The current default
HPE OneView version used by the Python SDK is 3.00
, API 300
.
To use a different API, you must set the API version on the OneViewClient configuration, either using the JSON configuration:
"api_version": 500
OR using the Environment variable:
export ONEVIEWSDK_API_VERSION='500'
If this property is not specified, it will fall back to the 300
default value.
The API list is as follows:
200
300
500
@fgbulsoni this change is very helpful, looks great. thanks!
We may revisit it to see if we'd like to change/update our default version or behavior, but as that would be a breaking change it is likely something to be done carefully/in the future.
Closing down the issue for now.
Scenario/Intent
I have a Synergy OneView template with an OS Deployment Plan, but when query the template with oneview_client.server_profile_templates.get_by_name, the OS Deployment Plan is missing from the output. API version is set to 300 in config.json, per the OneView SDK GitHub README.md.
HPE has informed me that setting API version to 500 fixes the issue (and I have verified that is the case), but this is not clear from the README.md. So this may be a combination of documentation fix plus code fix to automatically detect highest API version supported?
Environment Details
Steps to Reproduce
Create template with an OS Deployment Plan.
Read the template in via Python SDK: oneview_client = OneViewClient.from_json_file('connect.json') my_template = oneview_client.server_profile_templates.get_by_name('test-template') pprint(my_template)
Expected Result
See the complete template, including OS Deployment Plan
Actual Result
OS Deployment Plan is missing