Power cycling compute blades via UCS Central Python SDK

Recently I am preparing an installation automation for our new Cisco UCS environment which will consist of multiple UCS domains in the near future. As one of the steps, I was trying to power cycle our compute blades via UCS Central Python SDK. Methods are similar to the ones in UCS Manager SDK but separately developed:

srv_obj = handle.query_dn(srv_dn)
srv_obj.admin_power = "cycle-immediate"

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/ucscsdk-", line 716, in commit
raise UcscException(response.error_code, response.error_descr)
ucscsdk.ucscexception.UcscException: [ErrorCode]: 170[ErrorDescription]: Config server power state via Service Profile is not allowed. Please use server operations to perform power operations.

Apparently the feature was disabled in UCS Central API as the solution to a previous bug that prematurely resets blades: https://quickview.cloudapps.cisco.com/quickview/bug/CSCvp40200

I decided to implement it by finding out the domain information of the blade and triggering a power cycle through directly UCS Manager API instead.

My website uses cookies. Click for more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.