@@ -445,7 +445,7 @@ public NicProfile allocate(final Network network, NicProfile nic, final VirtualM
445445 nic .setIPv4Netmask (NetUtils .cidr2Netmask (_networkModel .getValidNetworkCidr (network )));
446446 }
447447
448- Pair <String , String > dns = _networkModel .getNetworkIp4Dns (network . getId () , dc );
448+ Pair <String , String > dns = _networkModel .getNetworkIp4Dns (network , dc );
449449 nic .setIPv4Dns1 (dns .first ());
450450 nic .setIPv4Dns2 (dns .second ());
451451 nic .setFormat (AddressFormat .Ip4 );
@@ -467,7 +467,7 @@ public NicProfile allocate(final Network network, NicProfile nic, final VirtualM
467467 @ Override
468468 public void updateNicProfile (final NicProfile profile , final Network network ) {
469469 final DataCenter dc = _dcDao .findById (network .getDataCenterId ());
470- Pair <String , String > dns = _networkModel .getNetworkIp4Dns (network . getId () , dc );
470+ Pair <String , String > dns = _networkModel .getNetworkIp4Dns (network , dc );
471471 if (profile != null ) {
472472 profile .setIPv4Dns1 (dns .first ());
473473 profile .setIPv4Dns2 (dns .second ());
@@ -516,7 +516,8 @@ public boolean trash(final Network network, final NetworkOffering offering) {
516516 @ Override
517517 public void updateNetworkProfile (final NetworkProfile networkProfile ) {
518518 final DataCenter dc = _dcDao .findById (networkProfile .getDataCenterId ());
519- Pair <String , String > dns = _networkModel .getNetworkIp4Dns (networkProfile .getId (), dc );
519+ Network network = _networkModel .getNetwork (networkProfile .getId ());
520+ Pair <String , String > dns = _networkModel .getNetworkIp4Dns (network , dc );
520521 networkProfile .setDns1 (dns .first ());
521522 networkProfile .setDns2 (dns .second ());
522523 }
0 commit comments