QueryMiniStorageResourceReplication
API Request
URLs
GET zstack/v1/primary-storage/mini/replications
GET zstack/v1/primary-storage/mini/replications/{uuid}Headers
Authorization: OAuth the-session-uuidCurl Examples
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini/replicationscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini/replications/981f98a16e173fd2a7b2fed99c8b3262Queryable Fields
Run the CLI command tool, enter QueryMiniStorageResourceReplication and press Tab to view all queryable fields and resource names that support cross-table queries.
API Response
Response Example
{
"inventories": [
{
"uuid": "0b2b57b92d5036a9a5ee3a3194eaa980",
"resourceUuid": "89aa094f24f8389faf2032d6d1869566",
"hostUuid": "c61a2e0586cb398b85b47392a7561ed0",
"primaryStorageUuid": "c7da0ad70680308d98e5940f0f32b6d2",
"state": "Enabled",
"type": "Basic",
"role": "Primary",
"networkStatus": "Connected",
"diskStatus": "UpToDate",
"size": 0,
"createDate": "Nov 14, 2017 2:20:57 PM",
"lastOpDate": "Nov 14, 2017 2:20:57 PM"
},
{
"size": 0
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 0.6 |
| error | ErrorCode | Error code. If not null, indicates the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| inventories | List | For details, see inventories | 0.6 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier for the error, such as SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause. The source error that triggered the current error. If there is no original error, this field is null | 0.6 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 0.6 |
| resourceUuid | String | The resource UUID. | 0.6 |
| hostUuid | String | Host UUID | 0.6 |
| primaryStorageUuid | String | Data Storage UUID | 0.6 |
| type | String | Type | 0.6 |
| createDate | Timestamp | Creation time | 0.6 |
| lastOpDate | Timestamp | Last modification time | 0.6 |
| state | ReplicationState | For details, see state | 0.6 |
| role | ReplicationRole | For details, see role | 0.6 |
| networkStatus | ReplicationNetworkStatus | For details, see networkStatus | 0.6 |
| diskStatus | ReplicationDiskStatus | For details, see diskStatus | 0.6 |
#state
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Enabled | ReplicationState | Whether the resource is enabled. | 0.6 |
| Disabled | ReplicationState | The Disabled value. | 0.6 |
#role
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Primary | ReplicationRole | Primary replica | 0.6 |
| Secondary | ReplicationRole | Secondary replica | 0.6 |
| Unkown | ReplicationRole | Unknown | 0.6 |
#networkStatus
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Disconnecting | ReplicationNetworkStatus | The Disconnecting value. | 0.6 |
| Unconnected | ReplicationNetworkStatus | The Unconnected value. | 0.6 |
| Timeout | ReplicationNetworkStatus | The Timeout value. | 0.6 |
| BrokenPipe | ReplicationNetworkStatus | The BrokenPipe value. | 0.6 |
| NetworkFailure | ReplicationNetworkStatus | The NetworkFailure value. | 0.6 |
| ProtocolError | ReplicationNetworkStatus | The ProtocolError value. | 0.6 |
| TearDown | ReplicationNetworkStatus | The TearDown value. | 0.6 |
| WFConnection | ReplicationNetworkStatus | The WFConnection value. | 0.6 |
| WFReportParams | ReplicationNetworkStatus | The WFReportParams value. | 0.6 |
| Connected | ReplicationNetworkStatus | The Connected value. | 0.6 |
| StartingSyncS | ReplicationNetworkStatus | The StartingSyncS value. | 0.6 |
| StartingSyncT | ReplicationNetworkStatus | The StartingSyncT value. | 0.6 |
| WFBitMapS | ReplicationNetworkStatus | The WFBitMapS value. | 0.6 |
| WFBitMapT | ReplicationNetworkStatus | The WFBitMapT value. | 0.6 |
| WFSyncUUID | ReplicationNetworkStatus | The WFSyncUUID value. | 0.6 |
| SyncSource | ReplicationNetworkStatus | The SyncSource value. | 0.6 |
| SyncTarget | ReplicationNetworkStatus | The SyncTarget value. | 0.6 |
| PausedSyncS | ReplicationNetworkStatus | The PausedSyncS value. | 0.6 |
| PausedSyncT | ReplicationNetworkStatus | The PausedSyncT value. | 0.6 |
| VerifyS | ReplicationNetworkStatus | The VerifyS value. | 0.6 |
| VerifyT | ReplicationNetworkStatus | The VerifyT value. | 0.6 |
| Unknown | ReplicationNetworkStatus | The Unknown value. | 0.6 |
#diskStatus
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Diskless | ReplicationDiskStatus | The Diskless value. | 0.6 |
| Attaching | ReplicationDiskStatus | The Attaching value. | 0.6 |
| Failed | ReplicationDiskStatus | The Failed value. | 0.6 |
| Negotiating | ReplicationDiskStatus | The Negotiating value. | 0.6 |
| Inconsistent | ReplicationDiskStatus | The Inconsistent value. | 0.6 |
| Outdated | ReplicationDiskStatus | The Outdated value. | 0.6 |
| DUnknown | ReplicationDiskStatus | The DUnknown value. | 0.6 |
| Consistent | ReplicationDiskStatus | The Consistent value. | 0.6 |
| UpToDate | ReplicationDiskStatus | The UpToDate value. | 0.6 |
| Unknown | ReplicationDiskStatus | The Unknown value. | 0.6 |
SDK Examples
Java
SDK
QueryMiniStorageResourceReplicationAction action = new QueryMiniStorageResourceReplicationAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryMiniStorageResourceReplicationAction.Result res = action.call();Python
SDK
QueryMiniStorageResourceReplicationAction action = QueryMiniStorageResourceReplicationAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryMiniStorageResourceReplicationAction.Result res = action.call()