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