GetInterdependentL3NetworksImages
API Request
URLs
GET zstack/v1/images-l3networks/dependenciesHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"zoneUuid": "55852cdc71ef4774a9dc1eaf85a29c42",
"imageUuid": "012be26a00ac4e9583afb5ef9d8dc322"
},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth ecd5117a63cf444cb71bba734e7458c4" \
-X GET http://localhost:8080/zstack/v1/images-l3networks/dependencies?\
zoneUuid=55466c2e90ae46d88df91c4f72c3e304&imageUuid=40b1783bc2614500bf0926499bdc9b4aRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| zoneUuid | String | query | The zone UUID. This parameter is required to specify the dependency between the L3 network and image. | 0.6 | |
| l3NetworkUuids | List | query | Optional. The L3 network UUID list. | 0.6 | |
| imageUuid | String | query | Optional. The image UUID. | 0.6 | |
| systemTags | List | query | Optional. The system tags. | 0.6 | |
| userTags | List | query | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"inventories": [
{
"uuid": "e177bad0286f4ee38ac29f0ad0e772e6",
"name": "private L3",
"type": "L3BasicNetwork",
"zoneUuid": "0f8c102ff69a43b0afa89c2833ed42bc",
"l2NetworkUuid": "c110e7bdffce47578351477ec0728685",
"state": "Enabled",
"createDate": "May 11, 2017 1:22:45 PM",
"lastOpDate": "May 11, 2017 1:22:45 PM",
"ipRanges": [
{
"uuid": "703becbb056f426b8fe5997648fd7607",
"l3NetworkUuid": "e177bad0286f4ee38ac29f0ad0e772e6",
"name": "ip range",
"startIp": "192.168.0.10",
"endIp": "192.168.0.100",
"netmask": "255.255.255.0",
"gateway": "192.168.0.1",
"createDate": "May 11, 2017 1:22:45 PM",
"lastOpDate": "May 11, 2017 1:22:45 PM"
}
],
"networkServices": [
{
"l3NetworkUuid": "e177bad0286f4ee38ac29f0ad0e772e6",
"networkServiceProviderUuid": "294f4a419cc44d51b1fcbf7352fe6c0d",
"networkServiceType": "DHCP"
},
{
"l3NetworkUuid": "e177bad0286f4ee38ac29f0ad0e772e6",
"networkServiceProviderUuid": "294f4a419cc44d51b1fcbf7352fe6c0d",
"networkServiceType": "DNS"
},
{
"l3NetworkUuid": "e177bad0286f4ee38ac29f0ad0e772e6",
"networkServiceProviderUuid": "294f4a419cc44d51b1fcbf7352fe6c0d",
"networkServiceType": "SNAT"
}
]
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| inventories | List | If the input parameter is l3NetworkUuids, a list of images that can work with these L3 networks is returned. If the input parameter is imageUuid, a list of L3 networks that can work with the image is returned. | 0.6 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
#error
| 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. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
SDK Sample
Java
SDK
GetInterdependentL3NetworksImagesAction \
action = new GetInterdependentL3NetworksImagesAction();
action.zoneUuid = "e4f01bb336a04285a27c6107f6dfeb68";
action.imageUuid = "05ec09f400684e4ab552d74053fc002e";
action.sessionId = "833c8307f9c540058f1a3b0c9a369f89";
GetInterdependentL3NetworksImagesAction.Result res = action.call();Python
SDK
GetInterdependentL3NetworksImagesAction \
action = GetInterdependentL3NetworksImagesAction()
action.zoneUuid = "9dff772313f64618896ce53c9d8a3594"
action.imageUuid = "9e91392ee23f4427bc82e7a9734c4966"
action.sessionId = "7713d16ef34c4ebdbe94a1b2261dcbeb"
GetInterdependentL3NetworksImagesAction.Result res = action.call()