Forum Discussion
Automatically take server out of service
As for the specific APIs you'll want to implement this, you can determine what partitions the use has access to by calling the Management.UserManagement.get_my_permission() method
http://devcentral.f5.com/wiki/default.aspx/iControl/Management__UserManagement__get_my_permission.html
Click here
This will return, for the current logged in user, an array of partition names it has access to along with the management role associated with that connection.
To query the current active partition for the given user, you will use the Management.Partition.get_active_partition() method.
http://devcentral.f5.com/wiki/default.aspx/iControl/Management__Partition__get_active_partition.html
Click here
To switch to a new partition, you'll want to use the Management.Partition.set_active_partition() method
http://devcentral.f5.com/wiki/default.aspx/iControl/Management__Partition__set_active_partition.html
Click here
I just put together a little PowerShell script that illustrates how to use the various APIs.
http://devcentral.f5.com/wiki/default.aspx/iControl/PsPartitionAccess.html
Click here
Here's some sample output (replace bigip, user, and pass with your settings).
PS C:\scripts> .\PartitionAccess.ps1 -hostname bigip -user user -pass pass
Active Partition : Common
Available User Partitions
-------------------------
DevCentral : USER_ROLE_MANAGER
-------------------------
PS C:\scripts> .\PartitionAccess.ps1 -hostname bigip -user user -pass pass -partition DevCentral
Active Partition : DevCentral
PS C:\scripts> .\PartitionAccess.ps1 -hostname bigip -user user -pass pass
Active Partition : DevCentral
Available User Partitions
-------------------------
DevCentral : USER_ROLE_MANAGER
-------------------------
PS C:\scripts> .\PartitionAccess.ps1 -hostname bigip -user user -pass pass -partition Common
Active Partition : Common
PS C:\scripts> .\PartitionAccess.ps1 -hostname bigip -user user -pass pass
Active Partition : Common
Available User Partitions
-------------------------
DevCentral : USER_ROLE_MANAGER
-------------------------
Hope this helps...
-Joe
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com