Managing vEthernet

A virtual Ethernet (vEthernet) is an IaaS object representing an OSI Layer 2 network, defined by a VLAN ID, switch pair name and e-port. vEthernets serve the purpose to isolate networks for instances run by different departments or business units (tenants).

Add vEthernet

This API enables you to add a virtual Ethernet to the network.

Note:

You can only add IPoIB vEthernets.

Method

POST

REST Resource

/vethernet/

URI

https://api_endpoint/vethernet/

Request Body Parameters

Parameter Description
name An unique hierarchical name for Ethernet. For example, /mytenant/public/EoIB
description A description for a vEthernet
type Type of vEthernet (supported types: ipoib).
id Unique identifier for this vEthernet (vLAN ID for eoib/vlan type). Set this parameter to 0 for vEthernet type ipoib.
svcnet (Optional) Service network to use for this vEthernet

Example URI

https://api.oc.example.com/vethernet/

Example Request Body

{        
        "description": "mytenant public net", 
        "name": "/mytenant/public/IPoIB", 
        "type": "ipoib", 
  "id": 0
}

Delete vEthernet

This API enables you to delete virtual Ethernet

Note:

You can only delete IPoIB vEthernets.

Method

DELETE

REST Resource

/vethernet/name

URI

https://api_endpoint/vethernet/name

URI Parameter

Parameter Description
name A unique hierarchical name for the vEthernet. For example, /mytenant/public/myvethernet

Example URI

https://api.oc.example.com/vethernet/mytenant/public/myvethernet

Update vEthernet

This API enables you to update information for a specific virtual Ethernet.

Note:

You can only update IPoIB vEthernets.

Method

PUT

REST Resource

/vethernet/name

URI

https://api_endpoint/vethernet/name

URI Parameter

Parameter Description
name Unique hierarchical name for the vEthernet. For example, /cloud/public/myvEthernet.

Request Body Parameter

Parameter Description
description (Optional)A description for a vEthernet
type Type of vEthernet (supported types: ipoib).
id (Optional)Unique identifier for this vEthernet (vLAN ID for eoib/vlan type). This field is ignored for type ipoib

Example URI

https://api.oc.example.com/vethernet/mytenant/public/IPoIB2

Example Request Body

{
 "description": "Updated Desc for IPoIB vethernet for mytenant", 
 "name": "/mytenant/public/IPoIB2", 
 "type": "ipoib", 
 "id": 0
} 

Example Response Body

{
 "account": "/mytenant/default", 
 "infranet": false, 
 "description": "Updated Desc for IPoIB vethernet for mytenant", 
 "svcnet": null, 
 "uri": "db://bnet/vethernet/mytenant/public/IPoIB2", 
 "vDhcpd_name": null, 
 "name": "/mytenant/public/IPoIB2", 
 "vEthernet_uri": null, 
 "type": "ipoib", 
 "id": 0, 
 "cluster_uri": null, 
 "switchports": null
}

Retrieve vEthernet Details

You can retrieve vEthernet details by using the REST API.

Discover vEthernets

This API enables you to discover virtual Ethernets configured in a specific container.

Note:

The discover API calls display the names of the objects in the specified container, not the details about the objects. To list the names of the objects, you must set the Accept header to application/oracle-compute-v3+directory+json. For all other purposes, you must set the Accept header to application/oracle-compute-v3+json.

Method

GET

REST Resource

/vethernet/container/

URI

https://api_endpoint/vethernet/container/

URI Parameter

Parameter Description
container Hierarchical name-space for vEthernets

Example URI

https://api.oc.example.com/vethernet/oracle/public

Example Response Body

{"result": ["/oracle/public/IPoIB-virt-admin-c2", "/oracle/public/default"]}

List vEthernets

This API enables you to retrieve information for the configured virtual Ethernets in a specific container or subcontainer.

Method

GET

REST Resource

/vethernet/container/

URI

https://api_endpoint/vethernet/container?type=typeValue&id=idValue

URI Parameters

Note:

The output of this command is filtered based on the optional parameters (if specified).
Parameter Description
container Hierarchical name-space for virtual Ethernet
type=typeValue (Optional) Type of vEthernet (supported type: ipoib)

Example URI

https://api.oc.example.com/vethernet/oracle/public/

Example Response Body


{
        "account": null, 
        "infranet": true, 
        "description": 
        "Infrastructure vEthernet: oracle/public/IPoIB-virt-admin-c2", 
        "svcnet": "oracle/public/IPoIB-virt-admin-c2", 
        "uri": "https://api.oc.example.com/vethernet/oracle/public/IPoIB-virt-admin-c2", 
        "vDhcpd_name": null, 
        "name": "/oracle/public/IPoIB-virt-admin-c2", 
        "vEthernet_uri": null, 
        "type": "ipoib", 
        "id": 0, 
        "cluster_uri": null, 
        "switchports": {}
}, 
{
        "account": null, 
        "infranet": false, 
        "description": "Default vethernet for flat IP space.", 
        "svcnet": null, 
        "uri": "https://api.oc.example.com/vethernet/oracle/public/default", 
        "vDhcpd_name": "", 
        "name": "/oracle/public/default", 
        "vEthernet_uri": null, 
        "type": "vlan", 
        "id": 0, 
        "cluster_uri": null, 
        "switchports": {}
}