File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
server/src/com/cloud/network/router Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 6868import com .cloud .network .vpc .StaticRouteProfile ;
6969import com .cloud .network .vpc .Vpc ;
7070import com .cloud .network .vpc .VpcGateway ;
71+ import com .cloud .network .vpc .VpcGatewayVO ;
7172import com .cloud .network .vpc .VpcManager ;
7273import com .cloud .network .vpc .VpcVO ;
7374import com .cloud .network .vpc .dao .PrivateIpDao ;
@@ -260,6 +261,15 @@ public boolean finalizeVirtualMachineProfile(final VirtualMachineProfile profile
260261 if (defaultDns2 != null ) {
261262 buf .append (" dns2=" ).append (defaultDns2 );
262263 }
264+
265+ VpcGatewayVO privateGatewayForVpc = _vpcGatewayDao .getPrivateGatewayForVpc (domainRouterVO .getVpcId ());
266+ if (privateGatewayForVpc != null ) {
267+ String ip4Address = privateGatewayForVpc .getIp4Address ();
268+ buf .append (" privategateway=" ).append (ip4Address );
269+ s_logger .debug ("Set privategateway field in cmd_line.json to " + ip4Address );
270+ } else {
271+ buf .append (" privategateway=None" );
272+ }
263273 }
264274 }
265275
You can’t perform that action at this time.
0 commit comments