Forum Discussion

Joel_Breton's avatar
Joel_Breton
Icon for Nimbostratus rankNimbostratus
Jun 01, 2017

Change default Route Domain for a Partition - Python F5-SDK

I am trying to change the default route domain for a partition using the F5-SDK.

Here's my code to create the partition and route domain

 

from f5.bigip import ManagementRoot
bigip = ManagementRoot('ipaddress', 'user', 'password')

newpart = bigip.tm.sys.folders.folder.create(name='mypartition',subPath='/')
newrd = bigip.tm.net.route_domains_route_domain.create(name='myrd', id='1', partition='mypartition')

 

After running the script my partition is created and my route domain is created now I need to change the default route domain for my new partition. By default the partition gets assigned the default route domain 0.

Here's what I've tried

 

newpart.update(default_rd_id='1')

 

If I browse the API https:/localhost/mgmt/tm/sys/folder I can't find the value to modify

 

{
    kind: "tm:sys:folder:folderstate",
    name: "mypartition",
    subPath: "/",
    fullPath: "/mypartition",
    generation: 38,
    selfLink: "https://localhost/mgmt/tm/sys/folder/~mypartition?ver=12.1.2",
    deviceGroup: "none",
    hidden: "false",
    inheritedDevicegroup: "true",
    inheritedTrafficGroup: "true",
    noRefCheck: "false",
    trafficGroup: "/Common/traffic-group-1",
    trafficGroupReference: {
    link: "https://localhost/mgmt/tm/cm/traffic-group/~Common~traffic-group-1?ver=12.1.2"
}

 

No RepliesBe the first to reply