HMC

 View Only
Expand all | Collapse all

Sample source code of HMC REST client in Python

  • 1.  Sample source code of HMC REST client in Python

    Posted Thu April 16, 2015 05:40 AM

    Originally posted by: Niraj Shah IBM


    We have published sample source code for writing REST API client for HMC. It is implemented in Python. You can access it from https://github.com/PowerHMC/HmcRestClient. It is a starter kit for the users interested in exploiting the HMC REST APIs. You can download the source code and modify according to your requirement. If you have written something cool please share it at the same place so it becomes available to other users.

     

    Thanks and regards,

    Niraj Shah



  • 2.  Re: Sample source code of HMC REST client in Python

    Posted Mon December 19, 2016 03:12 AM

    Originally posted by: SatyabhanPal


    Hello Niraj,

                     Thanks for writing this HMC rest Client and it's really the time saver for me , but while running this hmc rest client to get the Managed system list I am getting below error.

      raise pyxb.UnrecognizedContentError(self, self.__automatonConfiguration, value, location)
    pyxb.exceptions_.UnrecognizedContentError: Invalid content CurrentManufacturingDefaultConfigurationS
    ource at <unknown>[26:8] (expect {http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/}Pe
    ndingTurbocoreEnabled)

     

    Looking into the error I think the code is expecting "PendingTurbocoreEnabled" but getting CurrentManufacturingDefaultConfigurationSource. This may be because of the schema is not updated for new version. Even if I go and search for CurrentManufacturingDefaultConfigurationSource in UOM.py I am not able to get it. I think we need to update the UOM.py file.

     

    Can you please help us , how we can update the UOM.py file using pybxgen.

    Any help will be appreciated

    hmc version :8.4.0

    Thanks,

    Satyabhan Pal.



  • 3.  Re: Sample source code of HMC REST client in Python

    Posted Tue December 20, 2016 01:45 AM

    Originally posted by: SatyabhanPal


    I need to update the UOM.py and  ManagedSystemPcmPreferences.py file as new version hmc has new schema.

    To generate new source code I need new xsd file for UOM and  ManagedSystemPcmPreferences object.

    Can you please help me How I can get the new UOM and ManagedSystemPcmPreferences xsd file for rest call.



  • 4.  Re: Sample source code of HMC REST client in Python

    Posted Thu January 05, 2017 11:25 AM

    Originally posted by: manjunathns


    Hi,

    All the XSDs are part of the jar file which is not accessible for the normal HMC user. The UOM.xsd has reference of the other XSDs which can not be downloaded. We are working on removing the dependency so that xsd to py can be generated easily. While we work on it, could you please let me know the version of HMC you are using? Thanks!

    -Manju



  • 5.  Re: Sample source code of HMC REST client in Python

    Posted Wed January 11, 2017 07:28 AM

    Originally posted by: SatyabhanPal


    Hello Manju,

                    Thanks for reply. Currently we are using HMC 8.4.0.

    Thanks,

    Satyabhan Pal



  • 6.  Re: Sample source code of HMC REST client in Python

    Posted Mon March 26, 2018 09:49 PM

    Originally posted by: RayTan


    Hi Manju,

     

        How to get the both xsd files? Currently, we are using HMC 8.3.0.

        Also, it is better that you could tell us how to generate the UOM.py and  ManagedSystemPcmPreferences.py file because we need to work our app for more HMC versions.  Thanks you very much.

     

    Thanks,

    Ray Tan



  • 7.  Re: Sample source code of HMC REST client in Python

    Posted Wed March 28, 2018 06:11 AM

    Originally posted by: Shunli


    Thanks for the great work of the rest client.

     

    I would like to know how to get both the xsd file?

    Does this client can work for all HMC V8 versions?

    Does this client can work with Power6, Power7 machine? The only requirement is that the HMC version should be V8r8.1, right?

     

    Thanks.