Update Virtual Network Appliance

Summary

Update Virtual Network Appliance.

Type

  • Update

Synchronous/Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • PATCH

HTTP Request Path

{api_endpoint}/v1.0/virtual_network_appliances/{virtual_network_appliance_id}

HTTP Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>
X-VNA-Request-Id: <request_id>

Note

  • You can set the request_id for a specific request.
  • The request_id is unique for each tenant.
  • If you make the request again with the same Path and the same method and the same request_id, the request is ignored and you can receive a response similar to show virtual_network_appliance at the current time.
  • For example, when you failed to receive a response after requested, you can confirm whether the request succeeded or failed by requesting again with the same request_id. Also, this prevents duplicate execution of requests.

HTTP Request Body

Parameters

Input Parameters
name style datatype format update type description required/optional default value action for invalid parameter response code for invalid parameter
token_id Header String Non-Hyph-uuid - keystone authentication token required   Terminate 401
request_id Header String Hyph-uuid -   optional      
virtual_network_appliance_id URL String Hyph-uuid - ID of the Virtual_Network_Appliance required   Terminate 404
virtual_network_appliance Body Object - -   required   Terminate 400
name Body String String(0-255) MetaData Name of the Virtual_Network_Appliance optional   Terminate 400
description Body String String(0-255) MetaData Description of the Virtual_Network_Appliance optional   Terminate 400
tags Body Object - MetaData Tags of the Virtual_Network_Appliance optional   Terminate 400
interfaces Body Object - - Attached interfaces optional   Terminate 400
interface_<slot_number> Body Object - -   optional   Terminate 400
interfaces.interface_<slot_number>.name Body String String(0-255) MetaData Name of the Interface optional ge-0/0/<slot_number - 1> Terminate 400
interfaces.interface_<slot_number>.description Body String String(0-255) MetaData Description of the Interface optional   Terminate 400
interfaces.interface_<slot_number>.tags Body Object - MetaData Tags of the Interface optional   Terminate 400
interfaces.interface_<slot_number>.network_id Body String Hyph-uuid Interface The ID of network this Interface belongs to. optional   Terminate 400
interfaces.interface_<slot_number>.fixed_ips Body Array<Object> - Interface List of fixes IP addresses assign to Interface. optional See notes Terminate 400
interfaces.interface_<slot_number>.fixed_ips.ip_address Body String Ipv4 Interface The IP address assign to Interface within subnet. required   Terminate 400
interfaces.interface_<slot_number>.allowed_address_pairs Body Array<Object> - Allowed_Address_Pairs Allowed address pairs optional   Terminate 400
interfaces.interface_<slot_number>.allowed_address_pairs.ip_address Body String Ipv4 Allowed_Address_Pairs   required   Terminate 400
interfaces.interface_<slot_number>.allowed_address_pairs.mac_address Body String Mac_Address Allowed_Address_Pairs   required   Terminate 400
interfaces.interface_<slot_number>.allowed_address_pairs.type Body String String(0-255) Allowed_Address_Pairs   required   Terminate 400
interfaces.interface_<slot_number>.allowed_address_pairs.vrid Body Integer Integer(0-255) Allowed_Address_Pairs   required   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 OK
400 Bad Request
401 Unauthorized
404 Not Found
409 Conflicted
500 Internal Server Error

Response Body

Format

{
  "virtual_network_appliance": {
    "name": "<name>",
    "id": "<id>",
    "appliance_type": "<appliance_type>",
    "description": "<description>",
    "availability_zone": "<availability_zone>",
    "os_monitoring_status": "<os_monitoring_status>",
    "os_login_status": "<os_login_status>",
    "vm_status": "<vm_status>",
    "operation_status" : "<operation_status>",
    "virtual_network_appliance_plan_id": "<virtual_network_appliance_plan_id>",
    "tenant_id": "<tenant_id>",
    "tags": {},
    "interfaces": {
      "interface_<slot_number>": {
        "name": "<name>",
        "description": "<description>",
        "network_id": "<network_id>",
        "updatable": "<updatable>",
        "tags": {},
        "fixed_ips": [
          {
            "ip_address": "<ip_address>",
            "subnet_id": "<subnet_id>"
          }
        ],
        "allowed_address_pairs":[
          {
            "ip_address": "<ip_address>",
            "mac_address": "<mac_address>",
            "type": "<type>",
            "vrid": "<vrid>"
          }
        ]
      }
    }
  }
}

Parameters

Response Parameters
item datatype format description
virtual_network_appliance Object -  
name String String(0-255) Name of the Virtual_Network_Appliance
id String Hyph-uuid It identifies Virtual_Network_Appliance uniquely.
appliance_type String String(0-255) Type of appliance
description String String(0-255) Description of the Virtual Network Appliance
availability_zone String String(0-255) Availability Zone, this can be referred to using Virtual Server (Nova)’s list availability zones
os_monitoring_status String String(0-255) OS Monitoring Status
os_login_status String String(0-255) OS Login Status
vm_status String String(0-255) VM Status
operation_status String String(0-255) Operation Status
virtual_network_appliance_plan_id String Hyph-uuid It identifies Virtual_Network_Appliance_Plan uniquely.
tenant_id String Non-Hyph-uuid Tenant ID of the owner (UUID)
tags Object - Tags of the Virtual_Network_Appliance
interfaces Object - Attached interfaces
interfaces.interface_<slot_number> Object -  
interfaces.interface_<slot_number>.name String String(0-255) Name of the Interface
interfaces.interface_<slot_number>.description String String(0-255) Description of the Interface
interfaces.interface_<slot_number>.network_id String Hyph-uuid The ID of network this Interface belongs to.
interfaces.interface_<slot_number>.updatable Boolean -  
interfaces.interface_<slot_number>.tags Object - Tags of the Interface
interfaces.interface_<slot_number>.fixed_ips Array<Object> - List of fixes IP addresses assign to Interface.
interfaces.interface_<slot_number>.fixed_ips.ip_address String Ipv4 The IP address assign to Interface within subnet.
interfaces.interface_<slot_number>.fixed_ips.subnet_id String Hyph-uuid The ID of subnet from which IP address is allocated.
interfaces.interface_<slot_number>.allowed_address_pairs Array<Object> - Allowed address pairs
interfaces.interface_<slot_number>.allowed_address_pairs.ip_address String Ipv4  
interfaces.interface_<slot_number>.allowed_address_pairs.mac_address String Mac_Address  
interfaces.interface_<slot_number>.allowed_address_pairs.type String String(0-255)  
interfaces.interface_<slot_number>.allowed_address_pairs.vrid Integer Integer(0-255)  

Sample Request and Response

Sample API Request

Request URI

https://{api_endpoint}/v1.0/virtual_network_appliances/{virtual_network_appliance_id}

Request Header

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

Request Body (When the Update Type is Allowed_Address_Pairs)

{
  "virtual_network_appliance": {
    "name": "update_name_of_virtual_network_appliance",
    "description": "update_description_of_virtual_network_appliance",
    "tags": {},
    "interfaces": {
      "interface_1": {
        "name": "update_name_of_virtual_network_appliance_interface_1",
        "description": "update_description_of_virtual_network_appliance_interface_1",
        "tags": {},
        "allowed_address_pairs": [
          {
            "ip_address": "192.168.10.110",
            "mac_address": "",
            "type": "vrrp",
            "vrid": 10
          }
        ]
      },
      "interface_2": {
        "name": "update_name_of_virtual_network_appliance_interface_2",
        "description": "update_description_of_virtual_network_appliance_interface_2",
        "tags": {},
        "allowed_address_pairs": [
          {
            "ip_address": "172.16.0.120",
            "mac_address": "00:00:5e:00:01:01",
            "type": "",
            "vrid": null
          }
        ]
      }
    }
  }
}

Request Body (When Update Type is Interface)

Case 1: Attaching a network to an interface to which no network is attached or Changing network_id and fixed_ips of an interface to which a network is already attached

{
  "virtual_network_appliance": {
    "name": "update_name_of_virtual_network_appliance",
    "description": "update_description_of_virtual_network_appliance",
    "tags": {},
    "interfaces": {
      "interface_1": {
        "name": "update_name_of_virtual_network_appliance_interface_1",
        "description": "update_description_of_virtual_network_appliance_interface_1",
        "tags": {},
        "network_id": "01effce6-459d-47e3-a17a-e40ac437ae10",
        "fixed_ips": [
          {
            "ip_address": "192.168.10.100"
          }
        ]
      }
    }
  }
}

Case2: Changing only fixed_ips (not network_id) of an interface to which a network is already attached

{
  "virtual_network_appliance": {
    "interfaces": {
      "interface_1": {
        "fixed_ips": [
          {
            "ip_address": "192.168.10.200"
          }
        ]
      }
    }
  }
}

Case3: Detaching an interface

{
  "virtual_network_appliance": {
    "interfaces": {
      "interface_1": {
        "network_id": ""
      }
    }
  }
}

Sample API Response

Response Header

HTTP/1.1 200 OK

Response Body

{
  "virtual_network_appliance": {
    "name": "virtual_network_appliance_name",
    "id": "a80c1728-cc0c-11e6-8080-525400060300",
    "appliance_type": "ECL::VirtualNetworkAppliance::VSRX",
    "description": "virtual_network_appliance_name_description",
    "default_gateway": "192.168.0.1",
    "availability_zone": "zone1-groupa",
    "os_monitoring_status": "ACTIVE",
    "os_login_status": "ACTIVE",
    "vm_status": "ACTIVE",
    "operation_status" : "ACTIVE",
    "virtual_network_appliance_plan_id": "b0cdb8c5-aaf0-48eb-81ac-f211b54da53c",
    "tenant_id": "13572f6f42a74d2b82f7099f78d0393a",
    "tags": {},
    "interfaces": {
      "interface_1": {
        "name": "interface_1_name",
        "description": "interface_1_description",
        "network_id": "01effce6-459d-47e3-a17a-e40ac437ae10",
        "updatable": true,
        "tags": {},
        "fixed_ips": [
          {
            "ip_address": "192.168.10.100",
            "subnet_id": "8c2cdf01-1aa5-49e4-9c8b-34bba452fe88"
          }
        ],
        "allowed_address_pairs": [
          {
            "ip_address": "192.168.10.110",
            "mac_address": "00:00:5e:00:01:0a",
            "type": "vrrp",
            "vrid": 10
          }
        ]
      },
      "interface_2": {
        "name": "interface_2_name",
        "description": "interface_2_description",
        "network_id": "6f3fe4d9-f504-4f0b-8ffc-26ed4513ccd7",
        "updatable": true,
        "tags": {},
        "fixed_ips": [
          {
            "ip_address": "172.16.0.100",
            "subnet_id": "298d6d30-7148-4335-a780-f57532fc41a7"
          },
          {
            "ip_address": "172.16.0.110",
            "subnet_id": "298d6d30-7148-4335-a780-f57532fc41a7"
          }
        ],
        "allowed_address_pairs": [
          {
            "ip_address": "172.16.0.120",
            "mac_address": "00:00:5e:00:01:01",
            "type": "",
            "vrid": null
          }
        ]
      }
      (snip)
    }
  }
}

Example Error Message

HTTP Request

PATCH /v1.0/virtual_network_appliances/{virtual_network_appliance_id} HTTP/1.1
User-Agent: curl/7.51.0
Host: 10.1.131.140
Accept:application/json
X-Auth-Token:4e54395a12b740d585d74190ba4eb14b
Content-Type: application/json

HTTP Response

HTTP/1.1 404 Not Found
Server: nginx
Date: Wed, 07 Feb 2018 06:49:20 GMT
Content-Type: application/json
Content-Length: 25
Connection: keep-alive

{
    "message": "Not Found."
}