-
Notifications
You must be signed in to change notification settings - Fork 57
Synergy profile provisioned from template using Python SDK is not consistent #304
Comments
This has been resolved by using the following combination of steps: First, create a new profile from the template, which will be unassigned Now update the serverHardwareUri, name, and custom attributes before assigning the new profile to hardware Create the profile (assign it to hardware) |
I'd like to make a suggestion that oneview_client.server_profile_templates.get_new_profile should perhaps be renamed to oneview_client.server_profile_templates.create_new_profile? The verbage "get" is not intuitive since this is actually used to "create" a new profile from a template. |
Hello @kmullican , the "get_new_profile" doesn't actually create a new profile. It is a binding to the GET endpoint What this does is actually just return a dictionary which is based on the In this case, when you run: new_profile = oneview_client.server_profile_templates.get_new_profile(TEMPLATE_URI) You have not yet created the The profile is actually being created when you call: created_profile = oneview_client.server_profiles.create(new_profile) Which is using all of the info on the variable Hope this helps clear things up a bit. |
@fgbulsoni yes, true, thx. It's a "get in preparation to create", lol. would it be best for me to close this issue since it has been resolved? just wanted to leave some breadcrumbs in the notes in case anyone else would like example of getting the profile defined and created from template. |
I'll update the example and try to make this path more clear, as that should help as well. These breadcrumbs are definitely important and will be searchable for anyone that gets in the repo, so that is great as well. I'd wait for that example file update to close this though. |
Scenario/Intent
Provisioning a Synergy profile from template using Python SDK should result in a profile containing the OS Deployment Plan, connections, and local storage that was defined in the template.
Environment Details
Steps to Reproduce
Create a template in OneView containing an OS Deployment Plan, connections, and local storage
Provision a profile in Python:
oneview_client = OneViewClient.from_json_file('connection.json')
new_profile_options = dict(
name=PROFILE_NAME,
serverProfileTemplateUri=TEMPLATE_URI,
serverHardwareUri=SRVR_HWARE_URI
)
new_profile = oneview_client.server_profiles.create(new_profile_options)
Expected Result
New profile contains same OS Deployment Plan, connections, and local storage as the template
Actual Result
New profile has OS Deployment Plan set to "None", no connections, and no local storage
The text was updated successfully, but these errors were encountered: