Add Network Join to Compute Resource

To create a network join (assign the network to the compute resource), use the following request:

POST /settings/hypervisors/:hypervisor_id/network_joins.xml
POST /settings/hypervisors/:hypervisor_id/network_joins.json

You can add networks to a compute resource only if the zones to which the two entities belong are of the same type. For more information refer to Zone Types.

XML Request Example

curl -i -X POST http://onapp.test/settings/hypervisors/35/network_joins.xml -d '<network_join><network_id>4</network_id><interface>interface_test</interface></network_join>' -u account_email:API_key -H 'Accept: application/xml' -H 'Content-type: application/xml' 

JSON Request Example

curl -i -X POST http://onapp.test/settings/hypervisors/35/network_joins.json -d '{"network_join":{"network_id":"4", "interface":"interface_test"}}' -u account_email:API_key -H 'Accept: application/json' -H 'Content-type: application/json' 

Where:

network_id* - ID of the network you wish to attach

interface* - the name of the appropriate network interface