Performing a Virtual Interface Switchover Test
Function
Two connections require an automatic switchover to test network connectivity. An automatic switchover causes the virtual interfaces to be disabled or enabled and service traffic to be interrupted.
You can disable or enable a virtual interface.
- If you disable a virtual interface, the shutdown command is executed, and a switchover performed.
- If you enable a virtual interface, the undo_shutdown command is executed.
When a virtual interface is disabled for a switchover, the virtual interface is in the ADMIN_SHUTDOWN state, and no other operations are allowed on the virtual interface. If undo_shutdown is executed, the virtual interface is in the ACTIVE state.
Debugging
For details, see Calling APIs.
URI
POST /v3/{project_id}/dcaas/switchover-test
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. To obtain the token, see section "Obtaining the User Token" in the Identity and Access Management API Reference. The token is the value of X-Subject-Token in the response header. Minimum: 0 Maximum: 10240 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
switchover_test_record |
No |
CreateSwitchoverTest object |
Specifies the parameters for creating a switchover test record. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_id |
Yes |
String |
Specifies the ID of the resource on which the switchover test is to be performed. |
resource_type |
No |
String |
Specifies the type of the resource on which the switchover test is to be performed. Default: virtual_interface Minimum: 0 Maximum: 128 Enumeration values:
|
operation |
Yes |
String |
Specifies whether to perform a switchover test. Value options: shutdown and undo_shutdown Minimum: 0 Maximum: 128 Enumeration values:
|
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID. |
switchover_test_record |
SwitchoverTestRecord object |
Provides supplementary information about the switchover test record. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the unique ID of the switchover test record. |
tenant_id |
String |
Specifies the project ID. Minimum: 32 Maximum: 32 |
resource_id |
String |
Specifies the ID of the resource on which the switchover test is to be performed. |
resource_type |
String |
Specifies the type of the resource on which the switchover test is to be performed. Default: virtual_interface Minimum: 0 Maximum: 128 Enumeration values:
|
operation |
String |
Specifies whether to perform a switchover test. Value options: shutdown and undo_shutdown Minimum: 0 Maximum: 128 Enumeration values:
|
start_time |
String |
Specifies the start time of the switchover test. |
end_time |
String |
Specifies the end time of the switchover test. |
operate_status |
String |
Specifies the switchover test status.
Enumeration values:
|
Example Requests
Shutting down the virtual interface to perform a switchover test
POST https://{dc_endpoint}/v3/de58f033eb664102ba85e4a5db473ca5/dcaas/switchover-test { "switchover_test_record" : { "resource_type" : "virtual_interface", "resource_id" : "d0b3329c-0063-470c-b1dc-657656b2e540", "operation" : "shutdown" } }
Example Responses
Status code: 201
Created
{ "switchover_test_record" : { "id" : "862d61f1-d9ea-4093-ba0e-2b8d415e3ab3", "tenant_id" : "de58f033eb664102ba85e4a5db473ca5", "resource_type" : "virtual_interface", "resource_id" : "d0b3329c-0063-470c-b1dc-657656b2e540", "operation" : "shutdown", "start_time" : "2023-10-09T18:41:23.000Z", "end_time" : "2023-10-09T18:41:23.000Z", "operate_status" : "STARTING" }, "request_id" : "f91634a12b116b6f946d7871f5b4de18" }
Status Code
Status Code |
Description |
---|---|
201 |
Created |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.