GET zstack/v1/zops/check/network
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X GET http://localhost:8080/zstack/v1/zops/check/network?sourceHostnames=172.0.0.1&targetHostnames=test1.com&targetHostnames=test2.com
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
sourceHostnames | List | query | Optional. Specified set of source ip addresses or domain names. | 4.7.21 | |
targetHostnames | List | query | Specified set of target ip addresses or domain names. | 4.7.21 | |
systemTags | List | query | Optional. The system tags. | 4.7.21 | |
userTags | List | query | Optional. The user tags. | 4.7.21 |
{ "results": [ { "sourceHostname": "172.0.0.1", "targetHostname": "test2.com", "status": "Disconnected" }, {} ] }
Name | Type | Description | Starting Version |
---|---|---|---|
success | boolean | 4.7.21 | |
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.7.21 |
results | List | See results. | 4.7.21 |
Name | Type | Description | Starting Version |
---|---|---|---|
sourceHostname | String | The source address. | 4.7.21 |
targetHostname | String | The target address. | 4.7.21 |
status | HostConnectedStatus | See status. | 4.7.21 |
Name | Type | Description | Starting Version |
---|---|---|---|
Connected | HostConnectedStatus | The networke is connected. | 4.7.21 |
Disconnected | HostConnectedStatus | The networke is disconnected. | 4.7.21 |
Unknown | HostConnectedStatus | The network status is unknown. | 4.7.21 |
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 4.7.21 |
description | String | The brief description of the error. | 4.7.21 |
details | String | The details about the error. | 4.7.21 |
elaboration | String | The reserved field. Default value: null. | 4.7.21 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 4.7.21 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.7.21 |
CheckNetworkReachableAction action = new CheckNetworkReachableAction(); action.sourceHostnames = asList("172.0.0.1"); action.targetHostnames = asList("test1.com","test2.com"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CheckNetworkReachableAction.Result res = action.call();
CheckNetworkReachableAction action = CheckNetworkReachableAction() action.sourceHostnames = [172.0.0.1] action.targetHostnames = [test1.com, test2.com] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CheckNetworkReachableAction.Result res = action.call()
PUT zstack/v1/zops/chrony/actions
Authorization: OAuth the-session-uuid
{ "syncChronyServers": {}, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X PUT -d '{"syncChronyServers":{}}' http://localhost:8080/zstack/v1/zops/chrony/actions
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
systemTags | List | body | Optional. The system tags. | 4.7.21 | |
userTags | List | body | Optional. The user tags. | 4.7.21 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
SyncChronyServersAction action = new SyncChronyServersAction(); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; SyncChronyServersAction.Result res = action.call();
SyncChronyServersAction action = SyncChronyServersAction() action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" SyncChronyServersAction.Result res = action.call()
PUT zstack/v1/zops/chrony/actions
Authorization: OAuth the-session-uuid
{ "updateChronyServers": { "internalHostnames": [ "172.0.0.1", "172.0.0.2" ], "externalHostnames": [ "test1.ntp.com" ] }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X PUT -d '{"updateChronyServers":{"internalHostnames":["172.0.0.1","172.0.0.2"],"externalHostnames":["test1.ntp.com"]}}' http://localhost:8080/zstack/v1/zops/chrony/actions
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
internalHostnames | List | body (contained in the updateChronyServers structure) | Optional. Collection of internal chrony servers. | 4.7.21 | |
externalHostnames | List | body (contained in the updateChronyServers structure) | Optional. Collection of external chrony servers. | 4.7.21 | |
systemTags | List | body | Optional. The system tags. | 4.7.21 | |
userTags | List | body | Optional. The user tags. | 4.7.21 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
UpdateChronyServersAction action = new UpdateChronyServersAction(); action.internalHostnames = asList("172.0.0.1","172.0.0.2"); action.externalHostnames = asList("test1.ntp.com"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; UpdateChronyServersAction.Result res = action.call();
UpdateChronyServersAction action = UpdateChronyServersAction() action.internalHostnames = [172.0.0.1, 172.0.0.2] action.externalHostnames = [test1.ntp.com] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" UpdateChronyServersAction.Result res = action.call()
Back to Top
Email Us
contact@zstack.ioEmail Us
contact@zstack.ioEmail Us
contact@zstack.ioThe download link is sent to your email address.
If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.Thank you for using ZStack products and services.
Submit successfully.
We'll connect soon.Thank you for using ZStack products and services.