1616// under the License.
1717package 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 ;
1922import org .apache .log4j .Logger ;
2023
2124import org .apache .cloudstack .api .ApiConstants ;
2225import org .apache .cloudstack .api .BaseAsyncCreateCmd ;
2326import org .apache .cloudstack .api .BaseCmd ;
24- import org .apache .cloudstack .api .IdentityMapper ;
2527import org .apache .cloudstack .api .Implementation ;
2628import org .apache .cloudstack .api .Parameter ;
2729import 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