Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

12.1.2 Issue - iControl RestAPI

Hello

I upgraded a pair of vCMP Guest from 11.6.1 to 12.1.2.

There is a script local to the vCMP Guesta that moves a VLAN to a specific Route-Domain. (this has worked fine for years on 11.6.1). However after the upgrade, this script now fails with an error 400.

Error Code ""code":400,"message":"script did not successfully complete, status:1","errorStack":[],"apiError":26214401}

RestAPI Call curl -sk -u username:password -X POST https://PRIMARY_VCMP_GUEST/mgmt/tm/cli/script?ver=11.6.0 -H "Content-Type: application/json" -d '{"command":"run","utilCmdArgs":"move_vlan_route_domain_script Route_Domain_ID VLAN_ID add"}'

move_vlan_route_domain_script details

{ proc script::run {} { if { $tmsh::argc !=4 } { puts "a routeDomainName and a vlanName must be provided" exit 123 } set zero [lindex $tmsh::argv 0] set routeDomain [lindex $tmsh::argv 1] set vlanName [lindex $tmsh::argv 2] set command [lindex $tmsh::argv 3] puts "tmsh::modify /net route-domain $routeDomain vlans $command { $vlanName }" tmsh::modify /net route-domain $routeDomain vlans $command "{ $vlanName }" exit 0 } }

Any assistance, work-arounds..etc would be greatly appreciated.

Thank-You Scott

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

So the answer is related to TCL syntax.

It's possibly bug or enforcing a syntax structure previously not enforced but we remove the puts command and the script ran as expected.

Thanks Scott

0