1717package org .apache .cloudstack .api .command .user .vpn ;
1818
1919import org .apache .log4j .Logger ;
20-
2120import org .apache .cloudstack .api .APICommand ;
2221import org .apache .cloudstack .api .ApiConstants ;
2322import org .apache .cloudstack .api .ApiErrorCode ;
2423import org .apache .cloudstack .api .BaseAsyncCmd ;
2524import org .apache .cloudstack .api .Parameter ;
2625import org .apache .cloudstack .api .ServerApiException ;
26+ import org .apache .cloudstack .api .BaseCmd .CommandType ;
2727import org .apache .cloudstack .api .response .DomainResponse ;
28+ import org .apache .cloudstack .api .response .ProjectResponse ;
2829import org .apache .cloudstack .api .response .Site2SiteCustomerGatewayResponse ;
2930import org .apache .cloudstack .context .CallContext ;
3031
@@ -84,6 +85,10 @@ public class CreateVpnCustomerGatewayCmd extends BaseAsyncCmd {
8485 + "gateway associated with the account for the specified domain." )
8586 private Long domainId ;
8687
88+ @ Parameter (name = ApiConstants .PROJECT_ID , type = CommandType .UUID , entityType = ProjectResponse .class ,
89+ description = "create site-to-site VPN customer gateway for the project" )
90+ private Long projectId ;
91+
8792 /////////////////////////////////////////////////////
8893 /////////////////// Accessors ///////////////////////
8994 /////////////////////////////////////////////////////
@@ -132,6 +137,10 @@ public Long getDomainId() {
132137 return domainId ;
133138 }
134139
140+ public Long getProjectId () {
141+ return projectId ;
142+ }
143+
135144 /////////////////////////////////////////////////////
136145 /////////////// API Implementation///////////////////
137146 /////////////////////////////////////////////////////
@@ -143,7 +152,7 @@ public String getCommandName() {
143152
144153 @ Override
145154 public long getEntityOwnerId () {
146- Long accountId = _accountService .finalyzeAccountId (accountName , domainId , null , true );
155+ Long accountId = _accountService .finalyzeAccountId (accountName , domainId , projectId , true );
147156 if (accountId == null ) {
148157 accountId = CallContext .current ().getCallingAccount ().getId ();
149158 }
0 commit comments