Use VS as Gateway

To make a VS function as a gateway for a network interface, use the following request:

PUT /virtual_machines/:virtual_machine_id/firewall_rules/update_defaults.xml
PUT /virtual_machines/:virtual_machine_id/firewall_rules/update_defaults.json

XML Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<network_interfaces><network_interface_id><use_as_gateway>1</use_as_gateway></network_interface_id></network_interfaces>' --url http://onapp.test/virtual_machines/12/firewall_rules/update_defaults.xml

JSON Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"network_interfaces":{":network_interface_id":{"use_as_gateway":"1"}}}' --url http://onapp.test/virtual_machines/12/firewall_rules/update_defaults.json


network_interface_id - the network interface for which the VS should function as a gateway

use_as_gateway - set to '1' for the VS to function as a gateway to the network interface, otherwise, set to '0'