Create tenant_connection

Summary

Create tenant_connection resource.

Type

  • Create

Target object of API

  • tenant_connection

Synchronous/Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • POST

HTTP Request Path

{api_endpoint}/v2.0/tenant_connections

HTTP Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>

HTTP Request Body

Format

{
    "tenant_connection": {
        "name": "<name>",
        "description": "<description>",
        "tags": {},
        "tenant_connection_request_id": "<tenant_connection_request_id>",
        "device_type": "<device_type>",
        "device_id": "<device_id>",
        "device_interface_id": "<device_interface_id>",
        "attachment_opts": {}
    }
}

Parameters

Input Parameters

name

style

format

description

required/optional

default value

action for invalid parameter

response code for invalid parameter

token_id

Header

authentication token string(varchar)

keystone authentication token

required

Terminate

401

tenant_connection

Body

Object

required

Terminate

400

name

Body

String(255)

Name of tenant_connection.

optional

Terminate

400

description

Body

String(255)

Description of tenant_connection.

optional

Terminate

400

tags

Body

Object

tenant_connection tags

optional

Terminate

400

tenant_connection_request_id

Body

String(UUID)

ID of the tenant_connection_request.

required

Terminate

400

device_type

Body

String(ECL::Compute::Server, ECL::Baremetal::Server, ECL::VirtualNetworkAppliance::VSRX)

device type.

required

Terminate

400

device_id

Body

String(UUID)

ID of the device of the device_type.

required

Terminate

400

device_interface_id

Body

String(UUID)

ID of the interface of the device. Required for device_type in ECL::Baremetal::Server, ECL::VirtualNetworkAppliance::VSRX. For device_type: ECL::Baremetal::Server, network_physical_port_id should be used. For ECL::VirtualNetworkAppliance::VSRX, interfaces.interface_<slot_number> should be used.

optional

Terminate

400

attachment_opts

Body

Object

Additional options for tenant_connection. This will be proxied to create underlaying connection.

optional

Terminate

400

Format and Parameter details of attachment_opts for device_type in ECL::Compute::Server, ECL::Baremetal::Server

For device_type in ECL::Compute::Server, ECL::Baremetal::Server, attachment_opts will be proxied to Create Port of Network API.

{
    "segmentation_type": "<segmentation_type>",
    "segmentation_id": "<segmentation_id>",
    "fixed_ips": [
        {
            "ip_address": "<ip_address>",
            "subnet_id": "<subnet_id>"
        }
    ],
    "allowed_address_pairs": [
        {
            "ip_address": "<ip_address>",
            "mac_address": "<mac_address>"
        }
    ]
}
Parameters for attachment_opts for device_type in ECL::Compute::Server, ECL::Baremetal::Server

name

style

format

description

required/optional

default value

action for invalid parameter

response code for invalid parameter

segmentation_type

Body

String(flat, vlan)

Segmentation type used for port. Only valid for device_type = ECL::Baremetal::Server.

optional

Terminate

400

segmentation_id

Body

Int()

Segmentation id used for port. Only valid for device_type = ECL::Baremetal::Server.

optional

Terminate

400

fixed_ips

Body

Array

Array of IP address assignment objects, attached to port.

optional

Terminate

400

fixed_ips.ip_address

Body

String(IPv4/IPv6)

IP address assigned to port.

optional

Terminate

400

fixed_ips.subnet_id

Body

String(UUID)

The ID of subnet from which IP address is allocated.

optional

Terminate

400

allowed_address_pairs

Body

Array

Array of Allowed address pairs

optional

Terminate

400

allowed_address_pairs.ip_address

Body

String(IPv4/IPv6)

IP address assigned to port for Allowed address pairs.

optional

Terminate

400

allowed_address_pairs.mac_address

Body

String(MAC)

MAC address assigned to port for Allowed address pairs.

optional

Terminate

400

Format and Parameter details of attachment_opts for device_type in ECL::VirtualNetworkAppliance::VSRX

For device_type in ECL::VirtualNetworkAppliance::VSRX, attachment_opts will be proxied to Update VNA (Update Type: Interface) of VNA API.

{
    "fixed_ips": [
        {
            "ip_address": "<ip_address>"
        }
    ]
}
Input Parameters for attachment_opts for device_type in ECL::VirtualNetworkAppliance::VSRX

name

style

format

description

required/optional

default value

action for invalid parameter

response code for invalid parameter

fixed_ips

Body

Array<Object>

List of fixes IP addresses assign to Interface.

optional

Terminate

400

fixed_ips.ip_address

Body

String(Ipv4)

The IP address assign to Interface within subnet.

optional

Terminate

400

Response

Response Header

Format

HTTP/1.1 <response_code> <message>       (ex. 200 OK)
  • <response_code>: see "HTTP Responses" section

  • <message>: message based on the response code

Response Code

Response Codes

response code

condition

200

Created

400

Bad request

401

Unauthorized

409

Conflicted

500

Internal server error

Response Body

Format

{
    "tenant_connection":{
        "id": "<tenant_connection_id>",
        "tenant_connection_request_id": "<tenant_connection_request_id>",
        "name": "<name>",
        "description": "<description>",
        "tags": {},
        "tenant_id": "<tenant_id>",
        "name_other": "",
        "description_other": "",
        "tags_other": {},
        "tenant_id_other": "<tenant_id_other>",
        "network_id": "<network_id>",
        "device_type": "<device_type>",
        "device_id": "<device_id>",
        "device_interface_id": "<device_interface_id>",
        "port_id": "<port_id>",
        "status": "creating"
    }
}

Parameters

Response Parameters

item

format

description

tenant_connection

Object

tenant_connection resource

id

String(UUID)

tenant_connection unique ID.

tenant_connection_request_id

String(UUID)

Name of tenant_connection_request.

name

String(255)

Name of tenant_connection.

description

String(255)

Description of tenant_connection.

tags

Object

Tags of tenant_connection.

tenant_id

String(UUID)

Tenant ID of the owner.

name_other

String(255)

Name for the owner of network.

description_other

String(255)

Description for the owner of network.

tags_other

Object

Tags for the owner of network.

tenant_id_other

String(UUID)

The owner tenant of network.

network_id

String(UUID)

Network unique id.

device_type

String(ECL::Compute::Server, ECL::Baremetal::Server, ECL::VirtualNetworkAppliance::VSRX)

device type

device_id

String(UUID)

device unique id.

device_interface_id

String(UUID)

physical port unique ID in Baremetal server.

port_id

String(UUID)

Port unique id.

status

String(creating)

Status of tenant_connection.

Sample Request and Response

Sample API request

Request URI

https://{api_endpoint}/v2.0/tenant_connections

Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: 69105c889f824efdafb56af224208ad4

Request Body

{
    "tenant_connection": {
        "tenant_connection_request_id": "21b344d8-be11-11e7-bf3c-0050569c850d",
        "device_id": "db118796-f1c9-437c-8c8d-84f0bf0bcd69",
        "device_type": "ECL::Compute::Server",
        "name": "create_test_name",
        "description": "create_test_desc"
    }
}

Sample API response

Response Header

HTTP/1.1 200 OK

Response Body

{
    "tenant_connection":{
        "id": "",
        "tenant_connection_request_id": "",
        "name": "",
        "description": "",
        "tags": {},
        "tenant_id": "",
        "name_other": "",
        "description_other": "",
        "tags_other": {},
        "tenant_id_other": "",
        "network_id": "",
        "device_type": "",
        "device_id": "",
        "device_interface_id": "",
        "port_id": "",
        "status": ""
    }
}

Example error message

HTTP request

POST /v2.0/tenant_connections HTTP/1.1
User-Agent: curl/7.37.1
Host: 10.1.131.140
Content_type:application/json
Accept:application/json
X-Auth-Token:4e54395a12b740d585d74190ba4eb14b
Content-Length: 73
Content-Type: application/x-www-form-urlencoded

HTTP Response

HTTP/1.1 400 Bad Request
Server: nginx/1.8.0
Date: Mon, 28 Sep 2015 10:32:56 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 39
Connection: keep-alive

{
    "cause": "Invalid request body"
}