Skip to content

Commit 015ab6a

Browse files
committed
fix rebase master
1 parent 9f82757 commit 015ab6a

9 files changed

Lines changed: 23 additions & 27 deletions

File tree

api/src/org/apache/cloudstack/api/ResponseGenerator.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@
119119
import org.apache.cloudstack.region.Region;
120120
import org.apache.cloudstack.usage.Usage;
121121

122-
import com.cloud.async.AsyncJob;
123122
import com.cloud.capacity.Capacity;
124-
import com.cloud.configuration.Configuration;
125123
import com.cloud.configuration.ResourceCount;
126124
import com.cloud.configuration.ResourceLimit;
127125
import com.cloud.dc.DataCenter;
@@ -359,8 +357,6 @@ public interface ResponseGenerator {
359357

360358
OvsProviderResponse createOvsProviderResponse(OvsProvider result);
361359

362-
LDAPConfigResponse createLDAPConfigResponse(String hostname, Integer port, Boolean useSSL, String queryFilter, String baseSearch, String dn);
363-
364360
StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result);
365361

366362
RegionResponse createRegionResponse(Region region);

api/src/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.apache.cloudstack.api.Parameter;
1313
import org.apache.cloudstack.api.ServerApiException;
1414
import org.apache.cloudstack.api.response.OvsProviderResponse;
15+
import org.apache.cloudstack.context.CallContext;
1516
import org.apache.log4j.Logger;
1617

1718
import com.cloud.event.EventTypes;
@@ -21,7 +22,6 @@
2122
import com.cloud.network.OvsProvider;
2223
import com.cloud.network.element.VirtualRouterElementService;
2324
import com.cloud.user.Account;
24-
import com.cloud.user.UserContext;
2525

2626
@APICommand(name = "configureOvsElement", responseObject = OvsProviderResponse.class, description = "Configures an ovs element.")
2727
public class ConfigureOvsElementCmd extends BaseAsyncCmd {
@@ -101,7 +101,7 @@ public Long getInstanceId() {
101101
@Override
102102
public void execute() throws ConcurrentOperationException,
103103
ResourceUnavailableException, InsufficientCapacityException {
104-
UserContext.current().setEventDetails("Ovs element: " + id);
104+
CallContext.current().setEventDetails("Ovs element: " + id);
105105
OvsProvider result = _service.get(0).configure(this);
106106
if (result != null) {
107107
OvsProviderResponse ovsResponse = _responseGenerator

plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public boolean implement(Network network, NetworkOffering offering,
154154

155155
@Override
156156
public boolean prepare(Network network, NicProfile nic,
157-
VirtualMachineProfile<? extends VirtualMachine> vm,
157+
VirtualMachineProfile vm,
158158
DeployDestination dest, ReservationContext context)
159159
throws ConcurrentOperationException, ResourceUnavailableException,
160160
InsufficientCapacityException {
@@ -177,7 +177,7 @@ public boolean prepare(Network network, NicProfile nic,
177177

178178
@Override
179179
public boolean release(Network network, NicProfile nic,
180-
VirtualMachineProfile<? extends VirtualMachine> vm,
180+
VirtualMachineProfile vm,
181181
ReservationContext context) throws ConcurrentOperationException,
182182
ResourceUnavailableException {
183183
if (!canHandle(network, Service.Connectivity)) {

plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import javax.inject.Inject;
2121

2222
import org.apache.log4j.Logger;
23-
2423
import org.apache.cloudstack.context.CallContext;
24+
import org.springframework.stereotype.Component;
2525

2626
import com.cloud.dc.DataCenter;
2727
import com.cloud.dc.DataCenter.NetworkType;
@@ -46,6 +46,7 @@
4646
import com.cloud.offering.NetworkOffering;
4747
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
4848
import com.cloud.user.Account;
49+
import com.cloud.vm.NicProfile;
4950
import com.cloud.vm.ReservationContext;
5051
import com.cloud.vm.VirtualMachine;
5152
import 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,

plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,7 @@ public boolean isOvsTunnelEnabled() {
440440
}
441441

442442
@Override
443-
public void VmCheckAndCreateTunnel(
444-
VirtualMachineProfile<? extends VirtualMachine> vm,
443+
public void VmCheckAndCreateTunnel(VirtualMachineProfile vm,
445444
Network nw, DeployDestination dest) {
446445
CheckAndCreateTunnel(vm.getVirtualMachine(), nw, dest);
447446
}

server/src/com/cloud/api/ApiResponseHelper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@
272272
import com.cloud.storage.SnapshotVO;
273273
import com.cloud.storage.Storage.StoragePoolType;
274274
import com.cloud.storage.StoragePool;
275-
import com.cloud.storage.Swift;
276275
import com.cloud.storage.Upload;
277276
import com.cloud.storage.UploadVO;
278277
import com.cloud.storage.VMTemplateVO;

server/src/com/cloud/network/NetworkServiceImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
303303
NetworkACLDao _networkACLDao;
304304
@Inject
305305
OvsProviderDao _ovsProviderDao;
306+
@Inject
307+
IpAddressManager _ipAddrMgr;
308+
@Inject
309+
EntityManager _entityMgr;
306310

307311
int _cidrLimit;
308312
boolean _allowSubdomainNetworkAccess;

server/src/com/cloud/network/element/VirtualRouterElement.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -970,22 +970,20 @@ public List<? extends VirtualRouterProvider> searchForVirtualRouterElement(ListV
970970
}
971971

972972
@Override
973-
public List<? extends OvsProvider> searchForOvsElement(
974-
ListOvsElementsCmd cmd) {
973+
public List<? extends OvsProvider> searchForOvsElement(ListOvsElementsCmd cmd) {
975974
Long id = cmd.getId();
976975
Long nspId = cmd.getNspId();
977976
Boolean enabled = cmd.getEnabled();
977+
QueryBuilder<OvsProviderVO> sc = QueryBuilder.create(OvsProviderVO.class);
978978

979-
SearchCriteriaService<OvsProviderVO, OvsProviderVO> sc = SearchCriteria2
980-
.create(OvsProviderVO.class);
981979
if (id != null) {
982-
sc.addAnd(sc.getEntity().getId(), Op.EQ, id);
980+
sc.and(sc.entity().getId(), Op.EQ, id);
983981
}
984982
if (nspId != null) {
985-
sc.addAnd(sc.getEntity().getNspId(), Op.EQ, nspId);
983+
sc.and(sc.entity().getNspId(), Op.EQ, nspId);
986984
}
987985
if (enabled != null) {
988-
sc.addAnd(sc.getEntity().isEnabled(), Op.EQ, enabled);
986+
sc.and(sc.entity().isEnabled(), Op.EQ, enabled);
989987
}
990988

991989
return sc.list();

tools/apidoc/gen_toc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
'UCS' : 'UCS',
160160
'Ucs' : 'UCS',
161161
'CacheStores' : 'Cache Stores',
162-
'CacheStore' : 'Cache Store'
162+
'CacheStore' : 'Cache Store',
163163
'OvsElement' : 'Ovs Element'
164164
}
165165

0 commit comments

Comments
 (0)