Hi,
I have created user using m_userManagement.create_user(users), which didn’t have way to define partion. Is their any other API call which I can use to set up the partion.
Thanks
Hi,
I have created user using m_userManagement.create_user(users), which didn’t have way to define partion. Is their any other API call which I can use to set up the partion.
Thanks
Hi, i had the same problem at first. If you look at the SDK, under the Management namespace, you will see a Partition section. There is a function defined:
void set_active_partition(
in String active_partition
);
the wsdl file is:
bigip/iControl/sdk/wsdl/Management.Partition.wsdl
The set_active_partition, will set the context of the current iControl client as to what partition they are accessing. I believe the question was how to assign a partition to a specific users authorization settings.
If you look into the Management::UserManagement interface you will see the following method:
struct UserPermission {
UserRole role;
String partition;
};
Management.UserManagement.set_user_permission(
in String [] user_names,
in Management__UserManagement__UserPermission [] [] permissions
);
You use this method to specify what role the user is (admin, manager, operator, etc) as well as the partition that he is authorized to access.
Then, in your iControl application, you will have to make a call to Management.UserManagement.get_my_permission() to retrieve which partition the calling user is authorized to access and then call Management.Partition.set_active_partition() to set the context of the current caller’s partition.
Hopefully this clears things up…
-Joe
Joe, you are right I am looking to assign a partition to a specific user.
i am able to create set partition using - Management.UserManagement.set_user_permission
Thanks for help.
Glad to help! Just make sure that your calling application checks the current users partition from the get_my_permission() method and then calls the set_active_partition() method with that partition name.
-Joe
I am planing to provide SOAP API on top of iControl API so I need to use single user to login (lets say admin) on F5 and then change the partion information on user, Virtual Server and Pool to seperate out the customer configration.
By using - Management.UserManagement.set_user_permission i am able to change the user partion information. Is there a way to change the partion information on Virtual Server and Pool after it got created with default user(in my case admin) partion?
Thanks for help.
Unfortunately the answer is no at this point. When an object is created, there is no way to “move” it to another partition aside from deleting it and recreating it in the new partition. This is true in the GUI, CLI, and iControl.
-Joe
Joe,
Let me be little more specific, Is their way we can create (rather then change later) VirtualServer, pool, and node with different partition then user belongs to?
Thru F5 GUI, Once user is created I can’t even see which partion user is belog too, is their a place or link i should be accesing to see the user partion?
Thanks for your quick responces.
Joe,
Thru GUI, I am login as a admin user with administrator permission and able to create VR, POOL and node with different partition so now all i have to see how i can create VR, POOL and node thru iControl API in different partition.
I am also able to see which partion user belongs too which is located on top right cornor of the screen.
Thanks
I am able to set the parttion using following API before creating Virtual Server, Pool, and Node. This is the way i am going to seperate out the Customer confiration. Let me know if i am off track on my thought.
iControl.ManagementPartitionBindingStub m_partition;
m_partition.set_active_partition(“TestPartition”);
Thanks
You are exactly on the right track. Management.Partition.set_active_partition() sets the current “working” partition for the currently connected user. Here’s some pseudo-code for the process for creating the following
Pool1 in partition part_1
Pool2 in partition part_2
Pool3 in partition part_3
Partition.set_active_partition: "part_1"
Pool.create: "Pool1"
Partition.set_active_partition: "part_2"
Pool.create: "Pool2"
Partition.set_active_partition: "part_3"
Pool.create: "Pool3"
You’ll have to make sure that you are an administrator during this process so that you have write access in all of the partitions.
-Joe
The one thing that I’ve noticed is that there is one active partition per user when accessing via iControl. I have multiple modules making iControl API calls (with the same user/password) whichever module sets the active partition last impacts all other modules.
This makes it difficult for a given module to assume that the active partition it just set is still the active partition in the next call and creates a racing condition. This doesn’t seem to be true in the GUI where different GUIs logged in as the same user could still have different active partitions.
I think the partition support in iControl needs to be enhanced to either include a optional parition parameter in most calls (which is a pain) or have some concept of a “session” similar to the GUI and the active partition would be tied to a session. Or is there some other way to work around this issue?
Thanks!
//Joe
That is true. In iControl, we have no concept of a “session”. Each command is a stateless request/response pair. I won’t go into the history on this, but that’s currently how the system works.
For commands like the active partition, where a “state” needs to be set, it is implemented as a global lookup value in the iControl portal. We’ve thought about implementing a user/based configuration for this but it sound like that wouldn’t help you anyway since each of your modules are going over the same user.
What we have implemented to help with this is a honor-driven locking mechanism. In the System.SystemInfo interface the following methods are available:
boolean System.SystemInfo.acquire_lock(
in String lock_name,
in long duration_sec,
in String comment
);
String [] System.SystemInfo.get_lock_list();
LockStatus [] System.SystemInfo.get_lock_status(
in String [] lock_names
);
System.SystemInfo.release_lock(
in String lock_name
);
The idea is that if you want to build locking into your client application, you would define the lock name you want to use. Then you can call acquire_lock() with that lock name, time to hold lock, and a description to request ownership of that lock. If false is returned for acquire_lock, you can use the get_lock_status() method to query how long that lock is taken and then retry again after the lock is released.
As I said, it’s an honor based system, so there is nothing stopping other calls from being made while locks are held, but it does allow you, from within your application, to know when another component is doing something.
Hope this helps…
-Joe
Hi Joe,
Thanks for the tip on using locks - it should help with the racing condition between our modules. However, I guess if some other icontrol-based application is also making calls, the problem still exists. If sessions support is too difficult, any thoughts of adding a partition field to the set of APIs that are affected by the partition?
Thanks!
//Joe
We cannot modify the method signatures without breaking backward compatibility. That would mean that we would have to issue a whole new set of APIs that took partitions as parameters. I don’t have an exact number, but that would likely be 1000+ new methods we would have to introduce. What is more likely is to have a HTTP header based solution that allows a context of sorts to be passed along with the request. The issue here is that it would require some special work on the part of the client developer to hook into the HTTP headers within their respected SOAP toolkits.
If you see this as a show stopping issue for you, I’d suggest you post this to our support organization so that we can get it into the development queue.
-Joe
Thanks, Joe.
I will file a formal request to support. It isn’t a show-stopper right now, but I do think it is a ongoing risk as iControl becomes more popular as a platform and more ISVs (which is the case with us at Symphoniq) start creating more iControl-based add-ons. The risk of interference will become greater the more successful iControl becomes as a platform (assuming of course that partiion usage also increases).
//Joe