Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Blade power management with ls-server-oper permissions #185

Closed
sshkel opened this issue Apr 17, 2019 · 0 comments
Closed

Question: Blade power management with ls-server-oper permissions #185

sshkel opened this issue Apr 17, 2019 · 0 comments

Comments

@sshkel
Copy link

sshkel commented Apr 17, 2019

Hi there,
I am trying to do node power management via sdk. Here is what i have so far.

# Login to the server
handle.login()

servers = handle.query_classid(class_id="LsServer")
print([server.name for server in servers])
server = [server for server in servers if server.name == "hostname"][0]
LsPower(parent_mo_or_dn=server,state=LsPowerConsts.STATE_DOWN)

handle.set_mo(server)
handle.commit()
handle.logout()

In which case I get the following exception

ucsmsdk.ucsexception.UcsException: [ErrorCode]: 170[ErrorDescription]: Insufficient privileges to configure 'lsServer'. User's privileges must have at least one of 'admin,ls-config,ls-server,ls-compute', but user has 'read-only,operations,fault,pn-equipment,pn-policy,pn-maintenance,ls-ext-access,ls-server-oper'

I know that ls-server-oper gives me the following abilities:

Launch KVM

Boot Server

Shutdown Server

Reset

Is there a way to poweroff node via sdk with ls-server-oper privs only?

@sshkel sshkel closed this as completed Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant