@@ -69,6 +69,11 @@ public class CreatePrivateGatewayCmd extends BaseAsyncCreateCmd {
6969 required =true , description ="the VPC network belongs to" )
7070 private Long vpcId ;
7171
72+ @ Parameter (name =ApiConstants .SOURCE_NAT_SUPPORTED , type =CommandType .BOOLEAN , required =false ,
73+ description ="source NAT supported value. Default value false. If 'true' source NAT is enabled on the private gateway" +
74+ " 'false': sourcenat is not supported" )
75+ private Boolean isSourceNat ;
76+
7277 /////////////////////////////////////////////////////
7378 /////////////////// Accessors ///////////////////////
7479 /////////////////////////////////////////////////////
@@ -97,6 +102,13 @@ public Long getVpcId() {
97102 return vpcId ;
98103 }
99104
105+ public Boolean getIsSourceNat () {
106+ if (isSourceNat == null ) {
107+ return false ;
108+ }
109+ return true ;
110+ }
111+
100112 /////////////////////////////////////////////////////
101113 /////////////// API Implementation///////////////////
102114 /////////////////////////////////////////////////////
@@ -111,7 +123,7 @@ public void create() throws ResourceAllocationException {
111123 PrivateGateway result = null ;
112124 try {
113125 result = _vpcService .createVpcPrivateGateway (getVpcId (), getPhysicalNetworkId (),
114- getVlan (), getStartIp (), getGateway (), getNetmask (), getEntityOwnerId ());
126+ getVlan (), getStartIp (), getGateway (), getNetmask (), getEntityOwnerId (), getIsSourceNat () );
115127 } catch (InsufficientCapacityException ex ){
116128 s_logger .info (ex );
117129 s_logger .trace (ex );
0 commit comments