@@ -728,13 +728,13 @@ public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName
728728 networkDomain = "cs" + Long .toHexString (owner .getId ()) + NetworkOrchestrationService .GuestDomainSuffix .valueIn (zoneId );
729729 }
730730 }
731-
732- return createVpc (zoneId , vpcOffId , owner , vpcName , displayText , cidr , networkDomain , displayVpc );
731+ boolean useDistributedRouter = vpcOff . supportsDistributedRouter ();
732+ return createVpc (zoneId , vpcOffId , owner , vpcName , displayText , cidr , networkDomain , displayVpc , useDistributedRouter );
733733 }
734734
735735 @ DB
736736 protected Vpc createVpc (final long zoneId , final long vpcOffId , final Account vpcOwner , final String vpcName , final String displayText , final String cidr ,
737- final String networkDomain , final Boolean displayVpc ) {
737+ final String networkDomain , final Boolean displayVpc , final boolean useDistributedRouter ) {
738738
739739 //Validate CIDR
740740 if (!NetUtils .isValidCIDR (cidr )) {
@@ -756,7 +756,8 @@ protected Vpc createVpc(final long zoneId, final long vpcOffId, final Account vp
756756 return Transaction .execute (new TransactionCallback <VpcVO >() {
757757 @ Override
758758 public VpcVO doInTransaction (TransactionStatus status ) {
759- VpcVO vpc = new VpcVO (zoneId , vpcName , displayText , vpcOwner .getId (), vpcOwner .getDomainId (), vpcOffId , cidr , networkDomain );
759+ VpcVO vpc = new VpcVO (zoneId , vpcName , displayText , vpcOwner .getId (), vpcOwner .getDomainId (), vpcOffId ,
760+ cidr , networkDomain , useDistributedRouter );
760761 if (displayVpc != null ) {
761762 vpc .setDisplay (displayVpc );
762763 }
0 commit comments