Cannot retrieve proper partition list using iApp

Hi there! I am trying to develop an iApp in order to retrieve the existing partition list and if a partition does not exist intending to create a new one. Unfortunately, using the following commands cannot retrieve the list (just only the names not all the properties) in the presentation window.

  1. iapp::get_items auth partition all-properties
  2. tmsh::list auth partition

Version: 11.6.0

Any idea what I am missing or what the appropriate rule should be.

Appreciate your help. Cheers.

Best regards Hyder

“iapp::get_items -norecursive auth partition” should return partition names. It returns answers based on your user role, however, so if you are not logged in as “admin,” you will not see all partitions.

That’s awesome. Thanks very much Fred. Best regards Hyder

By the way, Fred, if would like to retrieve the current partition, which command should I use? Cheers.

pwd

Thanks Fred. Sorry my question was not clear. I am looking for getting the current partition to be shown in the iApp presentation window. Something like iapp::get_items -norecursive auth partition current-partition. Cheers.

This code will display it in the form of a dropdown menu. Of course, the partition is already displayed by the main UI in the upper right-hand corner of the frame. choice my_partition tcl { return [tmsh::pwd] }

You are absolutely brilliant Fred. Thanks very much.

Hello Fred, one last question is about creating the partition in the iApp implementation part. While running this command seems not working [iapp::conf create auth partition TEST] . However, while running from tmsh I can create it using the command of ‘tmsh create auth partition TEST’. Appreciate if you could advise if anything is missing on this. Cheers.

I just tested, and [iapp::conf create auto partition TEST] works fine for me. Are you logged in with admin privilege when you run the iapp?

yes Fred, I can create using the tmsh command line no problem. Just cannot create from iApp. I am using my local virtual F5. Suppose I am creating the partition TEST11 and can see this output in the /shared/tmp/scriptd.out ‘create auth partition TEST11’, however in a later part of the presentation, after creating the partition, I would like to create a logging profile which is supposed to contain a pool and monitor for that pool. And I am getting this error message in the GUI “01070734:3: Configuration error: Can’t associate (/TEST11/test_user5.app/test_user5_icmp) with folder (/TEST11/test_user5.app) folder does not exist” Additionally, /var/log/audit it stops here: May 21 14:52:53 f5 notice mcpd[7508]: 01070417:5: AUDIT - client tmsh, tmsh-pid-17618, user admin - transaction 843856-56 - object 0 - create_if { app_instance_value { app_instance_value_instance “/Common/test_user5.app/test_user5” app_instance_value_name “asm_partition__partition_name” app_instance_value_value “TEST11” app_instance_value_encrypted 0 } } [Status=Command OK] This iApp is to create a new partition as well as to create a new virtual server, pool and monitor for it. Is there any limitation for it to have partition and other configuration in the same iApp? I tried to use the perl script to call the iControl externally as well, seems its failing to create the partition as well as well. Cheers. Best regards Hyder

Hyder- My example [iapp::conf create auto partition TEST] was run inside an iapp, and it works. It appears that you expect to use an iapp, initially running in /Common, to create a partition /TEST11, then move itself (the iapp instance) into that partition before creating other configuration objects. That is new territory for me, but it seems dubious. I could not comment further without doing some lab work.

Thanks very much for all the information Fred. Its already been so much helpful up to here. Perhaps it will be better approach to create two separate iApps to implement the requirements. I was also researching on if there is any perl script you are aware of to call the iControl API to create partition. I was investigating on the following code, however, with no success: my $param = SOAP::Data->name($folders_param)->value($folders); my $response_creation = $aso_handle->create($param); Any clue where I could find the related log being created.

I do not know. You might re-post your question as a SOAP API question.