Skip to content

Commit fd784bd

Browse files
committed
api: Annotate CreatePrivateNetworkCmd
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent f4a407e commit fd784bd

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
// under the License.
1717
package com.cloud.api.commands;
1818

19+
import org.apache.cloudstack.api.response.DomainResponse;
20+
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
21+
import org.apache.cloudstack.api.response.ProjectResponse;
1922
import org.apache.log4j.Logger;
2023

2124
import org.apache.cloudstack.api.ApiConstants;
2225
import org.apache.cloudstack.api.BaseAsyncCreateCmd;
2326
import org.apache.cloudstack.api.BaseCmd;
24-
import org.apache.cloudstack.api.IdentityMapper;
2527
import org.apache.cloudstack.api.Implementation;
2628
import org.apache.cloudstack.api.Parameter;
2729
import org.apache.cloudstack.api.ServerApiException;
@@ -49,8 +51,8 @@ public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
4951
@Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, required=true, description="the display text of the network")
5052
private String displayText;
5153

52-
@IdentityMapper(entityTableName="physical_network")
53-
@Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, required=true, description="the Physical Network ID the network belongs to")
54+
@Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType = PhysicalNetworkResponse.class,
55+
required=true, description="the Physical Network ID the network belongs to")
5456
private Long physicalNetworkId;
5557

5658
@Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="the gateway of the network")
@@ -72,12 +74,12 @@ public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
7274
@Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="account who will own the network")
7375
private String accountName;
7476

75-
@IdentityMapper(entityTableName="projects")
76-
@Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.LONG, description="an optional project for the ssh key")
77+
@Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
78+
description="an optional project for the ssh key")
7779
private Long projectId;
7880

79-
@IdentityMapper(entityTableName="domain")
80-
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="domain ID of the account owning a network")
81+
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class,
82+
description="domain ID of the account owning a network")
8183
private Long domainId;
8284

8385

0 commit comments

Comments
 (0)