mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix rebase master
This commit is contained in:
parent
9f82757eb9
commit
015ab6af8a
@ -119,9 +119,7 @@ import org.apache.cloudstack.region.PortableIpRange;
|
||||
import org.apache.cloudstack.region.Region;
|
||||
import org.apache.cloudstack.usage.Usage;
|
||||
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.capacity.Capacity;
|
||||
import com.cloud.configuration.Configuration;
|
||||
import com.cloud.configuration.ResourceCount;
|
||||
import com.cloud.configuration.ResourceLimit;
|
||||
import com.cloud.dc.DataCenter;
|
||||
@ -359,8 +357,6 @@ public interface ResponseGenerator {
|
||||
|
||||
OvsProviderResponse createOvsProviderResponse(OvsProvider result);
|
||||
|
||||
LDAPConfigResponse createLDAPConfigResponse(String hostname, Integer port, Boolean useSSL, String queryFilter, String baseSearch, String dn);
|
||||
|
||||
StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result);
|
||||
|
||||
RegionResponse createRegionResponse(Region region);
|
||||
|
||||
@ -12,6 +12,7 @@ import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.OvsProviderResponse;
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.event.EventTypes;
|
||||
@ -21,7 +22,6 @@ import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.OvsProvider;
|
||||
import com.cloud.network.element.VirtualRouterElementService;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
||||
@APICommand(name = "configureOvsElement", responseObject = OvsProviderResponse.class, description = "Configures an ovs element.")
|
||||
public class ConfigureOvsElementCmd extends BaseAsyncCmd {
|
||||
@ -101,7 +101,7 @@ public class ConfigureOvsElementCmd extends BaseAsyncCmd {
|
||||
@Override
|
||||
public void execute() throws ConcurrentOperationException,
|
||||
ResourceUnavailableException, InsufficientCapacityException {
|
||||
UserContext.current().setEventDetails("Ovs element: " + id);
|
||||
CallContext.current().setEventDetails("Ovs element: " + id);
|
||||
OvsProvider result = _service.get(0).configure(this);
|
||||
if (result != null) {
|
||||
OvsProviderResponse ovsResponse = _responseGenerator
|
||||
|
||||
@ -154,7 +154,7 @@ public class OvsElement extends AdapterBase implements NetworkElement,
|
||||
|
||||
@Override
|
||||
public boolean prepare(Network network, NicProfile nic,
|
||||
VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||
VirtualMachineProfile vm,
|
||||
DeployDestination dest, ReservationContext context)
|
||||
throws ConcurrentOperationException, ResourceUnavailableException,
|
||||
InsufficientCapacityException {
|
||||
@ -177,7 +177,7 @@ public class OvsElement extends AdapterBase implements NetworkElement,
|
||||
|
||||
@Override
|
||||
public boolean release(Network network, NicProfile nic,
|
||||
VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||
VirtualMachineProfile vm,
|
||||
ReservationContext context) throws ConcurrentOperationException,
|
||||
ResourceUnavailableException {
|
||||
if (!canHandle(network, Service.Connectivity)) {
|
||||
|
||||
@ -20,8 +20,8 @@ import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenter.NetworkType;
|
||||
@ -46,6 +46,7 @@ import com.cloud.network.ovs.OvsTunnelManager;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.vm.NicProfile;
|
||||
import com.cloud.vm.ReservationContext;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
@ -162,7 +163,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
|
||||
@Override
|
||||
public void reserve(NicProfile nic, Network network,
|
||||
VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||
VirtualMachineProfile vm,
|
||||
DeployDestination dest, ReservationContext context)
|
||||
throws InsufficientVirtualNetworkCapcityException,
|
||||
InsufficientAddressCapacityException {
|
||||
@ -172,7 +173,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
|
||||
@Override
|
||||
public boolean release(NicProfile nic,
|
||||
VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||
VirtualMachineProfile vm,
|
||||
String reservationId) {
|
||||
// TODO Auto-generated method stub
|
||||
return super.release(nic, vm, reservationId);
|
||||
@ -192,9 +193,8 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trash(Network network, NetworkOffering offering,
|
||||
Account owner) {
|
||||
return super.trash(network, offering, owner);
|
||||
public boolean trash(Network network, NetworkOffering offering) {
|
||||
return super.trash(network, offering);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -204,7 +204,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
if (network.getBroadcastUri() == null) {
|
||||
String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId,
|
||||
network.getAccountId(), reservationId,
|
||||
canUseSystemGuestVlan(network.getAccountId()));
|
||||
UseSystemGuestVlans.valueIn(network.getAccountId()));
|
||||
if (vnet == null) {
|
||||
throw new InsufficientVirtualNetworkCapcityException(
|
||||
"Unable to allocate vnet as a part of network "
|
||||
@ -214,7 +214,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
||||
implemented
|
||||
.setBroadcastUri(BroadcastDomainType.Vswitch.toUri(vnet));
|
||||
ActionEventUtils.onCompletedActionEvent(
|
||||
UserContext.current().getCallerUserId(),
|
||||
CallContext.current().getCallingUserId(),
|
||||
network.getAccountId(),
|
||||
EventVO.LEVEL_INFO,
|
||||
EventTypes.EVENT_ZONE_VLAN_ASSIGN,
|
||||
|
||||
@ -440,8 +440,7 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage
|
||||
}
|
||||
|
||||
@Override
|
||||
public void VmCheckAndCreateTunnel(
|
||||
VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||
public void VmCheckAndCreateTunnel(VirtualMachineProfile vm,
|
||||
Network nw, DeployDestination dest) {
|
||||
CheckAndCreateTunnel(vm.getVirtualMachine(), nw, dest);
|
||||
}
|
||||
|
||||
@ -272,7 +272,6 @@ import com.cloud.storage.Snapshot;
|
||||
import com.cloud.storage.SnapshotVO;
|
||||
import com.cloud.storage.Storage.StoragePoolType;
|
||||
import com.cloud.storage.StoragePool;
|
||||
import com.cloud.storage.Swift;
|
||||
import com.cloud.storage.Upload;
|
||||
import com.cloud.storage.UploadVO;
|
||||
import com.cloud.storage.VMTemplateVO;
|
||||
|
||||
@ -303,6 +303,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
|
||||
NetworkACLDao _networkACLDao;
|
||||
@Inject
|
||||
OvsProviderDao _ovsProviderDao;
|
||||
@Inject
|
||||
IpAddressManager _ipAddrMgr;
|
||||
@Inject
|
||||
EntityManager _entityMgr;
|
||||
|
||||
int _cidrLimit;
|
||||
boolean _allowSubdomainNetworkAccess;
|
||||
|
||||
@ -970,22 +970,20 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends OvsProvider> searchForOvsElement(
|
||||
ListOvsElementsCmd cmd) {
|
||||
public List<? extends OvsProvider> searchForOvsElement(ListOvsElementsCmd cmd) {
|
||||
Long id = cmd.getId();
|
||||
Long nspId = cmd.getNspId();
|
||||
Boolean enabled = cmd.getEnabled();
|
||||
QueryBuilder<OvsProviderVO> sc = QueryBuilder.create(OvsProviderVO.class);
|
||||
|
||||
SearchCriteriaService<OvsProviderVO, OvsProviderVO> sc = SearchCriteria2
|
||||
.create(OvsProviderVO.class);
|
||||
if (id != null) {
|
||||
sc.addAnd(sc.getEntity().getId(), Op.EQ, id);
|
||||
sc.and(sc.entity().getId(), Op.EQ, id);
|
||||
}
|
||||
if (nspId != null) {
|
||||
sc.addAnd(sc.getEntity().getNspId(), Op.EQ, nspId);
|
||||
sc.and(sc.entity().getNspId(), Op.EQ, nspId);
|
||||
}
|
||||
if (enabled != null) {
|
||||
sc.addAnd(sc.getEntity().isEnabled(), Op.EQ, enabled);
|
||||
sc.and(sc.entity().isEnabled(), Op.EQ, enabled);
|
||||
}
|
||||
|
||||
return sc.list();
|
||||
|
||||
@ -159,7 +159,7 @@ known_categories = {
|
||||
'UCS' : 'UCS',
|
||||
'Ucs' : 'UCS',
|
||||
'CacheStores' : 'Cache Stores',
|
||||
'CacheStore' : 'Cache Store'
|
||||
'CacheStore' : 'Cache Store',
|
||||
'OvsElement' : 'Ovs Element'
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user