HPE OneView
1830220 Members
2062 Online
109999 Solutions
New Discussion

Python SDK Create Server Profile from Template

 
t_schenk
Visitor

Python SDK Create Server Profile from Template

I am having an issue with the Python SDK not acting the same as working through the web interface.  I have a script that creates a server profile from a template and it can create the server profile, but it is not created in accordance with the supplied server profile template.  If I create a server profile from a template in the web interface, it correctly inherits all of the information from the template, such as firmware settings, BIOS settings, Local Storage settings, etc.  When I create it using the script, it is missing these.  If I go into the web interface and apply an update to the new server profile created by the script, it gets the settings from the template, except for storage.  I don't understand why creating the server profile through the web interface and using the SDK are behaving differently.

HPE OneVIew API Reference version 6400 if that makes any difference.  Any help would be appreciated.

3 REPLIES 3
RenjuCR
HPE Pro

Re: Python SDK Create Server Profile from Template

We would recommend to raise a support ticket and share the script with our team to understand more about the issue. 

I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
support_s
System Recommended

Query: Python SDK Create Server Profile from Template

Hello,

 

Let us know if you were able to resolve the issue.

If you are satisfied with the answers then kindly click the "Accept As Solution" button for the most helpful response so that it is beneficial to all community members.

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".

 

 


Accept or Kudo

t_schenk
Visitor

Re: Query: Python SDK Create Server Profile from Template

I got my script to work, but I"m still testing the final solution.  The problems I encountered were:

  1. Using a script to create a server profile from a template acted differently than performing the same action through the web interface, specifically, not all parts of the template were applied, such as the Firmware policy, BIOS settings, and Local Storage.
  2. The SDK is poorly documented and doesn't include information on what data to pass to methods like the create server profile method.
  3. Some parts of the REST API aren't implemented in the SDK at all, such as mapping AD groups to roles (the SDK only has methods for mapping users to roles).
  4. Figuring out the logic required to fix some of these issues were only found by working in the web interface and reading the error messages there and through trial and error, such as the fact that you can only add Local storage or make the profile compliant with the template while the server is powered off.  These things should be better documented. 

I don't think that I should mark this thread as "answered", because I discovered the solution completely on my own by experimentation with the web interface, the REST API, and reading the source of the SDK.  The documentation helped a little, but my opinion is very lacking.