@@ -920,12 +920,12 @@ public void allocate(VirtualMachineProfile<? extends VMInstanceVO> vm, List<Pair
920920
921921 for (Pair <NetworkVO , NicProfile > network : networks ) {
922922 NetworkVO config = network .first ();
923- NetworkGuru concierge = _networkGurus .get (config .getGuruName ());
923+ NetworkGuru guru = _networkGurus .get (config .getGuruName ());
924924 NicProfile requested = network .second ();
925925 if (requested != null && requested .getMode () == null ) {
926926 requested .setMode (config .getMode ());
927927 }
928- NicProfile profile = concierge .allocate (config , requested , vm );
928+ NicProfile profile = guru .allocate (config , requested , vm );
929929
930930 if (vm != null && vm .getVirtualMachine ().getType () == Type .User && config .isDefault ()) {
931931 profile .setDefaultNic (true );
@@ -943,7 +943,7 @@ public void allocate(VirtualMachineProfile<? extends VMInstanceVO> vm, List<Pair
943943 vmType = Nic .VmType .System ;
944944 }
945945
946- NicVO vo = new NicVO (concierge .getName (), vm .getId (), config .getId (), vmType );
946+ NicVO vo = new NicVO (guru .getName (), vm .getId (), config .getId (), vmType );
947947
948948 while (deviceIds [deviceId ] && deviceId < deviceIds .length ) {
949949 deviceId ++;
@@ -1091,7 +1091,7 @@ public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDesti
10911091 }
10921092
10931093 if (s_logger .isDebugEnabled ()) {
1094- s_logger .debug ("Asking " + guru + " to implement " + network );
1094+ s_logger .debug ("Asking " + guru . getName () + " to implement " + network );
10951095 }
10961096
10971097 NetworkOfferingVO offering = _networkOfferingDao .findById (network .getNetworkOfferingId ());
@@ -1160,7 +1160,7 @@ public void prepare(VirtualMachineProfile<? extends VMInstanceVO> vmProfile, Dep
11601160 List <NicVO > nics = _nicDao .listByVmId (vmProfile .getId ());
11611161 for (NicVO nic : nics ) {
11621162 Pair <NetworkGuru , NetworkVO > implemented = implementNetwork (nic .getNetworkId (), dest , context );
1163- NetworkGuru concierge = implemented .first ();
1163+ NetworkGuru guru = implemented .first ();
11641164 NetworkVO network = implemented .second ();
11651165 NetworkOffering no = _configMgr .getNetworkOffering (network .getNetworkOfferingId ());
11661166 Integer networkRate = _configMgr .getNetworkRate (no .getId ());
@@ -1177,13 +1177,13 @@ public void prepare(VirtualMachineProfile<? extends VMInstanceVO> vmProfile, Dep
11771177 URI isolationUri = nic .getIsolationUri ();
11781178
11791179 profile = new NicProfile (nic , network , broadcastUri , isolationUri , networkRate );
1180- concierge .reserve (profile , network , vmProfile , dest , context );
1180+ guru .reserve (profile , network , vmProfile , dest , context );
11811181 nic .setIp4Address (profile .getIp4Address ());
11821182 nic .setIp6Address (profile .getIp6Address ());
11831183 nic .setMacAddress (profile .getMacAddress ());
11841184 nic .setIsolationUri (profile .getIsolationUri ());
11851185 nic .setBroadcastUri (profile .getBroadCastUri ());
1186- nic .setReserver (concierge .getName ());
1186+ nic .setReserver (guru .getName ());
11871187 nic .setState (Nic .State .Reserved );
11881188 nic .setNetmask (profile .getNetmask ());
11891189 nic .setGateway (profile .getGateway ());
@@ -1202,7 +1202,7 @@ public void prepare(VirtualMachineProfile<? extends VMInstanceVO> vmProfile, Dep
12021202 element .prepare (network , profile , vmProfile , dest , context );
12031203 }
12041204 profile .setSecurityGroupEnabled (network .isSecurityGroupEnabled ());
1205- concierge .updateNicProfile (profile , network );
1205+ guru .updateNicProfile (profile , network );
12061206 vmProfile .addNic (profile );
12071207 }
12081208 }
@@ -1215,9 +1215,9 @@ public <T extends VMInstanceVO> void prepareNicForMigration(VirtualMachineProfil
12151215 NetworkOffering no = _configMgr .getNetworkOffering (network .getNetworkOfferingId ());
12161216 Integer networkRate = _configMgr .getNetworkRate (no .getId ());
12171217
1218- NetworkGuru concierge = _networkGurus .get (network .getGuruName ());
1218+ NetworkGuru guru = _networkGurus .get (network .getGuruName ());
12191219 NicProfile profile = new NicProfile (nic , network , nic .getBroadcastUri (), nic .getIsolationUri (), networkRate );
1220- concierge .updateNicProfile (profile , network );
1220+ guru .updateNicProfile (profile , network );
12211221 vm .addNic (profile );
12221222 }
12231223 }
@@ -1230,11 +1230,11 @@ public void release(VirtualMachineProfile<? extends VMInstanceVO> vmProfile, boo
12301230 if (nic .getState () == Nic .State .Reserved || nic .getState () == Nic .State .Reserving ) {
12311231 Nic .State originalState = nic .getState ();
12321232 if (nic .getReservationStrategy () == Nic .ReservationStrategy .Start ) {
1233- NetworkGuru concierge = _networkGurus .get (network .getGuruName ());
1233+ NetworkGuru guru = _networkGurus .get (network .getGuruName ());
12341234 nic .setState (Nic .State .Releasing );
12351235 _nicDao .update (nic .getId (), nic );
12361236 NicProfile profile = new NicProfile (nic , network , null , null , null );
1237- if (concierge .release (profile , vmProfile , nic .getReservationId ())) {
1237+ if (guru .release (profile , vmProfile , nic .getReservationId ())) {
12381238 applyProfileToNicForRelease (nic , profile );
12391239 nic .setState (Nic .State .Allocated );
12401240 if (originalState == Nic .State .Reserved ) {
@@ -1280,9 +1280,9 @@ public List<NicProfile> getNicProfiles(VirtualMachine vm) {
12801280 NetworkOffering no = _configMgr .getNetworkOffering (network .getNetworkOfferingId ());
12811281 Integer networkRate = _configMgr .getNetworkRate (no .getId ());
12821282
1283- NetworkGuru concierge = _networkGurus .get (network .getGuruName ());
1283+ NetworkGuru guru = _networkGurus .get (network .getGuruName ());
12841284 NicProfile profile = new NicProfile (nic , network , nic .getBroadcastUri (), nic .getIsolationUri (), networkRate );
1285- concierge .updateNicProfile (profile , network );
1285+ guru .updateNicProfile (profile , network );
12861286 profiles .add (profile );
12871287 }
12881288 }
@@ -1870,7 +1870,7 @@ public void shutdownNetwork(long networkId, ReservationContext context) {
18701870 for (NetworkElement element : _networkElements ) {
18711871 try {
18721872 if (s_logger .isDebugEnabled ()) {
1873- s_logger .debug ("Sending network shutdown to " + element );
1873+ s_logger .debug ("Sending network shutdown to " + element . getName () );
18741874 }
18751875
18761876 element .shutdown (network , context );
@@ -2479,9 +2479,9 @@ public IpAddress getIp(long ipAddressId) {
24792479 @ Override
24802480 public NetworkProfile convertNetworkToNetworkProfile (long networkId ) {
24812481 NetworkVO network = _networksDao .findById (networkId );
2482- NetworkGuru concierge = _networkGurus .get (network .getGuruName ());
2482+ NetworkGuru guru = _networkGurus .get (network .getGuruName ());
24832483 NetworkProfile profile = new NetworkProfile (network );
2484- concierge .updateNetworkProfile (profile );
2484+ guru .updateNetworkProfile (profile );
24852485
24862486 return profile ;
24872487 }
0 commit comments