Forum Discussion
tmsh equivalent of 'b shell partition' command?
DeVon
16 Replies
- Mark_Crosland_2Historic F5 AccountHere you go...
modify cli admin-partitions query-partitions [all | { [name]...} ] update-partition [name]
help cli admin-partitions - Alscion_68122
Nimbostratus
EDIT : Ok, I understoodI use it like that :
I select my partition :
tmsh::modify cli admin-partitions query-partitions all update-partition part1
I create my object in the wanted partition :
tmsh::create net vlan vlan1
I come back in Common partiton
tmsh::modify cli admin-partitions query-partitions all update-partition Common
Have fun!
- kev_245_28249
Nimbostratus
in Regards to admin partitions per route dom id.
it seems that if you want to create an object within a route domain within a created partition, and you enter into the created partition as mentioned above "modify ....", one still needs to specify the route domain id to the node in order for it to be correctly applied.
I was hoping it would be like in the gui when you select your admin partition on the top right of the screen and then just configure objects without the %id (route dom id). - hoolio
Cirrostratus
Hi Kev,
You could open a request for enhancement case with F5 Support on this. It seems like a logical addition to iControl.
Aaron - Sake_Blok
Nimbostratus
And how do I do that from the CLI, I would like to list config items from specific partitions and/or create items in a particular partition. But I can't seem to change to my partition:
[root@ltm03:ModuleNotLicensed:Active:Standalone] tmp tmsh modify cli admin-partitions query-partitions TEST update-partition TEST Syntax Error: "query-partitions" unknown property [root@ltm03:ModuleNotLicensed:Active:Standalone] tmp tmsh modify cli admin-partitions query-partition TEST update-partition TEST Syntax Error: "query-partition" unknown property [root@ltm03:ModuleNotLicensed:Active:Standalone] tmp tmsh modify cli admin-partitions update-partition TEST Syntax Error: admin-partitions may only be specified in a config file [root@ltm03:ModuleNotLicensed:Active:Standalone] tmpSo how can I add a partition name to the commands:
tmsh list ltm virtual tmsh create ltm node xxx { address 1.1.1.1 } - Mark_Crosland_2Historic F5 AccountLooks like you are using a V11.X product. In that case, the cd command will move you to a different partition. When a partition is created a top level folder (sys folder) is also created. When a top level folder is created a partition is also created.
(tmos) cd /Common
(tmos) create sys folder /myPartition
(tmos) list auth partition (should see myPartition)
(tmos) cd /myPartition
now create config, it will be in myPartition - Sake_Blok
Nimbostratus
Hi Mark,
Thank you for your response. Indeed I'm using v11.x and I know about the cd'ing into a partition from **within** tmsh, but how do I do that when invoking a tmsh command from the bash shell?
I would like to the the following from the bash shell:
$ tmsh list ltm virtual
$ tmsh create ltm node xxx { address 1.1.1.1 }
$ tmsh load sys config merge file /tmp/x
but these all work on Common, how can I make them work on another partition? - Mark_Crosland_2Historic F5 AccountI believe you would need to fully qualify the path to the objects.
tmsh create ltm node /myPartition/xxx { address 1.1.1.1 }
Would you raise an issue with support, that would appear to be useful functionality that has been lost (the shell is not remembering context). - Jason_40733
Cirrocumulus
Still looking for a single command from bash to do it all. A very limited set of items work currently.
tmsh list net self //? lists self ips..
tmsh list net route-domain //? lists the route-domains.
Doesn't work with Vlans, routes, ltm nodes, pools, virtuals. - nitass
Employee
not sure if this is called a single command.
e.g.[root@ve11a:Active:Changes Pending] config tmsh -c "cd /par1;list net vlan" net vlan test { if-index 144 partition par1 tag 4092 }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
