Removing all the Users Permission on Data Center

22 Feb
2017
22 Feb
'17
9:35 a.m.
Hello, Sorry but there is a errata in this piece: u = kvm.users.get(id=userid) for perm in u.permissions.list(): udc = perm.get_data_center() if udc: globaldc = kvm.datacenters.get(id=udc.get_id()) if globaldc.get_name() == dc: perm.delete() The perm.delete() call is not correct and you need to put the following two lines: permission_service = permissions_service.permission_service(id= data_center_permission.id) permission_service.remove() Of course you need: permissions_service = system_service.permissions_service() Thanks and sorry for the errata Manuel
3096
Age (days ago)
3096
Last active (days ago)
0 comments
1 participants
participants (1)
-
Manuel Luis Aznar