Forum Discussion

rob_carr_76748's avatar
rob_carr_76748
Icon for Nimbostratus rankNimbostratus
Nov 07, 2014

Creating a virtual that listens on all vlans via iControl REST

I've looked at the codeshare examples for iControl REST, for example " target="_blank">here. But what I can't figure out is how to create a virtual that listens on all vlans. My experience so far indicates that omitting the 'vlans' parameter from the iControl REST call creates a virtual server with 'VLAN and Tunnel' set to 'enabled on', but with no vlans specified. In 11.6.0, this is a non-functional configuration.

 

Any suggestions on how to make this work?

 

2 Replies

  • You should be able to create a VS manually with your desired setting and then do a GET to see how it should be formatted. I've been trying on v11.4.1 but seem to be getting authentication errors. Something like this should work;

    curl -k -u username:password -X GET "https://'hostname_or_IP'/mgmt/tm/ltm/virtual"
    

    As its all based on tmsh commands, I'd imagine what you need to pass is this (in addition to all the rest);

    payload['vlans'] = 'default'
    
  • The issue turned out to be with the framework executing the REST calls I needed. There was a silent "vlansEnabled = []" being set, which causes the virtual server to not listen on any vlan interfaces.