Forum Discussion
How do I create a route-domain in vcmp using curl?
- Mar 27, 2014
You need to protect your strings from interpolation. See below, I have added single quotes around your username and password, and around your POST data:
curl -k -u 'admin:admin1!' -H "Content-Type: \ application/json" -X POST -d '{"name":"d2vc1fc1","id":2,"vlans":["vlan1101","vlan1201","vlan101"]}' https://10.1.1.12/mgmt/tm/net/route-domain
Thanks again uni. It works when i used a linux machine.
[lunguyen@ashnetutil2 ~]$ curl -k -u 'admin:admin1!' -H "Content-Type: application/json" -X POST -d '{"name":"d2vc1fc1","id":2,"vlans":["vlan1101","vlan1201","vlan101"]}' https://10.1.1.12/mgmt/tm/net/route-domain {"kind":"tm:net:route-domain:route-domainstate","name":"d2vc1fc1","fullPath":"d2vc1fc1","generation":158473,"selfLink":"https://localhost/mgmt/tm/net/route-domain/d2vc1fc1?ver=11.5.0","id":2,"strict":"enabled","vlans":["/Common/vlan101","/Common/vlan1201","/Common/vlan1101"],"fwRulesReference":{"link":"https://localhost/mgmt/tm/net/route-domain/~Common~d2vc1fc1/fw-rules?ver=11.5.0","isSubcollection":true}}
root@(vc1fc1)(cfg-sync In Sync)(/S1-green-P:Active)(/Common)(tmos) list net route-domain net route-domain 0 { id 0 vlans { http-tunnel socks-tunnel vlan4093 } } net route-domain d2vc1fc1 { id 2 vlans { vlan101 vlan1201 vlan1101 } }
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