2020import javax .inject .Inject ;
2121
2222import org .apache .log4j .Logger ;
23-
2423import org .apache .cloudstack .context .CallContext ;
24+ import org .springframework .stereotype .Component ;
2525
2626import com .cloud .dc .DataCenter ;
2727import com .cloud .dc .DataCenter .NetworkType ;
4646import com .cloud .offering .NetworkOffering ;
4747import com .cloud .offerings .dao .NetworkOfferingServiceMapDao ;
4848import com .cloud .user .Account ;
49+ import com .cloud .vm .NicProfile ;
4950import com .cloud .vm .ReservationContext ;
5051import com .cloud .vm .VirtualMachine ;
5152import com .cloud .vm .VirtualMachineProfile ;
@@ -162,7 +163,7 @@ public Network implement(Network network, NetworkOffering offering,
162163
163164 @ Override
164165 public void reserve (NicProfile nic , Network network ,
165- VirtualMachineProfile <? extends VirtualMachine > vm ,
166+ VirtualMachineProfile vm ,
166167 DeployDestination dest , ReservationContext context )
167168 throws InsufficientVirtualNetworkCapcityException ,
168169 InsufficientAddressCapacityException {
@@ -172,7 +173,7 @@ public void reserve(NicProfile nic, Network network,
172173
173174 @ Override
174175 public boolean release (NicProfile nic ,
175- VirtualMachineProfile <? extends VirtualMachine > vm ,
176+ VirtualMachineProfile vm ,
176177 String reservationId ) {
177178 // TODO Auto-generated method stub
178179 return super .release (nic , vm , reservationId );
@@ -192,9 +193,8 @@ public void shutdown(NetworkProfile profile, NetworkOffering offering) {
192193 }
193194
194195 @ Override
195- public boolean trash (Network network , NetworkOffering offering ,
196- Account owner ) {
197- return super .trash (network , offering , owner );
196+ public boolean trash (Network network , NetworkOffering offering ) {
197+ return super .trash (network , offering );
198198 }
199199
200200 @ Override
@@ -204,7 +204,7 @@ protected void allocateVnet(Network network, NetworkVO implemented,
204204 if (network .getBroadcastUri () == null ) {
205205 String vnet = _dcDao .allocateVnet (dcId , physicalNetworkId ,
206206 network .getAccountId (), reservationId ,
207- canUseSystemGuestVlan (network .getAccountId ()));
207+ UseSystemGuestVlans . valueIn (network .getAccountId ()));
208208 if (vnet == null ) {
209209 throw new InsufficientVirtualNetworkCapcityException (
210210 "Unable to allocate vnet as a part of network "
@@ -214,7 +214,7 @@ protected void allocateVnet(Network network, NetworkVO implemented,
214214 implemented
215215 .setBroadcastUri (BroadcastDomainType .Vswitch .toUri (vnet ));
216216 ActionEventUtils .onCompletedActionEvent (
217- UserContext .current ().getCallerUserId (),
217+ CallContext .current ().getCallingUserId (),
218218 network .getAccountId (),
219219 EventVO .LEVEL_INFO ,
220220 EventTypes .EVENT_ZONE_VLAN_ASSIGN ,
0 commit comments