mirror of https://github.com/apache/cloudstack.git
Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x
This commit is contained in:
commit
9da438b24c
|
|
@ -126,7 +126,7 @@ public class AsyncJobResponse extends BaseResponse {
|
|||
this.jobInstanceId.setTableName("account");
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.User.toString())) {
|
||||
this.jobInstanceId.setTableName("user");
|
||||
}else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Counter.toString())) {
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Counter.toString())) {
|
||||
this.jobInstanceId.setTableName("counter");
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Condition.toString())) {
|
||||
this.jobInstanceId.setTableName("conditions");
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ package com.cloud.network.element;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
|
|
@ -133,5 +134,5 @@ public interface NetworkElement extends Adapter {
|
|||
* @param services
|
||||
* @return true/false
|
||||
*/
|
||||
boolean verifyServicesCombination(List<String> services);
|
||||
boolean verifyServicesCombination(Set<Service> services);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ public interface VpcService {
|
|||
* @return
|
||||
* @throws ResourceAllocationException TODO
|
||||
*/
|
||||
public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain) throws ResourceAllocationException;
|
||||
public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr,
|
||||
String networkDomain) throws ResourceAllocationException;
|
||||
|
||||
/**
|
||||
* @param vpcId
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#new labels (begin) **********************************************************************************************
|
||||
label.tier.details=Tier details
|
||||
label.edit.tags=Edit tags
|
||||
label.network.rate.megabytes=Network Rate (MB/s)
|
||||
label.action.enable.physical.network=Enable physical network
|
||||
label.action.disable.physical.network=Disable physical network
|
||||
|
|
|
|||
|
|
@ -40,9 +40,8 @@ public class AjaxFIFOImageCache {
|
|||
|
||||
public synchronized int putImage(byte[] image) {
|
||||
while(cache.size() >= cacheSize) {
|
||||
Integer keyToRemove = fifoQueue.remove(0);
|
||||
Integer keyToRemove = fifoQueue.remove(0);
|
||||
cache.remove(keyToRemove);
|
||||
|
||||
if(s_logger.isTraceEnabled())
|
||||
s_logger.trace("Remove image from cache, key: " + keyToRemove);
|
||||
}
|
||||
|
|
@ -51,26 +50,30 @@ public class AjaxFIFOImageCache {
|
|||
|
||||
if(s_logger.isTraceEnabled())
|
||||
s_logger.trace("Add image to cache, key: " + key);
|
||||
|
||||
cache.put(key, image);
|
||||
|
||||
cache.put(key, image);
|
||||
fifoQueue.add(key);
|
||||
return key;
|
||||
}
|
||||
|
||||
public synchronized byte[] getImage(int key) {
|
||||
public synchronized byte[] getImage(int key) {
|
||||
|
||||
if(cache.containsKey(key)) {
|
||||
if(s_logger.isTraceEnabled())
|
||||
s_logger.trace("Retrieve image from cache, key: " + key);
|
||||
|
||||
s_logger.trace("Retrieve image from cache, key: " + key);
|
||||
|
||||
return cache.get(key);
|
||||
}
|
||||
|
||||
if(s_logger.isTraceEnabled())
|
||||
|
||||
s_logger.trace("Image is no long in cache, key: " + key);
|
||||
return null;
|
||||
}
|
||||
|
||||
public synchronized int getNextKey() {
|
||||
return nextKey++;
|
||||
}
|
||||
|
||||
public synchronized int getKey() {
|
||||
return nextKey;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ public class ConsoleProxyAjaxImageHandler implements HttpHandler {
|
|||
String tag = queryMap.get("tag");
|
||||
String ticket = queryMap.get("ticket");
|
||||
String keyStr = queryMap.get("key");
|
||||
String console_url = queryMap.get("consoleurl");
|
||||
String console_host_session = queryMap.get("sessionref");
|
||||
|
||||
int key = 0;
|
||||
|
||||
if(tag == null)
|
||||
|
|
@ -90,8 +93,14 @@ public class ConsoleProxyAjaxImageHandler implements HttpHandler {
|
|||
param.setClientHostPassword(sid);
|
||||
param.setClientTag(tag);
|
||||
param.setTicket(ticket);
|
||||
ConsoleProxyClient viewer = ConsoleProxy.getVncViewer(param);
|
||||
byte[] img = viewer.getAjaxImageCache().getImage(key);
|
||||
param.setClientTunnelUrl(console_url);
|
||||
param.setClientTunnelSession(console_host_session);
|
||||
|
||||
ConsoleProxyClient viewer = ConsoleProxy.getVncViewer(param);
|
||||
AjaxFIFOImageCache imageCache =viewer.getAjaxImageCache();
|
||||
|
||||
byte[] img = imageCache.getImage(imageCache.getKey() - 1);
|
||||
|
||||
if(img != null) {
|
||||
Headers hds = t.getResponseHeaders();
|
||||
hds.set("Content-Type", "image/jpeg");
|
||||
|
|
|
|||
|
|
@ -607,6 +607,8 @@ public class VirtualRoutingResource implements Manager {
|
|||
args = "-D";
|
||||
args += " -r ";
|
||||
args += cmd.getPeerGatewayIp();
|
||||
args += " -n ";
|
||||
args += cmd.getLocalGuestCidr();
|
||||
args += " -N ";
|
||||
args += cmd.getPeerGuestCidrList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1274,6 +1274,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
args += " -D";
|
||||
args += " -r ";
|
||||
args += cmd.getPeerGatewayIp();
|
||||
args += " -n ";
|
||||
args += cmd.getLocalGuestCidr();
|
||||
args += " -N ";
|
||||
args += cmd.getPeerGuestCidrList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7406,6 +7406,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
args += " -D";
|
||||
args += " -r ";
|
||||
args += cmd.getPeerGatewayIp();
|
||||
args += " -n ";
|
||||
args += cmd.getLocalGuestCidr();
|
||||
args += " -N ";
|
||||
args += cmd.getPeerGuestCidrList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ fi
|
|||
|
||||
vpnconfdir="/etc/ipsec.d"
|
||||
vpnoutmark="0x525"
|
||||
vpninmark="0x524"
|
||||
|
||||
usage() {
|
||||
printf "Usage: %s: (-A|-D) -l <left-side vpn peer> -n <left-side guest cidr> -g <left-side gateway> -r <right-side vpn peer> -N <right-side private subnets> -e <esp policy> -i <ike policy> -t <ike lifetime> -T <esp lifetime> -s <pre-shared secret> -d <dpd 0 or 1> \n" $(basename $0) >&2
|
||||
|
|
@ -55,6 +56,8 @@ enable_iptables_subnets() {
|
|||
do
|
||||
sudo iptables -A FORWARD -t mangle -s $leftnet -d $net -j MARK --set-mark $vpnoutmark
|
||||
sudo iptables -A OUTPUT -t mangle -s $leftnet -d $net -j MARK --set-mark $vpnoutmark
|
||||
sudo iptables -A FORWARD -t mangle -s $net -d $leftnet -j MARK --set-mark $vpninmark
|
||||
sudo iptables -A INPUT -t mangle -s $net -d $leftnet -j MARK --set-mark $vpninmark
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
|
@ -64,6 +67,7 @@ check_and_enable_iptables() {
|
|||
if [ $? -ne 0 ]
|
||||
then
|
||||
sudo iptables -A INPUT -i $outIf -p udp -m udp --dport 500 -j ACCEPT
|
||||
sudo iptables -A INPUT -i $outIf -p udp -m udp --dport 4500 -j ACCEPT
|
||||
# Prevent NAT on "marked" VPN traffic, so need to be the first one on POSTROUTING chain
|
||||
sudo iptables -t nat -I POSTROUTING -t nat -o $outIf -m mark --mark $vpnoutmark -j ACCEPT
|
||||
fi
|
||||
|
|
@ -75,6 +79,8 @@ disable_iptables_subnets() {
|
|||
do
|
||||
sudo iptables -D FORWARD -t mangle -s $leftnet -d $net -j MARK --set-mark $vpnoutmark
|
||||
sudo iptables -D OUTPUT -t mangle -s $leftnet -d $net -j MARK --set-mark $vpnoutmark
|
||||
sudo iptables -D FORWARD -t mangle -s $net -d $leftnet -j MARK --set-mark $vpninmark
|
||||
sudo iptables -D INPUT -t mangle -s $net -d $leftnet -j MARK --set-mark $vpninmark
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
|
@ -85,6 +91,7 @@ check_and_disable_iptables() {
|
|||
then
|
||||
#Nobody else use s2s vpn now, so delete the iptables rules
|
||||
sudo iptables -D INPUT -i $outIf -p udp -m udp --dport 500 -j ACCEPT
|
||||
sudo iptables -D INPUT -i $outIf -p udp -m udp --dport 4500 -j ACCEPT
|
||||
sudo iptables -t nat -D POSTROUTING -t nat -o $outIf -m mark --mark $vpnoutmark -j ACCEPT
|
||||
fi
|
||||
return 0
|
||||
|
|
|
|||
|
|
@ -1124,24 +1124,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
|
||||
populateOwner(volResponse, volume);
|
||||
|
||||
String storageType;
|
||||
try {
|
||||
if (volume.getPoolId() == null) {
|
||||
if (volume.getState() == Volume.State.Allocated || volume.getState() == Volume.State.UploadOp) {
|
||||
/* set it as shared, so the UI can attach it to VM */
|
||||
storageType = "shared";
|
||||
} else {
|
||||
storageType = "unknown";
|
||||
}
|
||||
} else {
|
||||
storageType = ApiDBUtils.volumeIsOnSharedStorage(volume.getId()) ? ServiceOffering.StorageType.shared.toString() : ServiceOffering.StorageType.local.toString();
|
||||
}
|
||||
} catch (InvalidParameterValueException e) {
|
||||
s_logger.error(e.getMessage(), e);
|
||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Volume " + volume.getName() + " does not have a valid ID");
|
||||
}
|
||||
|
||||
volResponse.setStorageType(storageType);
|
||||
if (volume.getVolumeType().equals(Volume.Type.ROOT)) {
|
||||
volResponse.setServiceOfferingId(volume.getDiskOfferingId());
|
||||
} else {
|
||||
|
|
@ -1156,6 +1138,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
volResponse.setDiskOfferingName(diskOffering.getName());
|
||||
volResponse.setDiskOfferingDisplayText(diskOffering.getDisplayText());
|
||||
}
|
||||
volResponse.setStorageType(diskOffering.getUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString());
|
||||
|
||||
Long poolId = volume.getPoolId();
|
||||
String poolName = (poolId == null) ? "none" : ApiDBUtils.findStoragePoolById(poolId).getName();
|
||||
|
|
|
|||
|
|
@ -4331,27 +4331,25 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
@Override
|
||||
public boolean networkIsConfiguredForExternalNetworking(long zoneId, long networkId) {
|
||||
boolean netscalerInNetwork = isProviderForNetwork(Network.Provider.Netscaler, networkId);
|
||||
boolean juniperInNetwork = isProviderForNetwork(Network.Provider.JuniperSRX, networkId);
|
||||
boolean f5InNetwork = isProviderForNetwork(Network.Provider.F5BigIp, networkId);
|
||||
|
||||
if (netscalerInNetwork || juniperInNetwork || f5InNetwork) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
List<Provider> networkProviders = getNetworkProviders(networkId);
|
||||
for(Provider provider : networkProviders){
|
||||
if(provider.isExternal()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean networkOfferingIsConfiguredForExternalNetworking(long networkOfferingId) {
|
||||
boolean netscalerInNetworkOffering = isProviderForNetworkOffering(Network.Provider.Netscaler, networkOfferingId);
|
||||
boolean juniperInNetworkOffering = isProviderForNetworkOffering(Network.Provider.JuniperSRX, networkOfferingId);
|
||||
boolean f5InNetworkOffering = isProviderForNetworkOffering(Network.Provider.F5BigIp, networkOfferingId);
|
||||
|
||||
if (netscalerInNetworkOffering || juniperInNetworkOffering || f5InNetworkOffering) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
List<Provider> networkOffProviders = getNtwkOffDistinctProviders(networkOfferingId);
|
||||
for(Provider provider : networkOffProviders){
|
||||
if(provider.isExternal()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -6748,14 +6746,6 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
l.add(service);
|
||||
}
|
||||
|
||||
for (String provider : providerSvcs.keySet()) {
|
||||
NetworkElement element = getElementImplementingProvider(provider);
|
||||
List<String> services = providerSvcs.get(provider);
|
||||
if (!element.verifyServicesCombination(services)) {
|
||||
throw new UnsupportedServiceException("Provider " + provider + " doesn't support services combination: " + services);
|
||||
}
|
||||
}
|
||||
|
||||
return svcProviders;
|
||||
}
|
||||
|
||||
|
|
@ -6780,12 +6770,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
private List<Provider> getNetworkProviders(long networkId) {
|
||||
List<String> providerNames = _ntwkSrvcDao.getDistinctProviders(networkId);
|
||||
List<Provider> providers = new ArrayList<Provider>();
|
||||
Map<String, Provider> providers = new HashMap<String, Provider>();
|
||||
for (String providerName : providerNames) {
|
||||
providers.add(Network.Provider.getProvider(providerName));
|
||||
if(!providers.containsKey(providerName)){
|
||||
providers.put(providerName, Network.Provider.getProvider(providerName));
|
||||
}
|
||||
}
|
||||
|
||||
return providers;
|
||||
return new ArrayList<Provider>(providers.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -6852,11 +6844,16 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
+ provider.getName(), null);
|
||||
}
|
||||
}
|
||||
List<String> serviceList = new ArrayList<String>();
|
||||
for (Service service : enabledServices) {
|
||||
// check if the service is provided by this Provider
|
||||
if (!element.getCapabilities().containsKey(service)) {
|
||||
throw new UnsupportedServiceException(provider.getName() + " Provider cannot provide service " + service.getName());
|
||||
}
|
||||
serviceList.add(service.getName());
|
||||
}
|
||||
if (!element.verifyServicesCombination(enabledServices)) {
|
||||
throw new UnsupportedServiceException("Provider " + provider.getName() + " doesn't support services combination: " + serviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7128,12 +7125,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
@Override
|
||||
public List<Provider> getNtwkOffDistinctProviders(long networkId) {
|
||||
List<String> providerNames = _ntwkOfferingSrvcDao.getDistinctProviders(networkId);
|
||||
List<Provider> providers = new ArrayList<Provider>();
|
||||
Map<String, Provider> providers = new HashMap<String, Provider>();
|
||||
for (String providerName : providerNames) {
|
||||
providers.add(Network.Provider.getProvider(providerName));
|
||||
if(!providers.containsKey(providerName)){
|
||||
providers.put(providerName, Network.Provider.getProvider(providerName));
|
||||
}
|
||||
}
|
||||
|
||||
return providers;
|
||||
return new ArrayList<Provider>(providers.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ public class NetworkVO implements Network, Identity {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buf = new StringBuilder("Ntwk[");
|
||||
buf.append(id).append("|").append(trafficType.toString()).append("|").append(networkOfferingId).append("]");
|
||||
buf.append(id).append("|").append(trafficType).append("|").append(networkOfferingId).append("]");
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ package com.cloud.network.element;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
|
@ -118,7 +119,7 @@ public class BareMetalElement extends AdapterBase implements NetworkElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ package com.cloud.network.element;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
|
@ -127,7 +128,7 @@ public class CiscoNexusVSMElement extends CiscoNexusVSMDeviceManagerImpl impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ package com.cloud.network.element;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
|
@ -233,7 +234,7 @@ public class CloudZonesNetworkElement extends AdapterBase implements NetworkElem
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ public class ElasticLoadBalancerElement extends AdapterBase implements LoadBalan
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ package com.cloud.network.element;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
|
@ -142,7 +143,7 @@ public class ExternalDhcpElement extends AdapterBase implements NetworkElement,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer, Junip
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ package com.cloud.network.element;
|
|||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
|
@ -543,15 +544,19 @@ StaticNatServiceProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
List<String> netscalerServices = new ArrayList<String>();
|
||||
netscalerServices.add(Service.Lb.getName());
|
||||
netscalerServices.add(Service.StaticNat.getName());
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
Set<Service> netscalerServices = new HashSet<Service>();
|
||||
netscalerServices.add(Service.Lb);
|
||||
netscalerServices.add(Service.StaticNat);
|
||||
|
||||
// NetScaler can only act as Lb and Static Nat service provider
|
||||
if (services != null && !services.isEmpty() && !netscalerServices.containsAll(services)) {
|
||||
String servicesList = "";
|
||||
for (Service service : services) {
|
||||
servicesList += service.getName() + " ";
|
||||
}
|
||||
s_logger.warn("NetScaler network element can only support LB and Static NAT services and service combination "
|
||||
+ services + " is not supported.");
|
||||
+ servicesList + " is not supported.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ package com.cloud.network.element;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
|
@ -126,7 +127,7 @@ public class OvsElement extends AdapterBase implements NetworkElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ package com.cloud.network.element;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
|
@ -101,7 +102,7 @@ public class SecurityGroupElement extends AdapterBase implements NetworkElement
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -869,11 +869,16 @@ LoadBalancingServiceProvider, PortForwardingServiceProvider, RemoteAccessVPNServ
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyServicesCombination(List<String> services) {
|
||||
if (!services.contains("SourceNat")) {
|
||||
if (services.contains("StaticNat") || services.contains("Firewall") || services.contains("Lb") || services.contains("PortForwarding") ||
|
||||
services.contains("Vpn")) {
|
||||
s_logger.warn("Virtual router can't enable services " + services + " without source NAT service");
|
||||
public boolean verifyServicesCombination(Set<Service> services) {
|
||||
if (!services.contains(Service.SourceNat)) {
|
||||
if (services.contains(Service.StaticNat) || services.contains(Service.Firewall) || services.contains(Service.Lb) ||
|
||||
services.contains(Service.PortForwarding) || services.contains(Service.Vpn)) {
|
||||
String servicesList = "[";
|
||||
for (Service service : services) {
|
||||
servicesList += service.getName() + " ";
|
||||
}
|
||||
servicesList += "]";
|
||||
s_logger.warn("Virtual router can't enable services " + servicesList + " without source NAT service");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2465,9 +2465,19 @@ VirtualMachineGuru<DomainRouterVO>, Listener {
|
|||
if (offering.getRedundantRouter()) {
|
||||
return findGatewayIp(userVmId);
|
||||
}
|
||||
|
||||
DataCenter dc = _dcDao.findById(_networkMgr.getNetwork(defaultNic.getNetworkId()).getDataCenterId());
|
||||
boolean isZoneBasic = (dc.getNetworkType() == NetworkType.Basic);
|
||||
|
||||
//find domR's nic in the network
|
||||
NicVO domrDefaultNic = _nicDao.findByNetworkIdAndType(defaultNic.getNetworkId(), VirtualMachine.Type.DomainRouter);
|
||||
NicVO domrDefaultNic;
|
||||
if (isZoneBasic){
|
||||
domrDefaultNic = _nicDao.findByNetworkIdTypeAndGateway(defaultNic.getNetworkId(), VirtualMachine.Type.DomainRouter, defaultNic.getGateway());
|
||||
}
|
||||
else{
|
||||
domrDefaultNic = _nicDao.findByNetworkIdAndType(defaultNic.getNetworkId(), VirtualMachine.Type.DomainRouter);
|
||||
}
|
||||
|
||||
return domrDefaultNic.getIp4Address();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ import com.cloud.utils.net.NetUtils;
|
|||
import com.cloud.vm.DomainRouterVO;
|
||||
import com.cloud.vm.Nic;
|
||||
import com.cloud.vm.NicProfile;
|
||||
import com.cloud.vm.NicVO;
|
||||
import com.cloud.vm.ReservationContext;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VirtualMachine.State;
|
||||
|
|
@ -1119,7 +1120,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
|
|||
String localGuestCidr = vpc.getCidr();
|
||||
String localPublicGateway = _vlanDao.findById(ip.getVlanId()).getVlanGateway();
|
||||
String peerGatewayIp = gw.getGatewayIp();
|
||||
String peerGuestCidrList = gw.getGuestCidrList();
|
||||
String peerGuestCidrList = gw.getGuestCidrList().replace(";", ",");
|
||||
String ipsecPsk = gw.getIpsecPsk();
|
||||
String ikePolicy = gw.getIkePolicy();
|
||||
String espPolicy = gw.getEspPolicy();
|
||||
|
|
@ -1326,10 +1327,19 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
|
|||
Nic nic = _nicDao.findByNetworkIdInstanceIdAndBroadcastUri(publicNtwkId, router.getId(),
|
||||
broadcastUri.toString());
|
||||
|
||||
if ((nic == null && nicsToPlug.get(ip.getVlanTag()) == null) || nicsToUnplug.get(ip.getVlanTag()) != null) {
|
||||
if (nic == null && nicsToPlug.get(ip.getVlanTag()) == null) {
|
||||
nicsToPlug.put(ip.getVlanTag(), ip);
|
||||
s_logger.debug("Need to plug the nic for ip=" + ip + "; vlan=" + ip.getVlanTag() +
|
||||
" in public network id =" + publicNtwkId);
|
||||
} else {
|
||||
PublicIpAddress nicToUnplug = nicsToUnplug.get(ip.getVlanTag());
|
||||
if (nicToUnplug != null) {
|
||||
NicVO nicVO = _nicDao.findByIp4AddressAndNetworkIdAndInstanceId(publicNtwkId, router.getId(), nicToUnplug.getAddress().addr());
|
||||
nicVO.setIp4Address(ip.getAddress().addr());
|
||||
_nicDao.update(nicVO.getId(), nicVO);
|
||||
s_logger.debug("Updated the nic " + nicVO + " with the new ip address " + ip.getAddress().addr());
|
||||
nicsToUnplug.remove(ip.getVlanTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
@DB
|
||||
public boolean destroyVpc(Vpc vpc) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
UserContext ctx = UserContext.current();
|
||||
|
||||
s_logger.debug("Destroying vpc " + vpc);
|
||||
//don't allow to delete vpc if it's in use by existing networks
|
||||
int networksCount = _ntwkDao.getNetworkCountByVpcId(vpc.getId());
|
||||
if (networksCount > 0) {
|
||||
|
|
@ -671,9 +671,10 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
|
||||
//update the instance with removed flag only when the cleanup is executed successfully
|
||||
if (_vpcDao.remove(vpc.getId())) {
|
||||
s_logger.debug("Vpc " + vpc + " is removed succesfully");
|
||||
s_logger.debug("Vpc " + vpc + " is destroyed succesfully");
|
||||
return true;
|
||||
} else {
|
||||
s_logger.warn("Vpc " + vpc + " failed to destroy");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -927,9 +928,10 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
_accountMgr.checkAccess(caller, null, false, vpc);
|
||||
|
||||
//shutdown provider
|
||||
s_logger.debug("Shutting down vpc " + vpc);
|
||||
boolean success = getVpcElement().shutdownVpc(vpc);
|
||||
|
||||
//TODO - cleanup all vpc resources here (ACLs, gateways, etc)
|
||||
//TODO - shutdown all vpc resources here (ACLs, gateways, etc)
|
||||
if (success) {
|
||||
s_logger.debug("Vpc " + vpc + " has been shutdown succesfully");
|
||||
} else {
|
||||
|
|
@ -944,6 +946,10 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
Account networkOwner, Vpc vpc, Long networkId, String gateway) {
|
||||
|
||||
NetworkOffering guestNtwkOff = _configMgr.getNetworkOffering(ntwkOffId);
|
||||
|
||||
if (guestNtwkOff == null) {
|
||||
throw new InvalidParameterValueException("Can't find network offering by id specified", null);
|
||||
}
|
||||
|
||||
if (networkId == null) {
|
||||
//1) Validate attributes that has to be passed in when create new guest network
|
||||
|
|
@ -956,7 +962,7 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
|
||||
throw new InvalidParameterValueException("Only networks of type " + GuestType.Isolated + " with service "
|
||||
+ Service.SourceNat.getName() +
|
||||
" can be added as a part of VPC", null);
|
||||
" can be added as a part of VPC ", null);
|
||||
}
|
||||
|
||||
//3) No redundant router support
|
||||
|
|
@ -1000,7 +1006,6 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@DB
|
||||
|
|
@ -1085,6 +1090,10 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
vpcElement = ((VpcProvider)_ntwkMgr.getElementImplementingProvider(Provider.VPCVirtualRouter.getName()));
|
||||
}
|
||||
|
||||
if (vpcElement == null) {
|
||||
throw new CloudRuntimeException("Failed to initialize vpc element");
|
||||
}
|
||||
|
||||
return vpcElement;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -228,6 +228,10 @@ public class Site2SiteVpnManagerImpl implements Site2SiteVpnManager, Manager {
|
|||
throw new InvalidParameterValueException("Unable to find specified Site to Site VPN gateway by id", null);
|
||||
}
|
||||
_accountMgr.checkAccess(caller, null, false, vpnGateway);
|
||||
|
||||
if (customerGateway.getAccountId() != vpnGateway.getAccountId() || customerGateway.getDomainId() != vpnGateway.getDomainId()) {
|
||||
throw new InvalidParameterValueException("VPN connection can only be esitablished between same account's VPN gateway and customer gateway!", null);
|
||||
}
|
||||
|
||||
if (_vpnConnectionDao.findByVpnGatewayIdAndCustomerGatewayId(vpnGatewayId, customerGatewayId) != null) {
|
||||
List<IdentityProxy> idList = new ArrayList<IdentityProxy>();
|
||||
|
|
|
|||
|
|
@ -175,7 +175,8 @@ public class ConsoleProxyServlet extends HttpServlet {
|
|||
return;
|
||||
}
|
||||
|
||||
String rootUrl = _ms.getConsoleAccessUrlRoot(vmId);
|
||||
String rootUrl = _ms.getConsoleAccessUrlRoot(vmId);
|
||||
|
||||
if(rootUrl == null) {
|
||||
sendResponse(resp, "");
|
||||
return;
|
||||
|
|
@ -226,7 +227,9 @@ public class ConsoleProxyServlet extends HttpServlet {
|
|||
return;
|
||||
}
|
||||
|
||||
String rootUrl = _ms.getConsoleAccessUrlRoot(vmId);
|
||||
String rootUrl = _ms.getConsoleAccessUrlRoot(vmId);
|
||||
//String rootUrl = "http://localhost:8099";
|
||||
|
||||
if(rootUrl == null) {
|
||||
sendResponse(resp, "<html><body><p>Console access will be ready in a few minutes. Please try it again later.</p></body></html>");
|
||||
return;
|
||||
|
|
@ -322,6 +325,7 @@ public class ConsoleProxyServlet extends HttpServlet {
|
|||
|
||||
ConsoleProxyPasswordBasedEncryptor encryptor = new ConsoleProxyPasswordBasedEncryptor(_ms.getHashKey());
|
||||
ConsoleProxyClientParam param = new ConsoleProxyClientParam();
|
||||
|
||||
param.setClientHostAddress(parsedHostInfo.first());
|
||||
param.setClientHostPort(portInfo.second());
|
||||
param.setClientHostPassword(sid);
|
||||
|
|
@ -331,9 +335,9 @@ public class ConsoleProxyServlet extends HttpServlet {
|
|||
param.setClientTunnelUrl(parsedHostInfo.second());
|
||||
param.setClientTunnelSession(parsedHostInfo.third());
|
||||
}
|
||||
|
||||
s_logger.debug("Thumbnail url params" + param.toString());
|
||||
sb.append("/ajaximg?token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
|
||||
sb.append("&w=").append(w).append("&h=").append(h);
|
||||
sb.append("&w=").append(w).append("&h=").append(h).append("&key=0");
|
||||
|
||||
if(s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Compose thumbnail url: " + sb.toString());
|
||||
|
|
|
|||
|
|
@ -2549,6 +2549,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
private void validateUserData(String userData) {
|
||||
byte[] decodedUserData = null;
|
||||
if (userData != null) {
|
||||
if ( !userData.matches("^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$")) {
|
||||
throw new InvalidParameterValueException("User data is not base64 encoded", null);
|
||||
}
|
||||
if (userData.length() >= 2 * MAX_USER_DATA_LENGTH_BYTES) {
|
||||
throw new InvalidParameterValueException("User data is too long", null);
|
||||
}
|
||||
|
|
@ -3423,8 +3426,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
idList.add(new IdentityProxy(oldAccount, oldAccount.getAccountId(), "accountId"));
|
||||
throw new InvalidParameterValueException("The account with the specified id should be same domain for moving VM between two accounts.", idList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// don't allow to move the vm if there are existing PF/LB/Static Nat rules, or vm is assigned to static Nat ip
|
||||
List<PortForwardingRuleVO> pfrules = _portForwardingDao.listByVm(cmd.getVmId());
|
||||
if (pfrules != null && pfrules.size() > 0){
|
||||
|
|
@ -3454,6 +3456,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
//VV 2: check if account/domain is with in resource limits to create a new vm
|
||||
_resourceLimitMgr.checkResourceLimit(newAccount, ResourceType.user_vm);
|
||||
|
||||
//VV 3: check if volumes are with in resource limits
|
||||
_resourceLimitMgr.checkResourceLimit(newAccount, ResourceType.volume, _volsDao.findByInstance(cmd.getVmId()).size());
|
||||
|
||||
// VV 4: Check if new owner can use the vm template
|
||||
VirtualMachineTemplate template = _templateDao.findById(vm.getTemplateId());
|
||||
if (!template.isPublicTemplate()) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ public interface NicDao extends GenericDao<NicVO, Long> {
|
|||
void removeNicsForInstance(long instanceId);
|
||||
|
||||
NicVO findByNetworkIdAndType(long networkId, VirtualMachine.Type vmType);
|
||||
NicVO findByNetworkIdTypeAndGateway(long networkId, VirtualMachine.Type vmType, String gateway);
|
||||
|
||||
NicVO findByIp4AddressAndNetworkId(String ip4Address, long networkId);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public class NicDaoImpl extends GenericDaoBase<NicVO, Long> implements NicDao {
|
|||
AllFieldsSearch.and("network", AllFieldsSearch.entity().getNetworkId(), Op.EQ);
|
||||
AllFieldsSearch.and("vmType", AllFieldsSearch.entity().getVmType(), Op.EQ);
|
||||
AllFieldsSearch.and("address", AllFieldsSearch.entity().getIp4Address(), Op.EQ);
|
||||
AllFieldsSearch.and("gateway", AllFieldsSearch.entity().getGateway(), Op.EQ);
|
||||
AllFieldsSearch.and("isDefault", AllFieldsSearch.entity().isDefaultNic(), Op.EQ);
|
||||
AllFieldsSearch.and("broadcastUri", AllFieldsSearch.entity().getBroadcastUri(), Op.EQ);
|
||||
AllFieldsSearch.done();
|
||||
|
|
@ -126,6 +127,15 @@ public class NicDaoImpl extends GenericDaoBase<NicVO, Long> implements NicDao {
|
|||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NicVO findByNetworkIdTypeAndGateway(long networkId, VirtualMachine.Type vmType, String gateway) {
|
||||
SearchCriteria<NicVO> sc = AllFieldsSearch.create();
|
||||
sc.setParameters("network", networkId);
|
||||
sc.setParameters("vmType", vmType);
|
||||
sc.setParameters("gateway", gateway);
|
||||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NicVO findByIp4AddressAndNetworkId(String ip4Address, long networkId) {
|
||||
SearchCriteria<NicVO> sc = AllFieldsSearch.create();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ import com.cloud.network.element.UserDataServiceProvider;
|
|||
import com.cloud.network.guru.NetworkGuru;
|
||||
import com.cloud.network.rules.FirewallRule;
|
||||
import com.cloud.network.rules.StaticNat;
|
||||
import com.cloud.network.vpc.Vpc;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offerings.NetworkOfferingVO;
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -946,15 +945,6 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkManager#unassignIPFromVpcNetwork(long)
|
||||
*/
|
||||
@Override
|
||||
public void unassignIPFromVpcNetwork(long ipId, long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkManager#getNicProfile(com.cloud.vm.VirtualMachine, long)
|
||||
*/
|
||||
|
|
@ -973,16 +963,6 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkService#allocateIP(com.cloud.user.Account, boolean, long)
|
||||
*/
|
||||
@Override
|
||||
public IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkService#listNetworksByVpc(long)
|
||||
*/
|
||||
|
|
@ -1010,15 +990,6 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkManager#assignSourceNatIpAddressToVpc(com.cloud.user.Account, com.cloud.network.vpc.Vpc)
|
||||
*/
|
||||
@Override
|
||||
public PublicIp assignSourceNatIpAddressToVpc(Account owner, Vpc vpc) throws InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkService#canUseForDeploy(com.cloud.network.Network)
|
||||
*/
|
||||
|
|
@ -1085,11 +1056,29 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkManager#ipUsedInVpc(com.cloud.network.IpAddress)
|
||||
* @see com.cloud.network.NetworkService#allocateIP(com.cloud.user.Account, long)
|
||||
*/
|
||||
@Override
|
||||
public boolean ipUsedInVpc(IpAddress ip) {
|
||||
public IpAddress allocateIP(Account ipOwner, long zoneId) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkManager#markPublicIpAsAllocated(com.cloud.network.IPAddressVO)
|
||||
*/
|
||||
@Override
|
||||
public void markPublicIpAsAllocated(IPAddressVO addr) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkManager#assignDedicateIpAddress(com.cloud.user.Account, java.lang.Long, java.lang.Long, long, boolean)
|
||||
*/
|
||||
@Override
|
||||
public PublicIp assignDedicateIpAddress(Account owner, Long guestNtwkId, Long vpcId, long dcId, boolean isSourceNat) throws ConcurrentOperationException, InsufficientAddressCapacityException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import com.cloud.utils.db.SearchCriteria;
|
|||
|
||||
|
||||
@Local(value = { AccountManager.class, AccountService.class })
|
||||
public class MockAccountManagerImpl implements Manager, AccountManager {
|
||||
public class MockAccountManagerImpl implements Manager, AccountManager, AccountService {
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -98,14 +98,12 @@ public class MockAccountManagerImpl implements Manager, AccountManager {
|
|||
|
||||
@Override
|
||||
public Account getSystemAccount() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return new AccountVO();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getSystemUser() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return new UserVO();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -0,0 +1,599 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
import javax.naming.NamingException;
|
||||
|
||||
import com.cloud.api.commands.CreateDiskOfferingCmd;
|
||||
import com.cloud.api.commands.CreateNetworkOfferingCmd;
|
||||
import com.cloud.api.commands.CreateServiceOfferingCmd;
|
||||
import com.cloud.api.commands.CreateVlanIpRangeCmd;
|
||||
import com.cloud.api.commands.CreateZoneCmd;
|
||||
import com.cloud.api.commands.DeleteDiskOfferingCmd;
|
||||
import com.cloud.api.commands.DeleteNetworkOfferingCmd;
|
||||
import com.cloud.api.commands.DeletePodCmd;
|
||||
import com.cloud.api.commands.DeleteServiceOfferingCmd;
|
||||
import com.cloud.api.commands.DeleteVlanIpRangeCmd;
|
||||
import com.cloud.api.commands.DeleteZoneCmd;
|
||||
import com.cloud.api.commands.LDAPConfigCmd;
|
||||
import com.cloud.api.commands.LDAPRemoveCmd;
|
||||
import com.cloud.api.commands.ListNetworkOfferingsCmd;
|
||||
import com.cloud.api.commands.UpdateCfgCmd;
|
||||
import com.cloud.api.commands.UpdateDiskOfferingCmd;
|
||||
import com.cloud.api.commands.UpdateNetworkOfferingCmd;
|
||||
import com.cloud.api.commands.UpdatePodCmd;
|
||||
import com.cloud.api.commands.UpdateServiceOfferingCmd;
|
||||
import com.cloud.api.commands.UpdateZoneCmd;
|
||||
import com.cloud.configuration.Configuration;
|
||||
import com.cloud.configuration.ConfigurationManager;
|
||||
import com.cloud.configuration.ConfigurationService;
|
||||
import com.cloud.dc.ClusterVO;
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenter.NetworkType;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.HostPodVO;
|
||||
import com.cloud.dc.Pod;
|
||||
import com.cloud.dc.Vlan;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.Network.Capability;
|
||||
import com.cloud.network.Network.GuestType;
|
||||
import com.cloud.network.Network.Provider;
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
import com.cloud.offering.DiskOffering;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offering.NetworkOffering.Availability;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.offerings.NetworkOfferingVO;
|
||||
import com.cloud.offerings.dao.NetworkOfferingDao;
|
||||
import com.cloud.org.Grouping.AllocationState;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.storage.DiskOfferingVO;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.utils.component.Inject;
|
||||
import com.cloud.utils.component.Manager;
|
||||
import com.cloud.vm.VirtualMachine.Type;
|
||||
|
||||
@Local(value = { ConfigurationManager.class, ConfigurationService.class })
|
||||
public class MockConfigurationManagerImpl implements ConfigurationManager, ConfigurationService, Manager{
|
||||
@Inject
|
||||
NetworkOfferingDao _ntwkOffDao;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#updateConfiguration(com.cloud.api.commands.UpdateCfgCmd)
|
||||
*/
|
||||
@Override
|
||||
public Configuration updateConfiguration(UpdateCfgCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#createServiceOffering(com.cloud.api.commands.CreateServiceOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#updateServiceOffering(com.cloud.api.commands.UpdateServiceOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#deleteServiceOffering(com.cloud.api.commands.DeleteServiceOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#updateDiskOffering(com.cloud.api.commands.UpdateDiskOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#deleteDiskOffering(com.cloud.api.commands.DeleteDiskOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#createDiskOffering(com.cloud.api.commands.CreateDiskOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#createPod(long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#editPod(com.cloud.api.commands.UpdatePodCmd)
|
||||
*/
|
||||
@Override
|
||||
public Pod editPod(UpdatePodCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#deletePod(com.cloud.api.commands.DeletePodCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deletePod(DeletePodCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#createZone(com.cloud.api.commands.CreateZoneCmd)
|
||||
*/
|
||||
@Override
|
||||
public DataCenter createZone(CreateZoneCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#editZone(com.cloud.api.commands.UpdateZoneCmd)
|
||||
*/
|
||||
@Override
|
||||
public DataCenter editZone(UpdateZoneCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#deleteZone(com.cloud.api.commands.DeleteZoneCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteZone(DeleteZoneCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#createVlanAndPublicIpRange(com.cloud.api.commands.CreateVlanIpRangeCmd)
|
||||
*/
|
||||
@Override
|
||||
public Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, ResourceAllocationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#markDefaultZone(java.lang.String, long, long)
|
||||
*/
|
||||
@Override
|
||||
public Account markDefaultZone(String accountName, long domainId, long defaultZoneId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#deleteVlanIpRange(com.cloud.api.commands.DeleteVlanIpRangeCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVlanIpRange(DeleteVlanIpRangeCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#createNetworkOffering(com.cloud.api.commands.CreateNetworkOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#updateNetworkOffering(com.cloud.api.commands.UpdateNetworkOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#searchForNetworkOfferings(com.cloud.api.commands.ListNetworkOfferingsCmd)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends NetworkOffering> searchForNetworkOfferings(ListNetworkOfferingsCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#deleteNetworkOffering(com.cloud.api.commands.DeleteNetworkOfferingCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteNetworkOffering(DeleteNetworkOfferingCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getNetworkOffering(long)
|
||||
*/
|
||||
@Override
|
||||
public NetworkOffering getNetworkOffering(long id) {
|
||||
return _ntwkOffDao.findById(id);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getNetworkOfferingNetworkRate(long)
|
||||
*/
|
||||
@Override
|
||||
public Integer getNetworkOfferingNetworkRate(long networkOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getVlanAccount(long)
|
||||
*/
|
||||
@Override
|
||||
public Account getVlanAccount(long vlanId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#listNetworkOfferings(com.cloud.network.Networks.TrafficType, boolean)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends NetworkOffering> listNetworkOfferings(TrafficType trafficType, boolean systemOnly) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getZone(long)
|
||||
*/
|
||||
@Override
|
||||
public DataCenter getZone(long id) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getServiceOffering(long)
|
||||
*/
|
||||
@Override
|
||||
public ServiceOffering getServiceOffering(long serviceOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getDefaultPageSize()
|
||||
*/
|
||||
@Override
|
||||
public Long getDefaultPageSize() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getServiceOfferingNetworkRate(long)
|
||||
*/
|
||||
@Override
|
||||
public Integer getServiceOfferingNetworkRate(long serviceOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#getDiskOffering(long)
|
||||
*/
|
||||
@Override
|
||||
public DiskOffering getDiskOffering(long diskOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#updateLDAP(com.cloud.api.commands.LDAPConfigCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean updateLDAP(LDAPConfigCmd cmd) throws NamingException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#removeLDAP(com.cloud.api.commands.LDAPRemoveCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean removeLDAP(LDAPRemoveCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationService#isOfferingForVpc(com.cloud.offering.NetworkOffering)
|
||||
*/
|
||||
@Override
|
||||
public boolean isOfferingForVpc(NetworkOffering offering) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#configure(java.lang.String, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#start()
|
||||
*/
|
||||
@Override
|
||||
public boolean start() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#stop()
|
||||
*/
|
||||
@Override
|
||||
public boolean stop() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#updateConfiguration(long, java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void updateConfiguration(long userId, String name, String category, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createServiceOffering(long, boolean, com.cloud.vm.VirtualMachine.Type, java.lang.String, int, int, int, java.lang.String, boolean, boolean, boolean, java.lang.String, java.lang.Long, java.lang.String, java.lang.Integer)
|
||||
*/
|
||||
@Override
|
||||
public ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA,
|
||||
boolean limitResourceUse, String tags, Long domainId, String hostTag, Integer networkRate) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createDiskOffering(java.lang.Long, java.lang.String, java.lang.String, java.lang.Long, java.lang.String, boolean, boolean)
|
||||
*/
|
||||
@Override
|
||||
public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createPod(long, java.lang.String, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
|
||||
*/
|
||||
@Override
|
||||
public HostPodVO createPod(long userId, String podName, long zoneId, String gateway, String cidr, String startIp, String endIp, String allocationState, boolean skipGatewayOverlapCheck) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createZone(long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Long, com.cloud.dc.DataCenter.NetworkType, java.lang.String, java.lang.String, boolean, boolean)
|
||||
*/
|
||||
@Override
|
||||
public DataCenterVO createZone(long userId, String zoneName, String dns1, String dns2, String internalDns1, String internalDns2, String guestCidr, String domain, Long domainId, NetworkType zoneType,
|
||||
String allocationState, String networkDomain, boolean isSecurityGroupEnabled, boolean isLocalStorageEnabled) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#deleteVlanAndPublicIpRange(long, long, com.cloud.user.Account)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVlanAndPublicIpRange(long userId, long vlanDbId, Account caller) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#csvTagsToList(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public List<String> csvTagsToList(String tags) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#listToCsvTags(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public String listToCsvTags(List<String> tags) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#checkZoneAccess(com.cloud.user.Account, com.cloud.dc.DataCenter)
|
||||
*/
|
||||
@Override
|
||||
public void checkZoneAccess(Account caller, DataCenter zone) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#checkDiskOfferingAccess(com.cloud.user.Account, com.cloud.offering.DiskOffering)
|
||||
*/
|
||||
@Override
|
||||
public void checkDiskOfferingAccess(Account caller, DiskOffering dof) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createNetworkOffering(java.lang.String, java.lang.String, com.cloud.network.Networks.TrafficType, java.lang.String, boolean, com.cloud.offering.NetworkOffering.Availability, java.lang.Integer, java.util.Map, boolean, com.cloud.network.Network.GuestType, boolean, java.lang.Long, boolean, java.util.Map, boolean)
|
||||
*/
|
||||
@Override
|
||||
public NetworkOfferingVO createNetworkOffering(String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, Integer networkRate,
|
||||
Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, GuestType type, boolean systemOnly, Long serviceOfferingId, boolean conserveMode,
|
||||
Map<Service, Map<Capability, String>> serviceCapabilityMap, boolean specifyIpRanges) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createVlanAndPublicIpRange(long, long, long, boolean, java.lang.Long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.cloud.user.Account)
|
||||
*/
|
||||
@Override
|
||||
public Vlan createVlanAndPublicIpRange(long zoneId, long networkId, long physicalNetworkId, boolean forVirtualNetwork, Long podId, String startIP, String endIP, String vlanGateway, String vlanNetmask, String vlanId,
|
||||
Account vlanOwner) throws InsufficientCapacityException, ConcurrentOperationException, InvalidParameterValueException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#createDefaultSystemNetworks(long)
|
||||
*/
|
||||
@Override
|
||||
public void createDefaultSystemNetworks(long zoneId) throws ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#getPod(long)
|
||||
*/
|
||||
@Override
|
||||
public HostPodVO getPod(long id) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#getCluster(long)
|
||||
*/
|
||||
@Override
|
||||
public ClusterVO getCluster(long id) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#deleteAccountSpecificVirtualRanges(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteAccountSpecificVirtualRanges(long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#editPod(long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Pod editPod(long id, String name, String startIp, String endIp, String gateway, String netmask, String allocationStateStr) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#checkPodCidrSubnets(long, java.lang.Long, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void checkPodCidrSubnets(long zoneId, Long podIdToBeSkipped, String cidr) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#findPodAllocationState(com.cloud.dc.HostPodVO)
|
||||
*/
|
||||
@Override
|
||||
public AllocationState findPodAllocationState(HostPodVO pod) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#findClusterAllocationState(com.cloud.dc.ClusterVO)
|
||||
*/
|
||||
@Override
|
||||
public AllocationState findClusterAllocationState(ClusterVO cluster) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.ConfigurationManager#cleanupTags(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String cleanupTags(String tags) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,150 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import com.cloud.configuration.Resource.ResourceType;
|
||||
import com.cloud.configuration.ResourceCount;
|
||||
import com.cloud.configuration.ResourceLimit;
|
||||
import com.cloud.domain.Domain;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.ResourceLimitService;
|
||||
import com.cloud.utils.component.Manager;
|
||||
|
||||
@Local(value = { ResourceLimitService.class })
|
||||
public class MockResourceLimitManagerImpl implements ResourceLimitService, Manager{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#updateResourceLimit(java.lang.Long, java.lang.Long, java.lang.Integer, java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public ResourceLimit updateResourceLimit(Long accountId, Long domainId, Integer resourceType, Long max) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#recalculateResourceCount(java.lang.Long, java.lang.Long, java.lang.Integer)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends ResourceCount> recalculateResourceCount(Long accountId, Long domainId, Integer typeId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#searchForLimits(java.lang.Long, java.lang.Long, java.lang.Long, java.lang.Integer, java.lang.Long, java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends ResourceLimit> searchForLimits(Long id, Long accountId, Long domainId, Integer type, Long startIndex, Long pageSizeVal) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#findCorrectResourceLimitForAccount(com.cloud.user.Account, com.cloud.configuration.Resource.ResourceType)
|
||||
*/
|
||||
@Override
|
||||
public long findCorrectResourceLimitForAccount(Account account, ResourceType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#findCorrectResourceLimitForDomain(com.cloud.domain.Domain, com.cloud.configuration.Resource.ResourceType)
|
||||
*/
|
||||
@Override
|
||||
public long findCorrectResourceLimitForDomain(Domain domain, ResourceType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#incrementResourceCount(long, com.cloud.configuration.Resource.ResourceType, java.lang.Long[])
|
||||
*/
|
||||
@Override
|
||||
public void incrementResourceCount(long accountId, ResourceType type, Long... delta) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#decrementResourceCount(long, com.cloud.configuration.Resource.ResourceType, java.lang.Long[])
|
||||
*/
|
||||
@Override
|
||||
public void decrementResourceCount(long accountId, ResourceType type, Long... delta) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#checkResourceLimit(com.cloud.user.Account, com.cloud.configuration.Resource.ResourceType, long[])
|
||||
*/
|
||||
@Override
|
||||
public void checkResourceLimit(Account account, ResourceType type, long... count) throws ResourceAllocationException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.user.ResourceLimitService#getResourceCount(com.cloud.user.Account, com.cloud.configuration.Resource.ResourceType)
|
||||
*/
|
||||
@Override
|
||||
public long getResourceCount(Account account, ResourceType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#configure(java.lang.String, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#start()
|
||||
*/
|
||||
@Override
|
||||
public boolean start() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#stop()
|
||||
*/
|
||||
@Override
|
||||
public boolean stop() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import com.cloud.api.commands.CreateVpnConnectionCmd;
|
||||
import com.cloud.api.commands.CreateVpnCustomerGatewayCmd;
|
||||
import com.cloud.api.commands.CreateVpnGatewayCmd;
|
||||
import com.cloud.api.commands.DeleteVpnConnectionCmd;
|
||||
import com.cloud.api.commands.DeleteVpnCustomerGatewayCmd;
|
||||
import com.cloud.api.commands.DeleteVpnGatewayCmd;
|
||||
import com.cloud.api.commands.ListVpnConnectionsCmd;
|
||||
import com.cloud.api.commands.ListVpnCustomerGatewaysCmd;
|
||||
import com.cloud.api.commands.ListVpnGatewaysCmd;
|
||||
import com.cloud.api.commands.ResetVpnConnectionCmd;
|
||||
import com.cloud.api.commands.UpdateVpnCustomerGatewayCmd;
|
||||
import com.cloud.exception.NetworkRuleConflictException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.Site2SiteCustomerGateway;
|
||||
import com.cloud.network.Site2SiteVpnConnection;
|
||||
import com.cloud.network.Site2SiteVpnConnectionVO;
|
||||
import com.cloud.network.Site2SiteVpnGateway;
|
||||
import com.cloud.network.vpn.Site2SiteVpnManager;
|
||||
import com.cloud.network.vpn.Site2SiteVpnService;
|
||||
import com.cloud.utils.component.Manager;
|
||||
import com.cloud.vm.DomainRouterVO;
|
||||
|
||||
@Local(value = { Site2SiteVpnManager.class, Site2SiteVpnService.class } )
|
||||
public class MockSite2SiteVpnManagerImpl implements Site2SiteVpnManager, Site2SiteVpnService, Manager{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#createVpnGateway(com.cloud.api.commands.CreateVpnGatewayCmd)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteVpnGateway createVpnGateway(CreateVpnGatewayCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#createCustomerGateway(com.cloud.api.commands.CreateVpnCustomerGatewayCmd)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteCustomerGateway createCustomerGateway(CreateVpnCustomerGatewayCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#startVpnConnection(long)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteVpnConnection startVpnConnection(long id) throws ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#getVpnGateway(java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteVpnGateway getVpnGateway(Long vpnGatewayId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#createVpnConnection(com.cloud.api.commands.CreateVpnConnectionCmd)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteVpnConnection createVpnConnection(CreateVpnConnectionCmd cmd) throws NetworkRuleConflictException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#deleteCustomerGateway(com.cloud.api.commands.DeleteVpnCustomerGatewayCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteCustomerGateway(DeleteVpnCustomerGatewayCmd deleteVpnCustomerGatewayCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#deleteVpnGateway(com.cloud.api.commands.DeleteVpnGatewayCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVpnGateway(DeleteVpnGatewayCmd deleteVpnGatewayCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#deleteVpnConnection(com.cloud.api.commands.DeleteVpnConnectionCmd)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVpnConnection(DeleteVpnConnectionCmd deleteVpnConnectionCmd) throws ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#resetVpnConnection(com.cloud.api.commands.ResetVpnConnectionCmd)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteVpnConnection resetVpnConnection(ResetVpnConnectionCmd resetVpnConnectionCmd) throws ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#searchForCustomerGateways(com.cloud.api.commands.ListVpnCustomerGatewaysCmd)
|
||||
*/
|
||||
@Override
|
||||
public List<Site2SiteCustomerGateway> searchForCustomerGateways(ListVpnCustomerGatewaysCmd listVpnCustomerGatewaysCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#searchForVpnGateways(com.cloud.api.commands.ListVpnGatewaysCmd)
|
||||
*/
|
||||
@Override
|
||||
public List<Site2SiteVpnGateway> searchForVpnGateways(ListVpnGatewaysCmd listVpnGatewaysCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#searchForVpnConnections(com.cloud.api.commands.ListVpnConnectionsCmd)
|
||||
*/
|
||||
@Override
|
||||
public List<Site2SiteVpnConnection> searchForVpnConnections(ListVpnConnectionsCmd listVpnConnectionsCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnService#updateCustomerGateway(com.cloud.api.commands.UpdateVpnCustomerGatewayCmd)
|
||||
*/
|
||||
@Override
|
||||
public Site2SiteCustomerGateway updateCustomerGateway(UpdateVpnCustomerGatewayCmd updateVpnCustomerGatewayCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnManager#cleanupVpnConnectionByVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean cleanupVpnConnectionByVpc(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnManager#cleanupVpnGatewayByVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean cleanupVpnGatewayByVpc(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnManager#markDisconnectVpnConnByVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public void markDisconnectVpnConnByVpc(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnManager#getConnectionsForRouter(com.cloud.vm.DomainRouterVO)
|
||||
*/
|
||||
@Override
|
||||
public List<Site2SiteVpnConnectionVO> getConnectionsForRouter(DomainRouterVO router) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnManager#deleteCustomerGatewayByAccount(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteCustomerGatewayByAccount(long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#configure(java.lang.String, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#start()
|
||||
*/
|
||||
@Override
|
||||
public boolean start() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#stop()
|
||||
*/
|
||||
@Override
|
||||
public boolean stop() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpn.Site2SiteVpnManager#reconnectDisconnectedVpnByVpc(java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public void reconnectDisconnectedVpnByVpc(Long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,445 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import com.cloud.acl.ControlledEntity.ACLType;
|
||||
import com.cloud.api.commands.ListPrivateGatewaysCmd;
|
||||
import com.cloud.api.commands.ListStaticRoutesCmd;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientAddressCapacityException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.NetworkRuleConflictException;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.IpAddress;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.Network.Provider;
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.network.PhysicalNetwork;
|
||||
import com.cloud.network.addr.PublicIp;
|
||||
import com.cloud.network.vpc.PrivateGateway;
|
||||
import com.cloud.network.vpc.StaticRoute;
|
||||
import com.cloud.network.vpc.Vpc;
|
||||
import com.cloud.network.vpc.VpcGateway;
|
||||
import com.cloud.network.vpc.VpcManager;
|
||||
import com.cloud.network.vpc.VpcOffering;
|
||||
import com.cloud.network.vpc.VpcService;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.User;
|
||||
import com.cloud.utils.component.ComponentLocator;
|
||||
import com.cloud.utils.component.Manager;
|
||||
import com.cloud.vm.DomainRouterVO;
|
||||
import com.cloud.vpc.dao.MockVpcDaoImpl;
|
||||
|
||||
@Local(value = { VpcManager.class, VpcService.class })
|
||||
public class MockVpcManagerImpl implements VpcManager, Manager{
|
||||
MockVpcDaoImpl _vpcDao = ComponentLocator.inject(MockVpcDaoImpl.class);
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getVpcOffering(long)
|
||||
*/
|
||||
@Override
|
||||
public VpcOffering getVpcOffering(long vpcOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#createVpcOffering(java.lang.String, java.lang.String, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public Vpc getVpc(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getActiveVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public Vpc getActiveVpc(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getVpcNetworks(long)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends Network> getVpcNetworks(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getVpcOffSvcProvidersMap(long)
|
||||
*/
|
||||
@Override
|
||||
public Map<Service, Set<Provider>> getVpcOffSvcProvidersMap(long vpcOffId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#listVpcOfferings(java.lang.Long, java.lang.String, java.lang.String, java.util.List, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.Long, java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends VpcOffering> listVpcOfferings(Long id, String name, String displayText, List<String> supportedServicesStr, Boolean isDefault, String keyword, String state, Long startIndex, Long pageSizeVal) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#deleteVpcOffering(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVpcOffering(long offId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#updateVpcOffering(long, java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public VpcOffering updateVpcOffering(long vpcOffId, String vpcOfferingName, String displayText, String state) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#createVpc(long, long, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain) throws ResourceAllocationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#deleteVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVpc(long vpcId) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#updateVpc(long, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Vpc updateVpc(long vpcId, String vpcName, String displayText) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#listVpcs(java.lang.Long, java.lang.String, java.lang.String, java.util.List, java.lang.String, java.lang.Long, java.lang.String, java.lang.String, java.lang.Long, java.lang.String, java.lang.Long, java.lang.Long, java.lang.Long, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, java.util.Map, java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends Vpc> listVpcs(Long id, String vpcName, String displayText, List<String> supportedServicesStr, String cidr, Long vpcOffId, String state, String accountName, Long domainId, String keyword,
|
||||
Long startIndex, Long pageSizeVal, Long zoneId, Boolean isRecursive, Boolean listAll, Boolean restartRequired, Map<String, String> tags, Long projectId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#startVpc(long, boolean)
|
||||
*/
|
||||
@Override
|
||||
public boolean startVpc(long vpcId, boolean destroyOnFailure) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#shutdownVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean shutdownVpc(long vpcId) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#restartVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean restartVpc(long id) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getVpcPrivateGateway(long)
|
||||
*/
|
||||
@Override
|
||||
public PrivateGateway getVpcPrivateGateway(long id) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#createVpcPrivateGateway(long, java.lang.Long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long)
|
||||
*/
|
||||
@Override
|
||||
public PrivateGateway createVpcPrivateGateway(long vpcId, Long physicalNetworkId, String vlan, String ipAddress, String gateway, String netmask, long gatewayOwnerId) throws ResourceAllocationException,
|
||||
ConcurrentOperationException, InsufficientCapacityException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#applyVpcPrivateGateway(long, boolean)
|
||||
*/
|
||||
@Override
|
||||
public PrivateGateway applyVpcPrivateGateway(long gatewayId, boolean destroyOnFailure) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#deleteVpcPrivateGateway(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteVpcPrivateGateway(long gatewayId) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#listPrivateGateway(com.cloud.api.commands.ListPrivateGatewaysCmd)
|
||||
*/
|
||||
@Override
|
||||
public List<PrivateGateway> listPrivateGateway(ListPrivateGatewaysCmd listPrivateGatewaysCmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getStaticRoute(long)
|
||||
*/
|
||||
@Override
|
||||
public StaticRoute getStaticRoute(long routeId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#applyStaticRoutes(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean applyStaticRoutes(long vpcId) throws ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#revokeStaticRoute(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean revokeStaticRoute(long routeId) throws ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#createStaticRoute(long, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public StaticRoute createStaticRoute(long gatewayId, String cidr) throws NetworkRuleConflictException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#listStaticRoutes(com.cloud.api.commands.ListStaticRoutesCmd)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends StaticRoute> listStaticRoutes(ListStaticRoutesCmd cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#getVpcGateway(long)
|
||||
*/
|
||||
@Override
|
||||
public VpcGateway getVpcGateway(long id) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#associateIPToVpc(long, long)
|
||||
*/
|
||||
@Override
|
||||
public IpAddress associateIPToVpc(long ipId, long vpcId) throws ResourceAllocationException, ResourceUnavailableException, InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcService#updateVpcGuestNetwork(long, java.lang.String, java.lang.String, com.cloud.user.Account, com.cloud.user.User, java.lang.String, java.lang.Long, java.lang.Boolean)
|
||||
*/
|
||||
@Override
|
||||
public Network updateVpcGuestNetwork(long networkId, String name, String displayText, Account callerAccount, User callerUser, String domainSuffix, Long ntwkOffId, Boolean changeCidr) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#validateNtkwOffForVpc(long, java.lang.String, java.lang.String, com.cloud.user.Account, com.cloud.network.vpc.Vpc, java.lang.Long, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void validateNtkwOffForVpc(long ntwkOffId, String cidr, String networkDomain, Account networkOwner, Vpc vpc, Long networkId, String gateway) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#getVpcsForAccount(long)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends Vpc> getVpcsForAccount(long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#destroyVpc(com.cloud.network.vpc.Vpc)
|
||||
*/
|
||||
@Override
|
||||
public boolean destroyVpc(Vpc vpc) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#getVpcRouters(long)
|
||||
*/
|
||||
@Override
|
||||
public List<DomainRouterVO> getVpcRouters(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#vpcProviderEnabledInZone(long)
|
||||
*/
|
||||
@Override
|
||||
public boolean vpcProviderEnabledInZone(long zoneId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#getPrivateGatewayForVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public VpcGateway getPrivateGatewayForVpc(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#ipUsedInVpc(com.cloud.network.IpAddress)
|
||||
*/
|
||||
@Override
|
||||
public boolean ipUsedInVpc(IpAddress ip) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#unassignIPFromVpcNetwork(long, long)
|
||||
*/
|
||||
@Override
|
||||
public void unassignIPFromVpcNetwork(long ipId, long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#createVpcGuestNetwork(long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.cloud.user.Account, java.lang.Long, com.cloud.network.PhysicalNetwork, long, com.cloud.acl.ControlledEntity.ACLType, java.lang.Boolean, long, com.cloud.user.Account)
|
||||
*/
|
||||
@Override
|
||||
public Network createVpcGuestNetwork(long ntwkOffId, String name, String displayText, String gateway, String cidr, String vlanId, String networkDomain, Account owner, Long domainId, PhysicalNetwork pNtwk,
|
||||
long zoneId, ACLType aclType, Boolean subdomainAccess, long vpcId, Account caller) throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.VpcManager#assignSourceNatIpAddressToVpc(com.cloud.user.Account, com.cloud.network.vpc.Vpc)
|
||||
*/
|
||||
@Override
|
||||
public PublicIp assignSourceNatIpAddressToVpc(Account owner, Vpc vpc) throws InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#configure(java.lang.String, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#start()
|
||||
*/
|
||||
@Override
|
||||
public boolean start() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#stop()
|
||||
*/
|
||||
@Override
|
||||
public boolean stop() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.utils.component.Manager#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,289 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Before;
|
||||
|
||||
import com.cloud.configuration.dao.ConfigurationDaoImpl;
|
||||
import com.cloud.configuration.dao.ResourceCountDaoImpl;
|
||||
import com.cloud.dc.dao.VlanDaoImpl;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.network.dao.FirewallRulesDaoImpl;
|
||||
import com.cloud.network.dao.IPAddressDaoImpl;
|
||||
import com.cloud.network.dao.PhysicalNetworkDaoImpl;
|
||||
import com.cloud.network.element.VpcVirtualRouterElement;
|
||||
import com.cloud.network.vpc.Vpc;
|
||||
import com.cloud.network.vpc.VpcManager;
|
||||
import com.cloud.network.vpc.VpcManagerImpl;
|
||||
import com.cloud.network.vpc.Dao.PrivateIpDaoImpl;
|
||||
import com.cloud.network.vpc.Dao.StaticRouteDaoImpl;
|
||||
import com.cloud.network.vpc.Dao.VpcGatewayDaoImpl;
|
||||
import com.cloud.network.vpc.Dao.VpcOfferingDaoImpl;
|
||||
import com.cloud.server.ManagementService;
|
||||
import com.cloud.tags.dao.ResourceTagsDaoImpl;
|
||||
import com.cloud.user.AccountVO;
|
||||
import com.cloud.user.MockAccountManagerImpl;
|
||||
import com.cloud.user.dao.AccountDaoImpl;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
import com.cloud.utils.component.ComponentLocator;
|
||||
import com.cloud.utils.component.MockComponentLocator;
|
||||
import com.cloud.vm.dao.DomainRouterDaoImpl;
|
||||
import com.cloud.vpc.dao.MockNetworkDaoImpl;
|
||||
import com.cloud.vpc.dao.MockNetworkOfferingDaoImpl;
|
||||
import com.cloud.vpc.dao.MockNetworkOfferingServiceMapDaoImpl;
|
||||
import com.cloud.vpc.dao.MockNetworkServiceMapDaoImpl;
|
||||
import com.cloud.vpc.dao.MockVpcDaoImpl;
|
||||
import com.cloud.vpc.dao.MockVpcOfferingDaoImpl;
|
||||
import com.cloud.vpc.dao.MockVpcOfferingServiceMapDaoImpl;
|
||||
|
||||
public class VpcApiUnitTest extends TestCase{
|
||||
private static final Logger s_logger = Logger.getLogger(VpcApiUnitTest.class);
|
||||
MockComponentLocator _locator;
|
||||
VpcManager _vpcService;
|
||||
|
||||
@Override
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
_locator = new MockComponentLocator(ManagementService.Name);
|
||||
_locator.addDao("VpcDao", MockVpcDaoImpl.class);
|
||||
_locator.addDao("VpcOfferingDao", VpcOfferingDaoImpl.class);
|
||||
_locator.addDao("ConfigurationDao", ConfigurationDaoImpl.class);
|
||||
_locator.addDao("NetworkDao", MockNetworkDaoImpl.class);
|
||||
_locator.addDao("IPAddressDao", IPAddressDaoImpl.class);
|
||||
_locator.addDao("DomainRouterDao", DomainRouterDaoImpl.class);
|
||||
_locator.addDao("VpcGatewayDao", VpcGatewayDaoImpl.class);
|
||||
_locator.addDao("PrivateIpDao", PrivateIpDaoImpl.class);
|
||||
_locator.addDao("StaticRouteDao", StaticRouteDaoImpl.class);
|
||||
_locator.addDao("NetworkOfferingServiceMapDao", MockNetworkOfferingServiceMapDaoImpl.class);
|
||||
_locator.addDao("VpcOfferingServiceMapDao", MockVpcOfferingServiceMapDaoImpl.class);
|
||||
_locator.addDao("PhysicalNetworkDao", PhysicalNetworkDaoImpl.class);
|
||||
_locator.addDao("ResourceTagDao", ResourceTagsDaoImpl.class);
|
||||
_locator.addDao("FirewallRulesDao", FirewallRulesDaoImpl.class);
|
||||
_locator.addDao("VlanDao", VlanDaoImpl.class);
|
||||
_locator.addDao("AccountDao", AccountDaoImpl.class);
|
||||
_locator.addDao("ResourceCountDao", ResourceCountDaoImpl.class);
|
||||
_locator.addDao("NetworkOfferingDao", MockNetworkOfferingDaoImpl.class);
|
||||
_locator.addDao("NetworkServiceMapDao", MockNetworkServiceMapDaoImpl.class);
|
||||
_locator.addDao("VpcOfferingDao", MockVpcOfferingDaoImpl.class);
|
||||
|
||||
_locator.addManager("ConfigService", MockConfigurationManagerImpl.class);
|
||||
_locator.addManager("vpc manager", VpcManagerImpl.class);
|
||||
_locator.addManager("account manager", MockAccountManagerImpl.class);
|
||||
_locator.addManager("network manager", MockNetworkManagerImpl.class);
|
||||
_locator.addManager("Site2SiteVpnManager", MockSite2SiteVpnManagerImpl.class);
|
||||
_locator.addManager("ResourceLimitService", MockResourceLimitManagerImpl.class);
|
||||
|
||||
_locator.makeActive(null);
|
||||
|
||||
_vpcService = ComponentLocator.inject(VpcManagerImpl.class);
|
||||
}
|
||||
|
||||
public void test() {
|
||||
s_logger.debug("Starting test for VpcService interface");
|
||||
//Vpc service methods
|
||||
getActiveVpc();
|
||||
deleteVpc();
|
||||
|
||||
//Vpc manager methods
|
||||
validateNtwkOffForVpc();
|
||||
//destroyVpc();
|
||||
|
||||
}
|
||||
|
||||
protected void deleteVpc() {
|
||||
//delete existing offering
|
||||
boolean result = false;
|
||||
String msg = null;
|
||||
try {
|
||||
List<String> svcs = new ArrayList<String>();
|
||||
svcs.add(Service.SourceNat.getName());
|
||||
result = _vpcService.deleteVpc(1);
|
||||
} catch (Exception ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (result) {
|
||||
s_logger.debug("Delete vpc: Test passed, vpc is deleted");
|
||||
} else {
|
||||
s_logger.error("Delete vpc: TEST FAILED, vpc failed to delete " + msg);
|
||||
}
|
||||
}
|
||||
|
||||
//delete non-existing offering
|
||||
result = false;
|
||||
msg = null;
|
||||
try {
|
||||
List<String> svcs = new ArrayList<String>();
|
||||
svcs.add(Service.SourceNat.getName());
|
||||
result = _vpcService.deleteVpc(100);
|
||||
} catch (Exception ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Delete vpc: Test passed, non existing vpc failed to delete ");
|
||||
} else {
|
||||
s_logger.error("Delete vpc: TEST FAILED, true is returned when try to delete non existing vpc");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void getActiveVpc() {
|
||||
//test for active vpc
|
||||
boolean result = false;
|
||||
String msg = null;
|
||||
Vpc vpc = null;
|
||||
try {
|
||||
List<String> svcs = new ArrayList<String>();
|
||||
svcs.add(Service.SourceNat.getName());
|
||||
vpc = _vpcService.getActiveVpc(1);
|
||||
if (vpc != null) {
|
||||
result = true;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (result) {
|
||||
s_logger.debug("Get active Vpc: Test passed, active vpc is returned");
|
||||
} else {
|
||||
s_logger.error("Get active Vpc: TEST FAILED, active vpc is not returned " + msg);
|
||||
}
|
||||
}
|
||||
|
||||
//test for inactive vpc
|
||||
result = false;
|
||||
msg = null;
|
||||
vpc = null;
|
||||
try {
|
||||
List<String> svcs = new ArrayList<String>();
|
||||
svcs.add(Service.SourceNat.getName());
|
||||
vpc = _vpcService.getActiveVpc(2);
|
||||
if (vpc != null) {
|
||||
result = true;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Get active Vpc: Test passed, no vpc is returned");
|
||||
} else {
|
||||
s_logger.error("Get active Vpc: TEST FAILED, non active vpc is returned");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void destroyVpc() {
|
||||
try {
|
||||
_vpcService.destroyVpc(_vpcService.getVpc(1));
|
||||
} catch (Exception ex) {
|
||||
s_logger.error("Destroy VPC TEST FAILED due to exc ", ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected void validateNtwkOffForVpc() {
|
||||
//validate network offering
|
||||
//1) correct network offering
|
||||
boolean result = false;
|
||||
try {
|
||||
_vpcService.validateNtkwOffForVpc(1, "0.0.0.0", "111-", new AccountVO(), _vpcService.getVpc(1), 2L, "10.1.1.1");
|
||||
result = true;
|
||||
s_logger.debug("Validate network offering: Test passed: the offering is valid for vpc creation");
|
||||
} catch (Exception ex) {
|
||||
s_logger.error("Validate network offering: TEST FAILED due to exc ", ex);
|
||||
}
|
||||
|
||||
//2) invalid offering - source nat is not included
|
||||
result = false;
|
||||
String msg = null;
|
||||
try {
|
||||
_vpcService.validateNtkwOffForVpc(2, "0.0.0.0", "111-", new AccountVO(), _vpcService.getVpc(1), 2L, "10.1.1.1");
|
||||
result = true;
|
||||
} catch (InvalidParameterValueException ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Validate network offering: Test passed: " + msg);
|
||||
} else {
|
||||
s_logger.error("Validate network offering: TEST FAILED, can't use network offering without SourceNat service");
|
||||
}
|
||||
}
|
||||
|
||||
//3) invalid offering - conserve mode is off
|
||||
result = false;
|
||||
msg = null;
|
||||
try {
|
||||
_vpcService.validateNtkwOffForVpc(3, "0.0.0.0", "111-", new AccountVO(), _vpcService.getVpc(1), 2L, "10.1.1.1");
|
||||
result = true;
|
||||
} catch (InvalidParameterValueException ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Validate network offering: Test passed: " + msg);
|
||||
} else {
|
||||
s_logger.error("Validate network offering: TEST FAILED, can't use network offering without conserve mode = true");
|
||||
}
|
||||
}
|
||||
|
||||
//4) invalid offering - guest type shared
|
||||
result = false;
|
||||
try {
|
||||
_vpcService.validateNtkwOffForVpc(4, "0.0.0.0", "111-", new AccountVO(), _vpcService.getVpc(1), 2L, "10.1.1.1");
|
||||
result = true;
|
||||
} catch (InvalidParameterValueException ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Validate network offering: Test passed: " + msg);
|
||||
} else {
|
||||
s_logger.error("Validate network offering: TEST FAILED, can't use network offering with guest type = Shared");
|
||||
}
|
||||
}
|
||||
|
||||
//5) Invalid offering - no redundant router support
|
||||
result = false;
|
||||
try {
|
||||
_vpcService.validateNtkwOffForVpc(5, "0.0.0.0", "111-", new AccountVO(), _vpcService.getVpc(1), 2L, "10.1.1.1");
|
||||
result = true;
|
||||
} catch (InvalidParameterValueException ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Validate network offering: Test passed: " + msg);
|
||||
} else {
|
||||
s_logger.error("TEST FAILED, can't use network offering with guest type = Shared");
|
||||
}
|
||||
}
|
||||
|
||||
//6) Only one network in the VPC can support LB service - negative scenario
|
||||
result = false;
|
||||
try {
|
||||
_vpcService.validateNtkwOffForVpc(6, "0.0.0.0", "111-", new AccountVO(), _vpcService.getVpc(1), 2L, "10.1.1.1");
|
||||
result = true;
|
||||
s_logger.debug("Validate network offering: Test passed: the offering is valid for vpc creation");
|
||||
} catch (InvalidParameterValueException ex) {
|
||||
msg = ex.getMessage();
|
||||
} finally {
|
||||
if (!result) {
|
||||
s_logger.debug("Test passed: " + msg);
|
||||
} else {
|
||||
s_logger.error("Validate network offering: TEST FAILED, can't use network offering with guest type = Shared");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import com.cloud.configuration.ConfigurationVO;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
||||
@Local(value={ConfigurationDao.class})
|
||||
public class MockConfigurationDaoImpl extends GenericDaoBase<ConfigurationVO, String> implements ConfigurationDao{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#getConfiguration(java.lang.String, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getConfiguration(String instance, Map<String, ? extends Object> params) {
|
||||
return new HashMap<String, String>();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#getConfiguration(java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getConfiguration(Map<String, ? extends Object> params) {
|
||||
return new HashMap<String, String>();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#getConfiguration()
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getConfiguration() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#update(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean update(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#getValue(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getValue(String name) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#getValueAndInitIfNotExist(java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getValueAndInitIfNotExist(String name, String category, String initValue) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#isPremium()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPremium() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#findByName(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ConfigurationVO findByName(String name) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.configuration.dao.ConfigurationDao#update(java.lang.String, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean update(String name, String category, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,341 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import com.cloud.network.Network.GuestType;
|
||||
import com.cloud.network.NetworkAccountVO;
|
||||
import com.cloud.network.NetworkVO;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
import com.cloud.network.dao.NetworkDao;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
|
||||
@Local(value = NetworkDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockNetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements NetworkDao{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByOwner(long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByOwner(long ownerId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listBy(long, long, long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listBy(long accountId, long offeringId, long dataCenterId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listBy(long, long, java.lang.String, boolean)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listBy(long accountId, long dataCenterId, String cidr, boolean skipVpc) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByZoneAndGuestType(long, long, com.cloud.network.Network.GuestType, java.lang.Boolean)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByZoneAndGuestType(long accountId, long dataCenterId, GuestType type, Boolean isSystem) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#persist(com.cloud.network.NetworkVO, boolean, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public NetworkVO persist(NetworkVO network, boolean gc, Map<String, String> serviceProviderMap) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#createSearchBuilderForAccount()
|
||||
*/
|
||||
@Override
|
||||
public SearchBuilder<NetworkAccountVO> createSearchBuilderForAccount() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#getNetworksForOffering(long, long, long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> getNetworksForOffering(long offeringId, long dataCenterId, long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#getNextAvailableMacAddress(long)
|
||||
*/
|
||||
@Override
|
||||
public String getNextAvailableMacAddress(long networkConfigId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listBy(long, long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listBy(long accountId, long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#countByZoneAndUri(long, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public long countByZoneAndUri(long zoneId, String broadcastUri) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#countByZoneUriAndGuestType(long, java.lang.String, com.cloud.network.Network.GuestType)
|
||||
*/
|
||||
@Override
|
||||
public long countByZoneUriAndGuestType(long zoneId, String broadcastUri, GuestType guestType) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByZone(long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByZone(long zoneId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#changeActiveNicsBy(long, int)
|
||||
*/
|
||||
@Override
|
||||
public void changeActiveNicsBy(long networkId, int nicsCount) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#getActiveNicsIn(long)
|
||||
*/
|
||||
@Override
|
||||
public int getActiveNicsIn(long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#findNetworksToGarbageCollect()
|
||||
*/
|
||||
@Override
|
||||
public List<Long> findNetworksToGarbageCollect() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#clearCheckForGc(long)
|
||||
*/
|
||||
@Override
|
||||
public void clearCheckForGc(long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByZoneSecurityGroup(java.lang.Long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByZoneSecurityGroup(Long zoneId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#addDomainToNetwork(long, long, java.lang.Boolean)
|
||||
*/
|
||||
@Override
|
||||
public void addDomainToNetwork(long networkId, long domainId, Boolean subdomainAccess) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByPhysicalNetwork(long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByPhysicalNetwork(long physicalNetworkId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listSecurityGroupEnabledNetworks()
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listSecurityGroupEnabledNetworks() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByPhysicalNetworkTrafficType(long, com.cloud.network.Networks.TrafficType)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByPhysicalNetworkTrafficType(long physicalNetworkId, TrafficType trafficType) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listBy(long, long, com.cloud.network.Network.GuestType, com.cloud.network.Networks.TrafficType)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listBy(long accountId, long dataCenterId, GuestType type, TrafficType trafficType) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByPhysicalNetworkAndProvider(long, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByPhysicalNetworkAndProvider(long physicalNetworkId, String providerName) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#persistNetworkServiceProviders(long, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public void persistNetworkServiceProviders(long networkId, Map<String, String> serviceProviderMap) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#update(java.lang.Long, com.cloud.network.NetworkVO, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public boolean update(Long networkId, NetworkVO network, Map<String, String> serviceProviderMap) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByZoneAndTrafficType(long, com.cloud.network.Networks.TrafficType)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByZoneAndTrafficType(long zoneId, TrafficType trafficType) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#setCheckForGc(long)
|
||||
*/
|
||||
@Override
|
||||
public void setCheckForGc(long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#getNetworkCountByNetworkOffId(long)
|
||||
*/
|
||||
@Override
|
||||
public int getNetworkCountByNetworkOffId(long networkOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#countNetworksUserCanCreate(long)
|
||||
*/
|
||||
@Override
|
||||
public long countNetworksUserCanCreate(long ownerId) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listSourceNATEnabledNetworks(long, long, com.cloud.network.Network.GuestType)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listSourceNATEnabledNetworks(long accountId, long dataCenterId, GuestType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#getNetworkCountByVpcId(long)
|
||||
*/
|
||||
@Override
|
||||
public int getNetworkCountByVpcId(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#listByVpc(long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkVO> listByVpc(long vpcId) {
|
||||
List<NetworkVO> networks = new ArrayList<NetworkVO>();
|
||||
networks.add(new NetworkVO());
|
||||
return networks;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#getPrivateNetwork(java.lang.String, java.lang.String, long, long)
|
||||
*/
|
||||
@Override
|
||||
public NetworkVO getPrivateNetwork(String broadcastUri, String cidr, long accountId, long zoneId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkDao#countVpcNetworks(long)
|
||||
*/
|
||||
@Override
|
||||
public long countVpcNetworks(long vpcId) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.Network.GuestType;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offering.NetworkOffering.Availability;
|
||||
import com.cloud.offering.NetworkOffering.State;
|
||||
import com.cloud.offerings.NetworkOfferingVO;
|
||||
import com.cloud.offerings.dao.NetworkOfferingDao;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
||||
@Local(value = NetworkOfferingDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockNetworkOfferingDaoImpl extends GenericDaoBase<NetworkOfferingVO, Long> implements NetworkOfferingDao {
|
||||
private static final Logger s_logger = Logger.getLogger(MockNetworkOfferingDaoImpl.class);
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.offerings.dao.NetworkOfferingDao#findByUniqueName(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public NetworkOfferingVO findByUniqueName(String uniqueName) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.offerings.dao.NetworkOfferingDao#persistDefaultNetworkOffering(com.cloud.offerings.NetworkOfferingVO)
|
||||
*/
|
||||
@Override
|
||||
public NetworkOfferingVO persistDefaultNetworkOffering(NetworkOfferingVO offering) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.offerings.dao.NetworkOfferingDao#listSystemNetworkOfferings()
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkOfferingVO> listSystemNetworkOfferings() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.offerings.dao.NetworkOfferingDao#listByAvailability(com.cloud.offering.NetworkOffering.Availability, boolean)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkOfferingVO> listByAvailability(Availability availability, boolean isSystem) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.offerings.dao.NetworkOfferingDao#getOfferingIdsToUpgradeFrom(com.cloud.offering.NetworkOffering)
|
||||
*/
|
||||
@Override
|
||||
public List<Long> getOfferingIdsToUpgradeFrom(NetworkOffering originalOffering) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.offerings.dao.NetworkOfferingDao#listByTrafficTypeGuestTypeAndState(com.cloud.offering.NetworkOffering.State, com.cloud.network.Networks.TrafficType, com.cloud.network.Network.GuestType)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkOfferingVO> listByTrafficTypeGuestTypeAndState(State state, TrafficType trafficType, GuestType type) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NetworkOfferingVO findById(Long id) {
|
||||
NetworkOfferingVO vo = null;
|
||||
if (id.longValue() == 1) {
|
||||
//network offering valid for vpc
|
||||
vo = new NetworkOfferingVO("vpc", "vpc", TrafficType.Guest, false, true, null, null, false,
|
||||
Availability.Optional, null, Network.GuestType.Isolated, false, false);
|
||||
} else if (id.longValue() == 2) {
|
||||
//invalid offering - source nat is not included
|
||||
vo = new NetworkOfferingVO("vpc", "vpc", TrafficType.Guest, false, true, null, null, false,
|
||||
Availability.Optional, null, Network.GuestType.Isolated, false, false);
|
||||
} else if (id.longValue() == 3) {
|
||||
//network offering invalid for vpc (conserve mode off)
|
||||
vo = new NetworkOfferingVO("non vpc", "non vpc", TrafficType.Guest, false, true, null, null, false,
|
||||
Availability.Optional, null, Network.GuestType.Isolated, true, false);
|
||||
} else if (id.longValue() == 4) {
|
||||
//network offering invalid for vpc (Shared)
|
||||
vo = new NetworkOfferingVO("non vpc", "non vpc", TrafficType.Guest, false, true, null, null, false,
|
||||
Availability.Optional, null, Network.GuestType.Shared, false, false);
|
||||
} else if (id.longValue() == 5) {
|
||||
//network offering invalid for vpc (has redundant router)
|
||||
vo = new NetworkOfferingVO("vpc", "vpc", TrafficType.Guest, false, true, null, null, false,
|
||||
Availability.Optional, null, Network.GuestType.Isolated, false, false);
|
||||
vo.setRedundantRouter(true);
|
||||
} else if (id.longValue() == 6) {
|
||||
//network offering invalid for vpc (has lb service)
|
||||
vo = new NetworkOfferingVO("vpc", "vpc", TrafficType.Guest, false, true, null, null, false,
|
||||
Availability.Optional, null, Network.GuestType.Isolated, false, false);
|
||||
}
|
||||
|
||||
if (vo != null) {
|
||||
vo = setId(vo, id);
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
private NetworkOfferingVO setId(NetworkOfferingVO vo, long id) {
|
||||
NetworkOfferingVO voToReturn = vo;
|
||||
Class<?> c = voToReturn.getClass();
|
||||
try {
|
||||
Field f = c.getDeclaredField("id");
|
||||
f.setAccessible(true);
|
||||
f.setLong(voToReturn, id);
|
||||
} catch (NoSuchFieldException ex) {
|
||||
s_logger.warn(ex);
|
||||
return null;
|
||||
} catch (IllegalAccessException ex) {
|
||||
s_logger.warn(ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
return voToReturn;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
|
||||
import com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl;
|
||||
import com.cloud.utils.db.DB;
|
||||
|
||||
@Local(value = NetworkOfferingServiceMapDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockNetworkOfferingServiceMapDaoImpl extends NetworkOfferingServiceMapDaoImpl{
|
||||
|
||||
@Override
|
||||
public boolean areServicesSupportedByNetworkOffering(long networkOfferingId, Service... services) {
|
||||
if (services.length > 0 && services[0] == Service.SourceNat && networkOfferingId != 2) {
|
||||
return true;
|
||||
} else if (services.length > 0 && services[0] == Service.Lb && networkOfferingId == 6) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import com.cloud.network.Network.Provider;
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.network.NetworkServiceMapVO;
|
||||
import com.cloud.network.dao.NetworkServiceMapDao;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
||||
@Local(value = NetworkServiceMapDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockNetworkServiceMapDaoImpl extends GenericDaoBase<NetworkServiceMapVO, Long> implements NetworkServiceMapDao{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#areServicesSupportedInNetwork(long, com.cloud.network.Network.Service[])
|
||||
*/
|
||||
@Override
|
||||
public boolean areServicesSupportedInNetwork(long networkId, Service... services) {
|
||||
if (services.length > 0 && services[0] == Service.Lb) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#canProviderSupportServiceInNetwork(long, com.cloud.network.Network.Service, com.cloud.network.Network.Provider)
|
||||
*/
|
||||
@Override
|
||||
public boolean canProviderSupportServiceInNetwork(long networkId, Service service, Provider provider) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#getServicesInNetwork(long)
|
||||
*/
|
||||
@Override
|
||||
public List<NetworkServiceMapVO> getServicesInNetwork(long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#getProviderForServiceInNetwork(long, com.cloud.network.Network.Service)
|
||||
*/
|
||||
@Override
|
||||
public String getProviderForServiceInNetwork(long networkid, Service service) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#deleteByNetworkId(long)
|
||||
*/
|
||||
@Override
|
||||
public void deleteByNetworkId(long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#getDistinctProviders(long)
|
||||
*/
|
||||
@Override
|
||||
public List<String> getDistinctProviders(long networkId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.dao.NetworkServiceMapDao#isProviderForNetwork(long, com.cloud.network.Network.Provider)
|
||||
*/
|
||||
@Override
|
||||
public String isProviderForNetwork(long networkId, Provider provider) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.network.vpc.Vpc;
|
||||
import com.cloud.network.vpc.Vpc.State;
|
||||
import com.cloud.network.vpc.VpcVO;
|
||||
import com.cloud.network.vpc.Dao.VpcDao;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
||||
@Local(value = VpcDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockVpcDaoImpl extends GenericDaoBase<VpcVO, Long> implements VpcDao{
|
||||
private static final Logger s_logger = Logger.getLogger(MockNetworkOfferingDaoImpl.class);
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcDao#getVpcCountByOfferingId(long)
|
||||
*/
|
||||
@Override
|
||||
public int getVpcCountByOfferingId(long offId) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcDao#getActiveVpcById(long)
|
||||
*/
|
||||
@Override
|
||||
public Vpc getActiveVpcById(long vpcId) {
|
||||
Vpc vpc = findById(vpcId);
|
||||
if (vpc != null && vpc.getState() == Vpc.State.Enabled) {
|
||||
return vpc;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcDao#listByAccountId(long)
|
||||
*/
|
||||
@Override
|
||||
public List<? extends Vpc> listByAccountId(long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcDao#listInactiveVpcs()
|
||||
*/
|
||||
@Override
|
||||
public List<VpcVO> listInactiveVpcs() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcDao#countByAccountId(long)
|
||||
*/
|
||||
@Override
|
||||
public long countByAccountId(long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VpcVO findById(Long id) {
|
||||
VpcVO vo = null;
|
||||
if (id.longValue() == 1) {
|
||||
vo = new VpcVO(1, "new vpc", "new vpc", 1,1 , 1, "0.0.0.0/0", "vpc domain");
|
||||
} else if (id.longValue() == 2) {
|
||||
vo = new VpcVO(1, "new vpc", "new vpc", 1,1 , 1, "0.0.0.0/0", "vpc domain");
|
||||
vo.setState(State.Inactive);
|
||||
}
|
||||
|
||||
vo = setId(vo, id);
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
private VpcVO setId(VpcVO vo, long id) {
|
||||
VpcVO voToReturn = vo;
|
||||
Class<?> c = voToReturn.getClass();
|
||||
try {
|
||||
Field f = c.getDeclaredField("id");
|
||||
f.setAccessible(true);
|
||||
f.setLong(voToReturn, id);
|
||||
} catch (NoSuchFieldException ex) {
|
||||
s_logger.warn(ex);
|
||||
return null;
|
||||
} catch (IllegalAccessException ex) {
|
||||
s_logger.warn(ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
return voToReturn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Long id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(Long id, VpcVO vo) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import com.cloud.network.vpc.VpcOfferingVO;
|
||||
import com.cloud.network.vpc.Dao.VpcOfferingDao;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
||||
@Local(value = VpcOfferingDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockVpcOfferingDaoImpl extends GenericDaoBase<VpcOfferingVO, Long> implements VpcOfferingDao{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcOfferingDao#findByUniqueName(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public VpcOfferingVO findByUniqueName(String uniqueName) {
|
||||
return new VpcOfferingVO();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VpcOfferingVO persist(VpcOfferingVO vo) {
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.network.vpc.VpcOfferingServiceMapVO;
|
||||
import com.cloud.network.vpc.Dao.VpcOfferingServiceMapDao;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
|
||||
@Local(value = VpcOfferingServiceMapDao.class)
|
||||
@DB(txn = false)
|
||||
public class MockVpcOfferingServiceMapDaoImpl extends GenericDaoBase<VpcOfferingServiceMapVO, Long> implements VpcOfferingServiceMapDao{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcOfferingServiceMapDao#listByVpcOffId(long)
|
||||
*/
|
||||
@Override
|
||||
public List<VpcOfferingServiceMapVO> listByVpcOffId(long vpcOffId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcOfferingServiceMapDao#areServicesSupportedByNetworkOffering(long, com.cloud.network.Network.Service[])
|
||||
*/
|
||||
@Override
|
||||
public boolean areServicesSupportedByNetworkOffering(long networkOfferingId, Service[] services) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcOfferingServiceMapDao#listServicesForVpcOffering(long)
|
||||
*/
|
||||
@Override
|
||||
public List<String> listServicesForVpcOffering(long vpcOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.vpc.Dao.VpcOfferingServiceMapDao#findByServiceProviderAndOfferingId(java.lang.String, java.lang.String, long)
|
||||
*/
|
||||
@Override
|
||||
public VpcOfferingServiceMapVO findByServiceProviderAndOfferingId(String service, String provider, long vpcOfferingId) {
|
||||
return new VpcOfferingServiceMapVO();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VpcOfferingServiceMapVO persist (VpcOfferingServiceMapVO vo) {
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package com.cloud.vpc.dao;
|
||||
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.element.VpcVirtualRouterElement;
|
||||
import com.cloud.network.vpc.Vpc;
|
||||
|
||||
public class MockVpcVirtualRouterElement extends VpcVirtualRouterElement{
|
||||
@Override
|
||||
public boolean shutdownVpc(Vpc vpc) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -347,9 +347,8 @@ UPDATE `cloud`.`data_center` SET `is_local_storage_enabled` = IF ((SELECT `value
|
|||
|
||||
ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `max_data_volumes_limit` int unsigned DEFAULT 6 COMMENT 'Max. data volumes per VM supported by hypervisor';
|
||||
|
||||
SET SQL_SAFE_UPDATES=0;
|
||||
UPDATE `cloud`.`hypervisor_capabilities` SET `max_data_volumes_limit`=13 WHERE `hypervisor_type`='XenServer' AND (`hypervisor_version`='6.0' OR `hypervisor_version`='6.0.2');
|
||||
SET SQL_SAFE_UPDATES=1;
|
||||
|
||||
UPDATE `cloud`.`configuration` SET description='In second, timeout for creating volume from snapshot' WHERE name='create.volume.from.snapshot.wait';
|
||||
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Account Defaults', 'DEFAULT', 'management-server', 'max.account.vpcs', '20', 'The default maximum number of vpcs that can be created for an account');
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type,
|
|||
VALUES (7, 'centos53-x64', 'CentOS 5.3(64-bit) no GUI (vSphere)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://download.cloud.com/releases/2.2.0/CentOS5.3-x86_64.ova', 'f6f881b7f2292948d8494db837fe0f47', 0, 'CentOS 5.3(64-bit) no GUI (vSphere)', 'OVA', 12, 1, 1, 'VMware', 1);
|
||||
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
|
||||
VALUES (8, 'routing-8', 'SystemVM Template (vSphere)', 0, now(), 'SYSTEM', 0, 32, 1, 'http://download.cloud.com/templates/acton/acton-systemvm-02062012.ova', 'e72b21c9541d005600297cb92d241434', 0, 'SystemVM Template (vSphere)', 'OVA', 15, 0, 1, 'VMware');
|
||||
VALUES (8, 'routing-8', 'SystemVM Template (vSphere)', 0, now(), 'SYSTEM', 0, 32, 1, 'http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova', '7137e453f950079ea2ba6feaafd939e8', 0, 'SystemVM Template (vSphere)', 'OVA', 15, 0, 1, 'VMware');
|
||||
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
|
||||
VALUES (9, 'routing-9', 'SystemVM Template (HyperV)', 0, now(), 'SYSTEM', 0, 32, 1, 'http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2', 'f613f38c96bf039f2e5cbf92fa8ad4f8', 0, 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv');
|
||||
|
|
|
|||
|
|
@ -3580,7 +3580,7 @@ CREATE TABLE `template_host_ref` (
|
|||
|
||||
LOCK TABLES `template_host_ref` WRITE;
|
||||
/*!40000 ALTER TABLE `template_host_ref` DISABLE KEYS */;
|
||||
INSERT INTO `template_host_ref` VALUES (1,1,9,'2012-07-19 22:20:20','2012-07-19 22:20:20',NULL,100,0,0,'DOWNLOADED',NULL,NULL,'template/tmpl/1/9/','http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2',0,0),(2,1,8,'2012-07-19 22:20:20','2012-07-19 22:20:20',NULL,100,0,0,'DOWNLOADED',NULL,NULL,'template/tmpl/1/8/','http://download.cloud.com/templates/acton/acton-systemvm-02062012.ova',0,0),(3,1,3,'2012-07-19 22:20:20','2012-07-19 22:30:12',NULL,100,757071872,757071872,'DOWNLOADED',NULL,NULL,'template/tmpl/1/3//adb6033f-c806-4884-938a-1ec398fc5ff0.qcow2','http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2',0,0),(4,1,1,'2012-07-19 22:20:20','2012-07-19 22:30:12',NULL,100,565240320,565240320,'DOWNLOADED',NULL,NULL,'template/tmpl/1/1//a349b09e-4f8a-436a-bf3e-fc70e79c04cc.vhd','http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2',0,0),(5,1,4,'2012-07-19 22:30:12','2012-07-19 22:30:12',NULL,0,0,0,'NOT_DOWNLOADED',NULL,NULL,NULL,'http://download.cloud.com/releases/2.2.0/eec2209b-9875-3c8d-92be-c001bd8a0faf.qcow2.bz2',0,0),(6,1,5,'2012-07-19 22:30:12','2012-07-19 22:47:50','ebdb6d62-aa39-4d43-b6c4-dc9740d5e31e',100,21474836480,1758786048,'DOWNLOADED','Install completed successfully at 7/19/12 4:39 PM','/mnt/SecStorage/60b4c411-98da-336f-a7f0-84a3e1c4c218/template/tmpl/1/5/dnld1522056867875408327tmp_','template/tmpl//1/5//facf39f0-4874-3086-85af-bafbed76a2c0.vhd','http://download.cloud.com/templates/builtin/centos56-x86_64.vhd.bz2',0,0),(7,1,7,'2012-07-19 22:30:12','2012-07-19 22:30:12',NULL,0,0,0,'NOT_DOWNLOADED',NULL,NULL,NULL,'http://download.cloud.com/releases/2.2.0/CentOS5.3-x86_64.ova',0,0);
|
||||
INSERT INTO `template_host_ref` VALUES (1,1,9,'2012-07-19 22:20:20','2012-07-19 22:20:20',NULL,100,0,0,'DOWNLOADED',NULL,NULL,'template/tmpl/1/9/','http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2',0,0),(2,1,8,'2012-07-19 22:20:20','2012-07-19 22:20:20',NULL,100,0,0,'DOWNLOADED',NULL,NULL,'template/tmpl/1/8/','http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova',0,0),(3,1,3,'2012-07-19 22:20:20','2012-07-19 22:30:12',NULL,100,757071872,757071872,'DOWNLOADED',NULL,NULL,'template/tmpl/1/3//adb6033f-c806-4884-938a-1ec398fc5ff0.qcow2','http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2',0,0),(4,1,1,'2012-07-19 22:20:20','2012-07-19 22:30:12',NULL,100,565240320,565240320,'DOWNLOADED',NULL,NULL,'template/tmpl/1/1//a349b09e-4f8a-436a-bf3e-fc70e79c04cc.vhd','http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2',0,0),(5,1,4,'2012-07-19 22:30:12','2012-07-19 22:30:12',NULL,0,0,0,'NOT_DOWNLOADED',NULL,NULL,NULL,'http://download.cloud.com/releases/2.2.0/eec2209b-9875-3c8d-92be-c001bd8a0faf.qcow2.bz2',0,0),(6,1,5,'2012-07-19 22:30:12','2012-07-19 22:47:50','ebdb6d62-aa39-4d43-b6c4-dc9740d5e31e',100,21474836480,1758786048,'DOWNLOADED','Install completed successfully at 7/19/12 4:39 PM','/mnt/SecStorage/60b4c411-98da-336f-a7f0-84a3e1c4c218/template/tmpl/1/5/dnld1522056867875408327tmp_','template/tmpl//1/5//facf39f0-4874-3086-85af-bafbed76a2c0.vhd','http://download.cloud.com/templates/builtin/centos56-x86_64.vhd.bz2',0,0),(7,1,7,'2012-07-19 22:30:12','2012-07-19 22:30:12',NULL,0,0,0,'NOT_DOWNLOADED',NULL,NULL,NULL,'http://download.cloud.com/releases/2.2.0/CentOS5.3-x86_64.ova',0,0);
|
||||
/*!40000 ALTER TABLE `template_host_ref` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
|
@ -4210,7 +4210,7 @@ CREATE TABLE `vm_template` (
|
|||
|
||||
LOCK TABLES `vm_template` WRITE;
|
||||
/*!40000 ALTER TABLE `vm_template` DISABLE KEYS */;
|
||||
INSERT INTO `vm_template` VALUES (1,'routing-1','SystemVM Template (XenServer)','ea041c86-a510-4a66-af6d-94ac2261c075',0,0,'SYSTEM',0,64,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2','VHD','2012-07-19 15:19:39',NULL,1,'f613f38c96bf039f2e5cbf92fa8ad4f8','SystemVM Template (XenServer)',0,0,15,1,0,1,0,'XenServer',NULL,NULL,0),(2,'centos53-x86_64','CentOS 5.3(64-bit) no GUI (XenServer)','77783498-a5f3-411f-be92-8965d06cc968',1,1,'BUILTIN',0,64,'http://download.cloud.com/templates/builtin/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2','VHD','2012-07-19 15:19:39','2012-07-19 15:19:39',1,'b63d854a9560c013142567bbae8d98cf','CentOS 5.3(64-bit) no GUI (XenServer)',0,0,12,1,0,1,1,'XenServer',NULL,NULL,0),(3,'routing-3','SystemVM Template (KVM)','af37c452-9d00-4f48-80f1-1d4bd773c37e',0,0,'SYSTEM',0,64,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2','QCOW2','2012-07-19 15:19:39',NULL,1,'2755de1f9ef2ce4d6f2bee2efbb4da92','SystemVM Template (KVM)',0,0,15,1,0,1,0,'KVM',NULL,NULL,0),(4,'centos55-x86_64','CentOS 5.5(64-bit) no GUI (KVM)','1f3f38ea-e0ee-4f21-92ab-27ca5949538e',1,1,'BUILTIN',0,64,'http://download.cloud.com/releases/2.2.0/eec2209b-9875-3c8d-92be-c001bd8a0faf.qcow2.bz2','QCOW2','2012-07-19 15:19:39',NULL,1,'ed0e788280ff2912ea40f7f91ca7a249','CentOS 5.5(64-bit) no GUI (KVM)',0,0,112,1,0,1,1,'KVM',NULL,NULL,0),(5,'centos56-x86_64-xen','CentOS 5.6(64-bit) no GUI (XenServer)','14a118d5-5803-48c1-82c9-85882d1ff97c',1,1,'BUILTIN',0,64,'http://download.cloud.com/templates/builtin/centos56-x86_64.vhd.bz2','VHD','2012-07-19 15:19:39',NULL,1,'905cec879afd9c9d22ecc8036131a180','CentOS 5.6(64-bit) no GUI (XenServer)',0,0,12,1,0,1,1,'XenServer',NULL,NULL,0),(7,'centos53-x64','CentOS 5.3(64-bit) no GUI (vSphere)','4801c38d-16f1-494c-ad95-2f7c89bac8e2',1,1,'BUILTIN',0,64,'http://download.cloud.com/releases/2.2.0/CentOS5.3-x86_64.ova','OVA','2012-07-19 15:19:39',NULL,1,'f6f881b7f2292948d8494db837fe0f47','CentOS 5.3(64-bit) no GUI (vSphere)',0,0,12,1,0,1,1,'VMware',NULL,NULL,0),(8,'routing-8','SystemVM Template (vSphere)','5a4a9ab4-7cdd-4d4a-b3ff-b79ae165df96',0,0,'SYSTEM',0,32,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.ova','OVA','2012-07-19 15:19:39',NULL,1,'e72b21c9541d005600297cb92d241434','SystemVM Template (vSphere)',0,0,15,1,0,1,0,'VMware',NULL,NULL,0),(9,'routing-9','SystemVM Template (HyperV)','35d9360e-1951-4a94-8acc-f759e338aa1a',0,0,'SYSTEM',0,32,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2','VHD','2012-07-19 15:19:39',NULL,1,'f613f38c96bf039f2e5cbf92fa8ad4f8','SystemVM Template (HyperV)',0,0,15,1,0,1,0,'Hyperv',NULL,NULL,0),(200,'xs-tools.iso','xs-tools.iso','f722a941-0c0f-4a59-b060-41de29c4e4f7',1,1,'PERHOST',1,64,NULL,'ISO','2012-07-19 22:20:10',NULL,1,NULL,'xen-pv-drv-iso',0,0,1,0,0,0,1,'XenServer',NULL,NULL,0),(201,'vmware-tools.iso','vmware-tools.iso','b6ecb286-861a-4c76-9978-410ba21fbbdf',1,1,'PERHOST',1,64,NULL,'ISO','2012-07-19 22:20:10',NULL,1,NULL,'VMware Tools Installer ISO',0,0,1,0,0,0,1,'VMware',NULL,NULL,0);
|
||||
INSERT INTO `vm_template` VALUES (1,'routing-1','SystemVM Template (XenServer)','ea041c86-a510-4a66-af6d-94ac2261c075',0,0,'SYSTEM',0,64,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2','VHD','2012-07-19 15:19:39',NULL,1,'f613f38c96bf039f2e5cbf92fa8ad4f8','SystemVM Template (XenServer)',0,0,15,1,0,1,0,'XenServer',NULL,NULL,0),(2,'centos53-x86_64','CentOS 5.3(64-bit) no GUI (XenServer)','77783498-a5f3-411f-be92-8965d06cc968',1,1,'BUILTIN',0,64,'http://download.cloud.com/templates/builtin/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2','VHD','2012-07-19 15:19:39','2012-07-19 15:19:39',1,'b63d854a9560c013142567bbae8d98cf','CentOS 5.3(64-bit) no GUI (XenServer)',0,0,12,1,0,1,1,'XenServer',NULL,NULL,0),(3,'routing-3','SystemVM Template (KVM)','af37c452-9d00-4f48-80f1-1d4bd773c37e',0,0,'SYSTEM',0,64,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2','QCOW2','2012-07-19 15:19:39',NULL,1,'2755de1f9ef2ce4d6f2bee2efbb4da92','SystemVM Template (KVM)',0,0,15,1,0,1,0,'KVM',NULL,NULL,0),(4,'centos55-x86_64','CentOS 5.5(64-bit) no GUI (KVM)','1f3f38ea-e0ee-4f21-92ab-27ca5949538e',1,1,'BUILTIN',0,64,'http://download.cloud.com/releases/2.2.0/eec2209b-9875-3c8d-92be-c001bd8a0faf.qcow2.bz2','QCOW2','2012-07-19 15:19:39',NULL,1,'ed0e788280ff2912ea40f7f91ca7a249','CentOS 5.5(64-bit) no GUI (KVM)',0,0,112,1,0,1,1,'KVM',NULL,NULL,0),(5,'centos56-x86_64-xen','CentOS 5.6(64-bit) no GUI (XenServer)','14a118d5-5803-48c1-82c9-85882d1ff97c',1,1,'BUILTIN',0,64,'http://download.cloud.com/templates/builtin/centos56-x86_64.vhd.bz2','VHD','2012-07-19 15:19:39',NULL,1,'905cec879afd9c9d22ecc8036131a180','CentOS 5.6(64-bit) no GUI (XenServer)',0,0,12,1,0,1,1,'XenServer',NULL,NULL,0),(7,'centos53-x64','CentOS 5.3(64-bit) no GUI (vSphere)','4801c38d-16f1-494c-ad95-2f7c89bac8e2',1,1,'BUILTIN',0,64,'http://download.cloud.com/releases/2.2.0/CentOS5.3-x86_64.ova','OVA','2012-07-19 15:19:39',NULL,1,'f6f881b7f2292948d8494db837fe0f47','CentOS 5.3(64-bit) no GUI (vSphere)',0,0,12,1,0,1,1,'VMware',NULL,NULL,0),(8,'routing-8','SystemVM Template (vSphere)','5a4a9ab4-7cdd-4d4a-b3ff-b79ae165df96',0,0,'SYSTEM',0,32,'http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova','OVA','2012-07-19 15:19:39',NULL,1,'7137e453f950079ea2ba6feaafd939e8','SystemVM Template (vSphere)',0,0,15,1,0,1,0,'VMware',NULL,NULL,0),(9,'routing-9','SystemVM Template (HyperV)','35d9360e-1951-4a94-8acc-f759e338aa1a',0,0,'SYSTEM',0,32,'http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2','VHD','2012-07-19 15:19:39',NULL,1,'f613f38c96bf039f2e5cbf92fa8ad4f8','SystemVM Template (HyperV)',0,0,15,1,0,1,0,'Hyperv',NULL,NULL,0),(200,'xs-tools.iso','xs-tools.iso','f722a941-0c0f-4a59-b060-41de29c4e4f7',1,1,'PERHOST',1,64,NULL,'ISO','2012-07-19 22:20:10',NULL,1,NULL,'xen-pv-drv-iso',0,0,1,0,0,0,1,'XenServer',NULL,NULL,0),(201,'vmware-tools.iso','vmware-tools.iso','b6ecb286-861a-4c76-9978-410ba21fbbdf',1,1,'PERHOST',1,64,NULL,'ISO','2012-07-19 22:20:10',NULL,1,NULL,'VMware Tools Installer ISO',0,0,1,0,0,0,1,'VMware',NULL,NULL,0);
|
||||
/*!40000 ALTER TABLE `vm_template` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
|
|
|||
|
|
@ -9156,6 +9156,19 @@ div.panel.ui-dialog div.list-view div.fixed-header {
|
|||
|
||||
/** Dialog tagger*/
|
||||
.ui-dialog .tagger {
|
||||
width: 375px;
|
||||
}
|
||||
|
||||
.ui-dialog .tagger .tag-info {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-dialog.editTags .ui-button {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.ui-dialog.editTags .ui-dialog-buttonpane {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.ui-dialog .tagger .field {
|
||||
|
|
@ -9634,29 +9647,44 @@ div.panel.ui-dialog div.list-view div.fixed-header {
|
|||
float: left;
|
||||
}
|
||||
|
||||
/*Configure ACL dialog*/
|
||||
.ui-dialog.configure-acl {
|
||||
/*Configure ACL dialog / VM tier list view dialog*/
|
||||
.ui-dialog.configure-acl .multi-edit {
|
||||
width: 866px;
|
||||
}
|
||||
|
||||
.ui-dialog.configure-acl .multi-edit table {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.ui-dialog.configure-acl .ui-dialog-buttonpane {
|
||||
/*+placement:shift 709px -2px;*/
|
||||
/*+placement:shift 722px -2px;*/
|
||||
position: relative;
|
||||
left: 709px;
|
||||
left: 722px;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.ui-dialog.configure-acl div.view.list-view {
|
||||
max-height: 474px;
|
||||
}
|
||||
|
||||
.ui-dialog.configure-acl .multi-edit .data {
|
||||
width: 807px;
|
||||
width: 901px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 370px;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/*Acl multi-edit*/
|
||||
div.ui-dialog div.acl div.multi-edit div.data div.data-body {
|
||||
|
||||
width:100%;
|
||||
.ui-dialog.configure-acl .multi-edit .data .multi-actions {
|
||||
min-width: none !important;
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
.ui-dialog.configure-acl .view.list-view table.body tr td.actions {
|
||||
width: 184px !important;
|
||||
max-width: 184px !important;
|
||||
}
|
||||
|
||||
/*Autoscaler*/
|
||||
.ui-dialog div.autoscaler {
|
||||
|
|
@ -9664,6 +9692,19 @@ width:100%;
|
|||
max-height: 600px;
|
||||
}
|
||||
|
||||
.ui-dialog div.autoscaler .detail-actions {
|
||||
}
|
||||
|
||||
.ui-dialog div.autoscaler .detail-actions .buttons {
|
||||
float: right;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.ui-dialog div.autoscaler .detail-actions .buttons .action {
|
||||
width: 32px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.ui-dialog div.autoscaler div.form-container div.form-item[rel=securityGroups] {
|
||||
display: block;
|
||||
width: 370px;
|
||||
|
|
@ -10251,3 +10292,11 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
|
|||
background-position: -230px -615px;
|
||||
}
|
||||
|
||||
.editTags .icon {
|
||||
background-position: -228px -65px;
|
||||
}
|
||||
|
||||
.editTags:hover .icon {
|
||||
background-position: -228px -646px;
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 176 KiB |
52
ui/index.jsp
52
ui/index.jsp
|
|
@ -5,7 +5,6 @@
|
|||
</c:if>
|
||||
<fmt:setBundle basename="resources/messages"/>
|
||||
<% long now = System.currentTimeMillis(); %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
|
@ -17,7 +16,6 @@
|
|||
<c:if test="${!empty cookie.lang && cookie.lang.value != 'en'}">
|
||||
<link type="text/css" rel="stylesheet" href="css/cloudstack3.${cookie.lang.value}.css" />
|
||||
</c:if>
|
||||
|
||||
<!--[if IE 7]>
|
||||
<link type="text/css" rel="stylesheet" href="css/cloudstack3-ie7.css" />
|
||||
<![endif]-->
|
||||
|
|
@ -25,7 +23,6 @@
|
|||
<body>
|
||||
<!-- CloudStack widget content -->
|
||||
<div id="cloudStack3-container"></div>
|
||||
|
||||
<!-- Templates -->
|
||||
<div id="template">
|
||||
<!-- Login form -->
|
||||
|
|
@ -38,22 +35,18 @@
|
|||
<label for="username"><fmt:message key="label.username"/></label>
|
||||
<input type="text" name="username" class="required" />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="field password">
|
||||
<label for="password"><fmt:message key="label.password"/></label>
|
||||
<input type="password" name="password" class="required" />
|
||||
</div>
|
||||
|
||||
<!-- Domain -->
|
||||
<div class="field domain">
|
||||
<label for="domain"><fmt:message key="label.domain"/></label>
|
||||
<input type="text" name="domain" />
|
||||
</div>
|
||||
|
||||
<!-- Submit (login) -->
|
||||
<input type="submit" value="<fmt:message key="label.login"/>" />
|
||||
|
||||
<!-- Select language -->
|
||||
<div class="select-language">
|
||||
<select name="language">
|
||||
|
|
@ -66,7 +59,6 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Instance wizard -->
|
||||
<div class="multi-wizard instance-wizard">
|
||||
<div class="progress">
|
||||
|
|
@ -95,7 +87,6 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select template -->
|
||||
<div class="section select-template">
|
||||
<h3><fmt:message key="label.select.iso.or.template" /></h3>
|
||||
|
|
@ -113,7 +104,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 2: Select ISO -->
|
||||
<div class="step select-iso" wizard-step-id="select-iso">
|
||||
<!-- Select template -->
|
||||
|
|
@ -284,7 +274,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 5c: Select security group -->
|
||||
<div class="wizard-step-conditional select-security-group">
|
||||
<div class="main-desc">
|
||||
|
|
@ -296,7 +285,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 6: Review -->
|
||||
<div class="step review" wizard-step-id="review">
|
||||
<div class="main-desc">
|
||||
|
|
@ -313,7 +301,6 @@
|
|||
<input type="text" name="displayname" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add to group -->
|
||||
<div class="select odd">
|
||||
<div class="name">
|
||||
|
|
@ -323,7 +310,6 @@
|
|||
<input type="text" name="groupname" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Zone -->
|
||||
<div class="select">
|
||||
<div class="name">
|
||||
|
|
@ -336,7 +322,6 @@
|
|||
<a href="1"><fmt:message key="label.edit"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hypervisor -->
|
||||
<div class="select odd">
|
||||
<div class="name">
|
||||
|
|
@ -349,7 +334,6 @@
|
|||
<a href="1"><fmt:message key="label.edit"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Template -->
|
||||
<div class="select">
|
||||
<div class="name">
|
||||
|
|
@ -362,7 +346,6 @@
|
|||
<a href="2"><fmt:message key="label.edit"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Service offering -->
|
||||
<div class="select odd">
|
||||
<div class="name">
|
||||
|
|
@ -375,7 +358,6 @@
|
|||
<a href="3"><fmt:message key="label.edit"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Data disk offering -->
|
||||
<div class="select">
|
||||
<div class="name">
|
||||
|
|
@ -388,7 +370,6 @@
|
|||
<a href="4"><fmt:message key="label.edit"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Primary network -->
|
||||
<div class="select odd">
|
||||
<div class="name">
|
||||
|
|
@ -406,7 +387,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Computer diagram -->
|
||||
<div class="diagram">
|
||||
<div>
|
||||
|
|
@ -419,7 +399,6 @@
|
|||
<div class="part hd"></div>
|
||||
<div class="part network-card"></div>
|
||||
</div>
|
||||
|
||||
<!-- Buttons -->
|
||||
<div class="buttons">
|
||||
<div class="button previous"><span><fmt:message key="label.previous"/></span></div>
|
||||
|
|
@ -427,7 +406,6 @@
|
|||
<div class="button next"><span><fmt:message key="label.next"/></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Zone wizard -->
|
||||
<div class="multi-wizard zone-wizard">
|
||||
<div class="progress">
|
||||
|
|
@ -473,7 +451,6 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Step 2: Add zone -->
|
||||
<div class="setup-zone" zone-wizard-form="zone"
|
||||
zone-wizard-step-id="addZone">
|
||||
|
|
@ -484,7 +461,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3.1: Setup Physical Network -->
|
||||
<div class="setup-physical-network"
|
||||
zone-wizard-step-id="setupPhysicalNetwork"
|
||||
|
|
@ -503,7 +479,6 @@
|
|||
<fmt:message key="message.setup.physical.network.during.zone.creation.basic"/>
|
||||
</div>
|
||||
<div class="button add new-physical-network"><span class="icon"> </span><span><fmt:message key="label.add.physical.network"/></span></div>
|
||||
|
||||
<!-- Traffic types drag area -->
|
||||
<div class="traffic-types-drag-area">
|
||||
<div class="header"><fmt:message key="label.traffic.types"/></div>
|
||||
|
|
@ -578,13 +553,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="drag-helper-icon"></div>
|
||||
<div class="content input-area">
|
||||
<form></form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3.1b: Add Netscaler device -->
|
||||
<div class="setup-physical-network-basic"
|
||||
zone-wizard-step-id="addNetscalerDevice"
|
||||
|
|
@ -597,13 +570,11 @@
|
|||
<li class="guest-traffic"><fmt:message key="label.guest.traffic"/></li>
|
||||
<li class="conditional storage-traffic"><fmt:message key="label.storage.traffic"/></li>
|
||||
</ul>
|
||||
|
||||
<div class="info-desc"><fmt:message key="label.please.specify.netscaler.info"/></div>
|
||||
<div class="content input-area">
|
||||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3.2: Configure public traffic -->
|
||||
<div class="setup-public-traffic" zone-wizard-prefilter="addPublicNetwork"
|
||||
zone-wizard-step-id="configurePublicTraffic">
|
||||
|
|
@ -614,14 +585,12 @@
|
|||
<li class="guest-traffic"><fmt:message key="label.guest.traffic"/></li>
|
||||
<li class="conditional storage-traffic"><fmt:message key="label.storage.traffic"/></li>
|
||||
</ul>
|
||||
|
||||
<div class="info-desc" id="add_zone_public_traffic_desc">
|
||||
<span id="for_basic_zone" style="display:none"><fmt:message key="message.public.traffic.in.basic.zone"/></span>
|
||||
<span id="for_advanced_zone" style="display:none"><fmt:message key="message.public.traffic.in.advanced.zone"/></span>
|
||||
</div>
|
||||
<div ui-custom="publicTrafficIPRange"></div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3.3: Add pod -->
|
||||
<div class="add-pod" zone-wizard-form="pod"
|
||||
zone-wizard-step-id="addPod">
|
||||
|
|
@ -632,7 +601,6 @@
|
|||
<li class="guest-traffic"><fmt:message key="label.guest.traffic"/></li>
|
||||
<li class="conditional storage-traffic"><fmt:message key="label.storage.traffic"/></li>
|
||||
</ul>
|
||||
|
||||
<div class="info-desc">
|
||||
<fmt:message key="message.add.pod.during.zone.creation"/>
|
||||
</div>
|
||||
|
|
@ -640,7 +608,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3.4: Configure guest traffic -->
|
||||
<div class="setup-guest-traffic"
|
||||
zone-wizard-form="guestTraffic"
|
||||
|
|
@ -653,7 +620,6 @@
|
|||
<li class="guest-traffic active"><fmt:message key="label.guest.traffic"/></li>
|
||||
<li class="conditional storage-traffic"><fmt:message key="label.storage.traffic"/></li>
|
||||
</ul>
|
||||
|
||||
<div class="info-desc" id="add_zone_guest_traffic_desc">
|
||||
<span id="for_basic_zone" style="display:none"><fmt:message key="message.guest.traffic.in.basic.zone"/></span>
|
||||
<span id="for_advanced_zone" style="display:none"><fmt:message key="message.guest.traffic.in.advanced.zone"/></span>
|
||||
|
|
@ -662,7 +628,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 3.5: Configure storage traffic -->
|
||||
<div class="setup-storage-traffic" zone-wizard-prefilter="configureStorageTraffic"
|
||||
zone-wizard-step-id="configureStorageTraffic">
|
||||
|
|
@ -673,13 +638,11 @@
|
|||
<li class="guest-traffic"><fmt:message key="label.guest.traffic"/></li>
|
||||
<li class="storage-traffic active"><fmt:message key="label.storage.traffic"/></li>
|
||||
</ul>
|
||||
|
||||
<div class="info-desc">
|
||||
<fmt:message key="message.storage.traffic"/>
|
||||
</div>
|
||||
<div ui-custom="storageTrafficIPRange"></div>
|
||||
</div>
|
||||
|
||||
<!-- Step 4.1: Add cluster -->
|
||||
<div class="add-cluster" zone-wizard-form="cluster"
|
||||
zone-wizard-step-id="addCluster">
|
||||
|
|
@ -697,7 +660,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 4.2: Add host -->
|
||||
<div class="add-cluster" zone-wizard-form="host"
|
||||
zone-wizard-step-id="addHost" zone-wizard-prefilter="addHost">
|
||||
|
|
@ -714,7 +676,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 4.3: Add primary storage -->
|
||||
<div class="add-cluster" zone-wizard-form="primaryStorage" zone-wizard-prefilter="addPrimaryStorage"
|
||||
zone-wizard-step-id="addPrimaryStorage">
|
||||
|
|
@ -731,7 +692,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 4.4: Add secondary storage -->
|
||||
<div class="add-cluster" zone-wizard-form="secondaryStorage"
|
||||
zone-wizard-step-id="addSecondaryStorage">
|
||||
|
|
@ -748,7 +708,6 @@
|
|||
<div class="select-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Step 5: Launch -->
|
||||
<div class="review" zone-wizard-step-id="launch">
|
||||
<div class="main-desc pre-setup"><fmt:message key="message.launch.zone"/></div>
|
||||
|
|
@ -762,7 +721,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Buttons -->
|
||||
<div class="buttons">
|
||||
<div class="button previous"><span><fmt:message key="label.previous"/></span></div>
|
||||
|
|
@ -770,7 +728,6 @@
|
|||
<div class="button next"><span><fmt:message key="label.next"/></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Network chart -->
|
||||
<div class="network-chart normal">
|
||||
<ul>
|
||||
|
|
@ -788,7 +745,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Static NAT network chart -->
|
||||
<div class="network-chart static-nat">
|
||||
<ul>
|
||||
|
|
@ -803,7 +759,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Project dashboard -->
|
||||
<div class="project-dashboard-view">
|
||||
<div class="overview-area">
|
||||
|
|
@ -871,7 +826,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info-boxes">
|
||||
<!-- Networking and security -->
|
||||
<div class="info-box networking-and-security">
|
||||
|
|
@ -915,7 +869,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Events -->
|
||||
<div class="info-box events">
|
||||
<div class="title">
|
||||
|
|
@ -934,7 +887,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- System dashboard -->
|
||||
<div class="system-dashboard-view">
|
||||
<div class="toolbar">
|
||||
|
|
@ -1598,8 +1550,6 @@
|
|||
<script src="lib/flot/jquery.flot.stack.js" type="text/javascript"></script>
|
||||
<script src="lib/flot/jquery.flot.symbol.js" type="text/javascript"></script>
|
||||
<script src="lib/flot/jquery.flot.threshold.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
<!-- CloudStack -->
|
||||
<script type="text/javascript" src="scripts/ui/core.js?t=<%=now%>"></script>
|
||||
<script type="text/javascript" src="scripts/ui/utils.js?t=<%=now%>"></script>
|
||||
|
|
@ -1656,6 +1606,8 @@
|
|||
</html>
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'label.tier.details': '<fmt:message key="label.tier.details"/>',
|
||||
'label.edit.tags': '<fmt:message key="label.edit.tags"/>',
|
||||
'label.network.rate.megabytes': '<fmt:message key="label.network.rate.megabytes"/>',
|
||||
'message.setup.physical.network.during.zone.creation.basic': '<fmt:message key="message.setup.physical.network.during.zone.creation.basic"/>',
|
||||
'label.traffic.label': '<fmt:message key="label.traffic.label"/>',
|
||||
|
|
|
|||
|
|
@ -17,6 +17,78 @@
|
|||
var totalScaleDownCondition = 0;
|
||||
|
||||
cloudStack.autoscaler = {
|
||||
// UI actions to appear in dialog
|
||||
autoscaleActions: {
|
||||
enable: {
|
||||
label: 'Enable Autoscale VM Group',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('enableAutoScaleVmGroup'),
|
||||
data: {
|
||||
id: args.context.originalAutoscaleData.context.autoscaleVmGroup.id
|
||||
},
|
||||
success: function(json) {
|
||||
var jid = json.enableautoscalevmGroupresponse.jobid;
|
||||
args.response.success({
|
||||
_custom: {
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.autoscalevmgroup;
|
||||
},
|
||||
getActionFilter: function() {
|
||||
return cloudStack.autoscaler.actionFilter;
|
||||
}
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
disable: {
|
||||
label: 'Disable Autoscale VM Group',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('disableAutoScaleVmGroup'),
|
||||
data: {
|
||||
id: args.context.originalAutoscaleData.context.autoscaleVmGroup.id
|
||||
},
|
||||
success: function(json) {
|
||||
var jid = json.disableautoscalevmGroupresponse.jobid;
|
||||
args.response.success({
|
||||
_custom: {
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.autoscalevmgroup;
|
||||
},
|
||||
getActionFilter: function() {
|
||||
return cloudStack.autoscaler.actionFilter;
|
||||
}
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
actionFilter: function(args) {
|
||||
var allowedActions = [];
|
||||
if(args.context.originalAutoscaleData == null) { //new LB rule
|
||||
//no actions for new LB rule
|
||||
}
|
||||
else { //existing LB rule
|
||||
if(args.context.originalAutoscaleData[0].context.autoscaleVmGroup.state == 'disabled')
|
||||
allowedActions.push('enable');
|
||||
else if(args.context.originalAutoscaleData[0].context.autoscaleVmGroup.state == 'enabled')
|
||||
allowedActions.push('disable');
|
||||
}
|
||||
return allowedActions;
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
// Reset data
|
||||
scaleUpData = [];
|
||||
|
|
@ -31,6 +103,7 @@
|
|||
$.ajax({
|
||||
url: createURL('listAutoScaleVmGroups'),
|
||||
data: {
|
||||
listAll: true,
|
||||
lbruleid: args.context.multiRules[0].id
|
||||
},
|
||||
success: function(json) {
|
||||
|
|
@ -39,6 +112,7 @@
|
|||
$.ajax({
|
||||
url: createURL('listAutoScaleVmProfiles'),
|
||||
data: {
|
||||
listAll: true,
|
||||
id: autoscaleVmGroup.vmprofileid
|
||||
},
|
||||
success: function(json) {
|
||||
|
|
@ -76,15 +150,17 @@
|
|||
|
||||
var diskOfferingId, securityGroups;
|
||||
var otherdeployparams = autoscaleVmProfile.otherdeployparams;
|
||||
var array1 = otherdeployparams.split('&');
|
||||
$(array1).each(function(){
|
||||
var array2 = this.split('=');
|
||||
if(array2[0] == 'diskofferingid')
|
||||
diskOfferingId= array2[1];
|
||||
if(array2[0] == 'securitygroupids')
|
||||
securityGroups = array2[1];
|
||||
});
|
||||
|
||||
if(otherdeployparams != null && otherdeployparams.length > 0) {
|
||||
var array1 = otherdeployparams.split('&');
|
||||
$(array1).each(function(){
|
||||
var array2 = this.split('=');
|
||||
if(array2[0] == 'diskofferingid')
|
||||
diskOfferingId= array2[1];
|
||||
if(array2[0] == 'securitygroupids')
|
||||
securityGroups = array2[1];
|
||||
});
|
||||
}
|
||||
|
||||
var originalAutoscaleData = {
|
||||
templateNames: autoscaleVmProfile.templateid,
|
||||
serviceOfferingId: autoscaleVmProfile.serviceofferingid,
|
||||
|
|
@ -337,25 +413,50 @@
|
|||
label: 'User',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listUsers'),
|
||||
data: {
|
||||
domainid: g_domainid,
|
||||
account: g_account
|
||||
},
|
||||
success: function(json) {
|
||||
var users = json.listusersresponse.user;
|
||||
$(users).each(function(){
|
||||
items.push({id: this.id, description: this.username});
|
||||
});
|
||||
args.response.success({ data: items });
|
||||
}
|
||||
});
|
||||
}
|
||||
else { //regular user doesn't have access to listUers API call.
|
||||
items.push({id: "", description: ""});
|
||||
}
|
||||
if(args.context.originalAutoscaleData == null) { //new LB rule
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listUsers'),
|
||||
data: {
|
||||
domainid: g_domainid,
|
||||
account: g_account
|
||||
},
|
||||
success: function(json) {
|
||||
var users = json.listusersresponse.user;
|
||||
$(users).each(function(){
|
||||
items.push({id: this.id, description: this.username});
|
||||
});
|
||||
args.response.success({ data: items });
|
||||
}
|
||||
});
|
||||
}
|
||||
else { //regular user doesn't have access to listUers API call.
|
||||
items.push({id: "", description: ""});
|
||||
args.response.success({ data: items });
|
||||
}
|
||||
}
|
||||
else { //existing LB rule
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listUsers'),
|
||||
data: {
|
||||
domainid: args.context.originalAutoscaleData.context.autoscaleVmProfile.domainid,
|
||||
account: args.context.originalAutoscaleData.context.autoscaleVmProfile.account
|
||||
},
|
||||
success: function(json) {
|
||||
var users = json.listusersresponse.user;
|
||||
$(users).each(function(){
|
||||
items.push({id: this.id, description: this.username});
|
||||
});
|
||||
args.response.success({ data: items });
|
||||
}
|
||||
});
|
||||
}
|
||||
else { //regular user doesn't have access to listUers API call.
|
||||
items.push({id: "", description: ""});
|
||||
args.response.success({ data: items });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1005,7 +1106,7 @@
|
|||
array1.push("&destroyvmgraceperiod=" + args.data.destroyVMgracePeriod);
|
||||
array1.push("&snmpcommunity=" + args.data.snmpCommunity);
|
||||
array1.push("&snmpport=" + args.data.snmpPort);
|
||||
if(args.data.username != "")
|
||||
if(args.data.username != null && args.data.username.length > 0)
|
||||
array1.push("&autoscaleuserid=" + args.data.username);
|
||||
|
||||
$.ajax({
|
||||
|
|
@ -1156,7 +1257,9 @@
|
|||
id: args.context.originalAutoscaleData.context.autoscaleVmGroup.id,
|
||||
minmembers: args.data.minInstance,
|
||||
maxmembers: args.data.maxInstance,
|
||||
interval: args.data.interval
|
||||
interval: args.data.interval,
|
||||
scaleuppolicyids: args.context.originalAutoscaleData.scaleUpPolicy.id,
|
||||
scaledownpolicyids: args.context.originalAutoscaleData.scaleDownPolicy.id
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
|
|
|
|||
|
|
@ -1712,8 +1712,11 @@
|
|||
|
||||
if('networks' in args.context && args.context.networks[0].vpcid == null) { //a non-VPC network from Guest Network section
|
||||
$.ajax({
|
||||
url: createURL("listNetworkOfferings&id=" + args.context.networks[0].networkofferingid),
|
||||
dataType: "json",
|
||||
url: createURL('listNetworkOfferings'),
|
||||
data: {
|
||||
listAll: true,
|
||||
id: args.context.networks[0].networkofferingid
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var networkoffering = json.listnetworkofferingsresponse.networkoffering[0];
|
||||
|
|
@ -1745,7 +1748,11 @@
|
|||
}
|
||||
else { //IP is associated with a tier
|
||||
$.ajax({
|
||||
url: createURL("listNetworks&id=" + args.context.ipAddresses[0].associatednetworkid),
|
||||
url: createURL('listNetworks'),
|
||||
data: {
|
||||
listAll: true,
|
||||
id: args.context.ipAddresses[0].associatednetworkid
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var networkObj = json.listnetworksresponse.network[0];
|
||||
|
|
@ -1933,19 +1940,6 @@
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
edit: {
|
||||
label: 'label.edit',
|
||||
|
||||
// Blank -- edit is just for tags right now
|
||||
action: function(args) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'Edit firewall rule',
|
||||
poll: function(args) { args.complete(); }
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: {
|
||||
label: 'label.action.delete.firewall',
|
||||
action: function(args) {
|
||||
|
|
@ -2285,6 +2279,7 @@
|
|||
'autoScale': {
|
||||
label: 'AutoScale',
|
||||
custom: {
|
||||
requireValidation: true,
|
||||
buttonLabel: 'label.configure',
|
||||
action: cloudStack.uiCustom.autoscaler(cloudStack.autoscaler)
|
||||
}
|
||||
|
|
@ -2804,19 +2799,6 @@
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
edit: {
|
||||
label: 'label.edit',
|
||||
|
||||
// Blank -- edit is just for tags right now
|
||||
action: function(args) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'label.edit.pf',
|
||||
poll: function(args) { args.complete(); }
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: {
|
||||
label: 'label.remove.pf',
|
||||
action: function(args) {
|
||||
|
|
@ -3963,52 +3945,120 @@
|
|||
ipsecpsk: {
|
||||
label: 'IPsec Preshared-Key',
|
||||
validation: { required: true }
|
||||
},
|
||||
ikepolicy: {
|
||||
label: 'IKE policy',
|
||||
},
|
||||
|
||||
//IKE Policy
|
||||
ikeEncryption: {
|
||||
label: 'IKE Encryption',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '3des-md5', description: '3des-md5'});
|
||||
items.push({id: 'aes-md5', description: 'aes-md5'});
|
||||
items.push({id: 'aes128-md5', description: 'aes128-md5'});
|
||||
items.push({id: '3des-sha1', description: '3des-sha1'});
|
||||
items.push({id: 'aes-sha1', description: 'aes-sha1'});
|
||||
items.push({id: 'aes128-sha1', description: 'aes128-sha1'});
|
||||
items.push({id: '3des', description: '3des'});
|
||||
items.push({id: 'aes128', description: 'aes128'});
|
||||
items.push({id: 'aes192', description: 'aes192'});
|
||||
items.push({id: 'aes256', description: 'aes256'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
esppolicy: {
|
||||
label: 'ESP policy',
|
||||
},
|
||||
ikeHash: {
|
||||
label: 'IKE Hash',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '3des-md5', description: '3des-md5'});
|
||||
items.push({id: 'aes-md5', description: 'aes-md5'});
|
||||
items.push({id: 'aes128-md5', description: 'aes128-md5'});
|
||||
items.push({id: '3des-sha1', description: '3des-sha1'});
|
||||
items.push({id: 'aes-sha1', description: 'aes-sha1'});
|
||||
items.push({id: 'aes128-sha1', description: 'aes128-sha1'});
|
||||
items.push({id: 'md5', description: 'md5'});
|
||||
items.push({id: 'sha1', description: 'sha1'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
lifetime: {
|
||||
label: 'Lifetime (second)',
|
||||
},
|
||||
ikeDh: {
|
||||
label: 'IKE DH',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '', description: ''});
|
||||
items.push({id: 'modp1024', description: 'modp1024'});
|
||||
items.push({id: 'modp1536', description: 'modp1536'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
|
||||
//ESP Policy
|
||||
espEncryption: {
|
||||
label: 'ESP Encryption',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '3des', description: '3des'});
|
||||
items.push({id: 'aes128', description: 'aes128'});
|
||||
items.push({id: 'aes192', description: 'aes192'});
|
||||
items.push({id: 'aes256', description: 'aes256'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
espHash: {
|
||||
label: 'ESP Hash',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: 'md5', description: 'md5'});
|
||||
items.push({id: 'sha1', description: 'sha1'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
perfectForwardSecrecy: {
|
||||
label: 'Perfect Forward Secrecy',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '', description: ''});
|
||||
items.push({id: 'modp1024', description: 'modp1024'});
|
||||
items.push({id: 'modp1536', description: 'modp1536'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
|
||||
ikelifetime: {
|
||||
label: 'IKE lifetime (second)',
|
||||
defaultValue: '86400',
|
||||
validation: { required: false, number: true }
|
||||
}
|
||||
},
|
||||
esplifetime: {
|
||||
label: 'ESP Lifetime (second)',
|
||||
defaultValue: '3600',
|
||||
validation: { required: false, number: true }
|
||||
},
|
||||
|
||||
dpd: {
|
||||
label: 'Dead Peer Detection',
|
||||
isBoolean: true,
|
||||
isChecked: false
|
||||
}
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
var data = {
|
||||
name: args.data.name,
|
||||
gateway: args.data.gateway,
|
||||
cidrlist: args.data.cidrlist,
|
||||
ipsecpsk: args.data.ipsecpsk,
|
||||
ikelifetime: args.data.ikelifetime,
|
||||
esplifetime: args.data.esplifetime,
|
||||
dpd: (args.data.dpd == "on")
|
||||
};
|
||||
|
||||
var ikepolicy = args.data.ikeEncryption + '-' + args.data.ikeHash;
|
||||
if(args.data.ikeDh != null && args.data.ikeDh.length > 0)
|
||||
ikepolicy += ';' + args.data.ikeDh;
|
||||
|
||||
$.extend(data, {
|
||||
ikepolicy: ikepolicy
|
||||
});
|
||||
|
||||
var esppolicy = args.data.espEncryption + '-' + args.data.espHash;
|
||||
if(args.data.perfectForwardSecrecy != null && args.data.perfectForwardSecrecy.length > 0)
|
||||
esppolicy += ';' + args.data.perfectForwardSecrecy;
|
||||
|
||||
$.extend(data, {
|
||||
esppolicy: esppolicy
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: createURL('createVpnCustomerGateway'),
|
||||
data: {
|
||||
name: args.data.name,
|
||||
gateway: args.data.gateway,
|
||||
cidrlist: args.data.cidrlist,
|
||||
ipsecpsk: args.data.ipsecpsk,
|
||||
ikepolicy: args.data.ikepolicy,
|
||||
esppolicy: args.data.esppolicy,
|
||||
lifetime: args.data.lifetime
|
||||
},
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
var jid = json.createvpncustomergatewayresponse.jobid;
|
||||
|
|
@ -4036,18 +4086,34 @@
|
|||
actions: {
|
||||
edit: {
|
||||
label: 'label.edit',
|
||||
action: function(args) {
|
||||
action: function(args) {
|
||||
var data = {
|
||||
id: args.context.vpnCustomerGateway[0].id,
|
||||
name: args.data.name,
|
||||
gateway: args.data.gateway,
|
||||
cidrlist: args.data.cidrlist,
|
||||
ipsecpsk: args.data.ipsecpsk,
|
||||
ikepolicy: args.data.ikepolicy,
|
||||
esppolicy: args.data.esppolicy,
|
||||
lifetime: args.data.lifetime
|
||||
ipsecpsk: args.data.ipsecpsk,
|
||||
ikelifetime: args.data.ikelifetime,
|
||||
esplifetime: args.data.esplifetime,
|
||||
dpd: (args.data.dpd == "on")
|
||||
};
|
||||
|
||||
var ikepolicy = args.data.ikeEncryption + '-' + args.data.ikeHash;
|
||||
if(args.data.ikeDh != null && args.data.ikeDh.length > 0)
|
||||
ikepolicy += ';' + args.data.ikeDh;
|
||||
|
||||
$.extend(data, {
|
||||
ikepolicy: ikepolicy
|
||||
});
|
||||
|
||||
var esppolicy = args.data.espEncryption + '-' + args.data.espHash;
|
||||
if(args.data.perfectForwardSecrecy != null && args.data.perfectForwardSecrecy.length > 0)
|
||||
esppolicy += ';' + args.data.perfectForwardSecrecy;
|
||||
|
||||
$.extend(data, {
|
||||
esppolicy: esppolicy
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: createURL('updateVpnCustomerGateway'),
|
||||
data: data,
|
||||
|
|
@ -4132,39 +4198,96 @@
|
|||
label: 'IPsec Preshared-Key',
|
||||
isEditable: true,
|
||||
validation: { required: true }
|
||||
},
|
||||
ikepolicy: {
|
||||
label: 'IKE policy',
|
||||
isEditable: true,
|
||||
},
|
||||
|
||||
//IKE Policy
|
||||
ikeEncryption: {
|
||||
label: 'IKE Encryption',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '3des-md5', description: '3des-md5'});
|
||||
items.push({id: 'aes-md5', description: 'aes-md5'});
|
||||
items.push({id: 'aes128-md5', description: 'aes128-md5'});
|
||||
items.push({id: '3des-sha1', description: '3des-sha1'});
|
||||
items.push({id: 'aes-sha1', description: 'aes-sha1'});
|
||||
items.push({id: 'aes128-sha1', description: 'aes128-sha1'});
|
||||
items.push({id: '3des', description: '3des'});
|
||||
items.push({id: 'aes128', description: 'aes128'});
|
||||
items.push({id: 'aes192', description: 'aes192'});
|
||||
items.push({id: 'aes256', description: 'aes256'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
esppolicy:{
|
||||
label: 'ESP policy',
|
||||
isEditable: true,
|
||||
},
|
||||
ikeHash: {
|
||||
label: 'IKE Hash',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '3des-md5', description: '3des-md5'});
|
||||
items.push({id: 'aes-md5', description: 'aes-md5'});
|
||||
items.push({id: 'aes128-md5', description: 'aes128-md5'});
|
||||
items.push({id: '3des-sha1', description: '3des-sha1'});
|
||||
items.push({id: 'aes-sha1', description: 'aes-sha1'});
|
||||
items.push({id: 'aes128-sha1', description: 'aes128-sha1'});
|
||||
items.push({id: 'md5', description: 'md5'});
|
||||
items.push({id: 'sha1', description: 'sha1'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
}
|
||||
},
|
||||
ikeDh: {
|
||||
label: 'IKE DH',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '', description: ''});
|
||||
items.push({id: 'modp1024', description: 'modp1024'});
|
||||
items.push({id: 'modp1536', description: 'modp1536'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
|
||||
//ESP Policy
|
||||
espEncryption: {
|
||||
label: 'ESP Encryption',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '3des', description: '3des'});
|
||||
items.push({id: 'aes128', description: 'aes128'});
|
||||
items.push({id: 'aes192', description: 'aes192'});
|
||||
items.push({id: 'aes256', description: 'aes256'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
espHash: {
|
||||
label: 'ESP Hash',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: 'md5', description: 'md5'});
|
||||
items.push({id: 'sha1', description: 'sha1'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
perfectForwardSecrecy: {
|
||||
label: 'Perfect Forward Secrecy',
|
||||
isEditable: true,
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: '', description: ''});
|
||||
items.push({id: 'modp1024', description: 'modp1024'});
|
||||
items.push({id: 'modp1536', description: 'modp1536'});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
},
|
||||
|
||||
ikelifetime: {
|
||||
label: 'IKE lifetime (second)',
|
||||
isEditable: true,
|
||||
validation: { required: false, number: true }
|
||||
},
|
||||
lifetime :{
|
||||
label: 'Lifetime (second)',
|
||||
isEditable: true
|
||||
esplifetime: {
|
||||
label: 'ESP Lifetime (second)',
|
||||
isEditable: true,
|
||||
validation: { required: false, number: true }
|
||||
},
|
||||
|
||||
dpd: {
|
||||
label: 'Dead Peer Detection',
|
||||
isBoolean: true,
|
||||
isEditable: true,
|
||||
converter:cloudStack.converters.toBooleanText
|
||||
},
|
||||
|
||||
id: { label: 'label.id' },
|
||||
domain: { label: 'label.domain' },
|
||||
account: { label: 'label.account' }
|
||||
|
|
@ -4178,6 +4301,31 @@
|
|||
},
|
||||
success: function(json) {
|
||||
var item = json.listvpncustomergatewaysresponse.vpncustomergateway[0];
|
||||
|
||||
//IKE POlicy
|
||||
var a1 = item.ikepolicy.split('-'); //e.g. item.ikepolicy == '3des-md5' or '3des-md5;modp1024'
|
||||
item.ikeEncryption = a1[0];
|
||||
if(a1[1].indexOf(';') == -1) {
|
||||
item.ikeHash = a1[1];
|
||||
}
|
||||
else {
|
||||
var a2 = a1[1].split(';');
|
||||
item.ikeHash = a2[0];
|
||||
item.ikeDh = a2[1];
|
||||
}
|
||||
|
||||
//ESP Policy
|
||||
var a1 = item.esppolicy.split('-'); //e.g. item.esppolicy == '3des-md5' or '3des-md5;modp1024'
|
||||
item.espEncryption = a1[0];
|
||||
if(a1[1].indexOf(';') == -1) {
|
||||
item.espHash = a1[1];
|
||||
}
|
||||
else {
|
||||
var a2 = a1[1].split(';');
|
||||
item.espHash = a2[0];
|
||||
item.perfectForwardSecrecy = a2[1];
|
||||
}
|
||||
|
||||
args.response.success({data: item});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1983,8 +1983,9 @@
|
|||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
data: {
|
||||
forvpc: false
|
||||
},
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router ?
|
||||
json.listroutersresponse.router : [];
|
||||
|
|
@ -1996,8 +1997,9 @@
|
|||
// Get project routers
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
data: {
|
||||
forvpc: false
|
||||
},
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router ?
|
||||
json.listroutersresponse.router : [];
|
||||
|
|
@ -2389,6 +2391,9 @@
|
|||
fields: {
|
||||
name: { label: 'label.name' },
|
||||
zonename: { label: 'label.zone' },
|
||||
routerType: {
|
||||
label: 'label.type'
|
||||
},
|
||||
state: {
|
||||
converter: function(str) {
|
||||
// For localization
|
||||
|
|
@ -2415,6 +2420,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: 'json',
|
||||
|
|
@ -2423,28 +2429,30 @@
|
|||
},
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router;
|
||||
args.response.success({
|
||||
actionFilter: routerActionfilter,
|
||||
data: items
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Get project routers
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"),
|
||||
dataType: 'json',
|
||||
data: {
|
||||
forvpc: true
|
||||
},
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router;
|
||||
args.response.success({
|
||||
actionFilter: routerActionfilter,
|
||||
data: items
|
||||
});
|
||||
var items = json.listroutersresponse.router;
|
||||
$(items).map(function(index, item) {
|
||||
routers.push(item);
|
||||
});
|
||||
|
||||
// Get project routers
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"),
|
||||
dataType: 'json',
|
||||
data: {
|
||||
forvpc: true
|
||||
},
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router;
|
||||
$(items).map(function(index, item) {
|
||||
routers.push(item);
|
||||
});
|
||||
args.response.success({
|
||||
actionFilter: routerActionfilter,
|
||||
data: $(routers).map(mapRouterType)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -2531,8 +2539,101 @@
|
|||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
restart: {
|
||||
label: 'label.action.reboot.router',
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'message.action.reboot.router';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'label.action.reboot.router';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('rebootRouter&id=' + args.context.routers[0].id),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jid = json.rebootrouterresponse.jobid;
|
||||
args.response.success({
|
||||
_custom: {
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.domainrouter;
|
||||
},
|
||||
getActionFilter: function() {
|
||||
return routerActionfilter;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
},
|
||||
|
||||
changeService: {
|
||||
label: 'label.change.service.offering',
|
||||
createForm: {
|
||||
title: 'label.change.service.offering',
|
||||
desc: '',
|
||||
fields: {
|
||||
serviceOfferingId: {
|
||||
label: 'label.compute.offering',
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listServiceOfferings'),
|
||||
data: {
|
||||
issystem: true,
|
||||
systemvmtype: 'domainrouter'
|
||||
},
|
||||
success: function(json) {
|
||||
var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
|
||||
var items = [];
|
||||
$(serviceofferings).each(function() {
|
||||
if(this.id != args.context.routers[0].serviceofferingid) {
|
||||
items.push({id: this.id, description: this.name}); //default one (i.e. "System Offering For Software Router") doesn't have displaytext property. So, got to use name property instead.
|
||||
}
|
||||
});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
return 'label.change.service.offering';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("changeServiceForRouter&id=" + args.context.routers[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.changeserviceforrouterresponse.domainrouter;
|
||||
args.response.success({data: jsonObj});
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'remove': {
|
||||
label: 'label.destroy.router',
|
||||
messages: {
|
||||
|
|
@ -2673,7 +2774,7 @@
|
|||
project: { label: 'label.project' }
|
||||
},
|
||||
{
|
||||
id: { label: 'label.id' },
|
||||
id: { label: 'label.id' },
|
||||
projectid: { label: 'label.project.id' },
|
||||
state: { label: 'label.state' },
|
||||
publicip: { label: 'label.public.ip' },
|
||||
|
|
@ -2689,7 +2790,8 @@
|
|||
label: 'label.redundant.router',
|
||||
converter: cloudStack.converters.toBooleanText
|
||||
},
|
||||
redundantRouterState: { label: 'label.redundant.state' }
|
||||
redundantRouterState: { label: 'label.redundant.state' },
|
||||
vpcid: { label: 'VPC ID' }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -4711,8 +4813,9 @@
|
|||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
data: {
|
||||
forvpc: false
|
||||
},
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router ?
|
||||
json.listroutersresponse.router : [];
|
||||
|
|
@ -4723,8 +4826,9 @@
|
|||
// Get project routers
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
data: {
|
||||
forvpc: false
|
||||
},
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router ?
|
||||
json.listroutersresponse.router : [];
|
||||
|
|
@ -4855,63 +4959,99 @@
|
|||
poll: pollAsyncJobResult
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
changeService: {
|
||||
label: 'label.change.service.offering',
|
||||
createForm: {
|
||||
title: 'label.change.service.offering',
|
||||
desc: '',
|
||||
fields: {
|
||||
serviceOfferingId: {
|
||||
label: 'label.compute.offering',
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listServiceOfferings&issystem=true&systemvmtype=domainrouter"),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
|
||||
var items = [];
|
||||
$(serviceofferings).each(function() {
|
||||
if(this.id != args.context.routers[0].serviceofferingid) {
|
||||
items.push({id: this.id, description: this.displaytext});
|
||||
}
|
||||
});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
return 'label.change.service.offering';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("changeServiceForRouter&id=" + args.context.routers[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.changeserviceforrouterresponse.domainrouter;
|
||||
args.response.success({data: jsonObj});
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
}
|
||||
},
|
||||
*/
|
||||
|
||||
restart: {
|
||||
label: 'label.action.reboot.router',
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'message.action.reboot.router';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'label.action.reboot.router';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('rebootRouter&id=' + args.context.routers[0].id),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jid = json.rebootrouterresponse.jobid;
|
||||
args.response.success({
|
||||
_custom: {
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.domainrouter;
|
||||
},
|
||||
getActionFilter: function() {
|
||||
return routerActionfilter;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
},
|
||||
|
||||
changeService: {
|
||||
label: 'label.change.service.offering',
|
||||
createForm: {
|
||||
title: 'label.change.service.offering',
|
||||
desc: '',
|
||||
fields: {
|
||||
serviceOfferingId: {
|
||||
label: 'label.compute.offering',
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL('listServiceOfferings'),
|
||||
data: {
|
||||
issystem: true,
|
||||
systemvmtype: 'domainrouter'
|
||||
},
|
||||
success: function(json) {
|
||||
var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
|
||||
var items = [];
|
||||
$(serviceofferings).each(function() {
|
||||
if(this.id != args.context.routers[0].serviceofferingid) {
|
||||
items.push({id: this.id, description: this.name}); //default one (i.e. "System Offering For Software Router") doesn't have displaytext property. So, got to use name property instead.
|
||||
}
|
||||
});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
return 'label.change.service.offering';
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("changeServiceForRouter&id=" + args.context.routers[0].id + "&serviceofferingid=" + args.data.serviceOfferingId),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.changeserviceforrouterresponse.domainrouter;
|
||||
args.response.success({data: jsonObj});
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
migrate: {
|
||||
label: 'label.action.migrate.router',
|
||||
|
|
@ -5039,7 +5179,8 @@
|
|||
label: 'label.redundant.router',
|
||||
converter: cloudStack.converters.toBooleanText
|
||||
},
|
||||
redundantRouterState: { label: 'label.redundant.state' }
|
||||
redundantRouterState: { label: 'label.redundant.state' },
|
||||
vpcid: { label: 'VPC ID' }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -9499,8 +9640,10 @@
|
|||
|
||||
if (jsonObj.state == 'Running') {
|
||||
allowedActions.push("stop");
|
||||
allowedActions.push("restart");
|
||||
//allowedActions.push("changeService");
|
||||
|
||||
if(jsonObj.vpcid != null)
|
||||
allowedActions.push("restart");
|
||||
|
||||
allowedActions.push("viewConsole");
|
||||
if (isAdmin())
|
||||
allowedActions.push("migrate");
|
||||
|
|
@ -9508,7 +9651,9 @@
|
|||
else if (jsonObj.state == 'Stopped') {
|
||||
allowedActions.push("start");
|
||||
allowedActions.push("remove");
|
||||
//allowedActions.push("changeService");
|
||||
|
||||
if(jsonObj.vpcid != null)
|
||||
allowedActions.push("changeService");
|
||||
}
|
||||
return allowedActions;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
var scaleuppolicy = forms.scaleUpPolicy;
|
||||
var scaledownpolicy = forms.scaleDownPolicy;
|
||||
var dataProvider = cloudStack.autoscaler.dataProvider;
|
||||
var actions = cloudStack.autoscaler.autoscaleActions;
|
||||
var actionFilter = cloudStack.autoscaler.actionFilter;
|
||||
|
||||
return function(args) {
|
||||
var context = args.data ?
|
||||
|
|
@ -51,6 +53,91 @@
|
|||
scaleDownPolicyTitleForm, $scaleDownPolicyTitleForm,
|
||||
scaleUpPolicyForm, scaleDownPolicyForm;
|
||||
|
||||
var renderActions = function(args) {
|
||||
var data = args.data;
|
||||
var context = args.context;
|
||||
var $actions = $('<div>').addClass('detail-group');
|
||||
var $actionsTable = $('<table>').append('<tr>');
|
||||
var $detailActions = $('<td>').addClass('detail-actions');
|
||||
var $buttons = $('<div>').addClass('buttons');
|
||||
var visibleActions = actionFilter ?
|
||||
actionFilter({
|
||||
context: $.extend(true, {}, context, {
|
||||
originalAutoscaleData: data ? [data] : null
|
||||
})
|
||||
}) :
|
||||
$.map(actions, function(value, key) { return key; });
|
||||
|
||||
$detailActions.append($buttons);
|
||||
$actionsTable.find('tr').append($detailActions);
|
||||
$actions.append($actionsTable);
|
||||
|
||||
$(visibleActions).map(function(index, actionID) {
|
||||
var action = actions[actionID];
|
||||
var label = _l(action.label);
|
||||
var $action = $('<div>').addClass('action').addClass(actionID);
|
||||
var $icon = $('<a>')
|
||||
.attr({ href: '#', title: label })
|
||||
.append($('<span>').addClass('icon'));
|
||||
|
||||
if (visibleActions.length == 1) $action.addClass('single');
|
||||
else if (!index) $action.addClass('first');
|
||||
else if (index == visibleActions.length - 1) $action.addClass('last');
|
||||
|
||||
// Perform action event
|
||||
$action.click(function() {
|
||||
var $loading = $('<div>').addClass('loading-overlay').appendTo($autoscalerDialog);
|
||||
var success = function(args) {
|
||||
$loading.remove();
|
||||
cloudStack.dialog.notice({
|
||||
message: _l('label.task.completed') + ': ' + label
|
||||
});
|
||||
|
||||
// Reload actions
|
||||
var $newActions = renderActions({
|
||||
data: data ? $.extend(data, args.data) : args.data,
|
||||
context: context
|
||||
});
|
||||
|
||||
$actions.after($newActions);
|
||||
$actions.remove();
|
||||
};
|
||||
var error = function(message) {
|
||||
$loading.remove();
|
||||
cloudStack.dialog.notice({ message: message });
|
||||
};
|
||||
|
||||
action.action({
|
||||
context: {
|
||||
originalAutoscaleData: args.data,
|
||||
},
|
||||
response: {
|
||||
success: function(args) {
|
||||
var notification = $.extend(args.notification, {
|
||||
_custom: args._custom,
|
||||
desc: label
|
||||
});
|
||||
|
||||
cloudStack.ui.notifications.add(
|
||||
notification,
|
||||
success, {},
|
||||
error, {}
|
||||
);
|
||||
},
|
||||
error: error
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$action.append($icon);
|
||||
$action.appendTo($buttons);
|
||||
});
|
||||
|
||||
if (!visibleActions || !visibleActions.length) $actions.hide();
|
||||
|
||||
return $actions;
|
||||
};
|
||||
|
||||
var renderDialogContent = function(args) {
|
||||
var data = args.data ? args.data : {};
|
||||
|
||||
|
|
@ -69,7 +156,7 @@
|
|||
|
||||
$.extend(context, {
|
||||
originalAutoscaleData: args.data
|
||||
})
|
||||
});
|
||||
|
||||
// Create and append top fields
|
||||
// -- uses create form to generate fields
|
||||
|
|
@ -207,6 +294,9 @@
|
|||
|
||||
$autoscalerDialog.dialog('option', 'position', 'center');
|
||||
$autoscalerDialog.dialog('option', 'height', 'auto');
|
||||
|
||||
// Setup actions
|
||||
renderActions(args).prependTo($autoscalerDialog);
|
||||
};
|
||||
|
||||
var $loading = $('<div>').addClass('loading-overlay').appendTo($autoscalerDialog);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,17 @@
|
|||
$login.appendTo('html body');
|
||||
$('html body').addClass('login');
|
||||
|
||||
// Remove label if field was auto filled
|
||||
$.each($form.find('label'), function() {
|
||||
var $label = $(this);
|
||||
var $input = $form.find('input').filter(function() {
|
||||
return $(this).attr('name') == $label.attr('for');
|
||||
});
|
||||
if ($input.val()) {
|
||||
$label.hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Form validation
|
||||
$form.validate();
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,26 @@
|
|||
listViewArgs.activeSection
|
||||
] = [$instanceRow.data('jsonObj')];
|
||||
|
||||
if (action.custom && !action.noAdd) {
|
||||
var externalLinkAction = action.externalLink;
|
||||
if (externalLinkAction) {
|
||||
// Show popup immediately, do not proceed through normal action process
|
||||
window.open(
|
||||
// URL
|
||||
externalLinkAction.url({
|
||||
context: context
|
||||
}),
|
||||
|
||||
// Title
|
||||
externalLinkAction.title({
|
||||
context: context
|
||||
}),
|
||||
|
||||
// Window options
|
||||
'menubar=0,resizable=0,'
|
||||
+ 'width=' + externalLinkAction.width + ','
|
||||
+ 'height=' + externalLinkAction.height
|
||||
);
|
||||
} else if (action.custom && !action.noAdd) {
|
||||
action.custom({
|
||||
data: data,
|
||||
ref: options.ref,
|
||||
|
|
@ -250,7 +269,8 @@
|
|||
listViewArgs.activeSection
|
||||
] = [$instanceRow.data('jsonObj')];
|
||||
|
||||
if (!args.action.createForm &&
|
||||
if (!args.action.action.externalLink &&
|
||||
!args.action.createForm &&
|
||||
args.action.addRow != 'true' &&
|
||||
!action.custom && !action.uiCustom)
|
||||
cloudStack.dialog.confirm({
|
||||
|
|
@ -270,7 +290,26 @@
|
|||
var isHeader = args.action.isHeader;
|
||||
var createFormContext = $.extend({}, context);
|
||||
|
||||
if (args.action.createForm) {
|
||||
var externalLinkAction = action.externalLink;
|
||||
if (externalLinkAction) {
|
||||
// Show popup immediately, do not proceed through normal action process
|
||||
window.open(
|
||||
// URL
|
||||
externalLinkAction.url({
|
||||
context: context
|
||||
}),
|
||||
|
||||
// Title
|
||||
externalLinkAction.title({
|
||||
context: context
|
||||
}),
|
||||
|
||||
// Window options
|
||||
'menubar=0,resizable=0,'
|
||||
+ 'width=' + externalLinkAction.width + ','
|
||||
+ 'height=' + externalLinkAction.height
|
||||
);
|
||||
} else if (args.action.createForm) {
|
||||
cloudStack.dialog.createForm({
|
||||
form: args.action.createForm,
|
||||
after: function(args) {
|
||||
|
|
|
|||
|
|
@ -345,21 +345,51 @@
|
|||
} });
|
||||
}
|
||||
});
|
||||
|
||||
if (options.tags) {
|
||||
$(':ui-dialog:last').append(
|
||||
$('<div>').addClass('multi-edit-tags').tagger($.extend(true, {}, options.tags, {
|
||||
context: $.extend(true, {}, options.context, {
|
||||
multiRule: [multiRule]
|
||||
})
|
||||
}))
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
// Add tagger action
|
||||
if (options.tags) {
|
||||
$actions.prepend(
|
||||
$('<div></div>')
|
||||
.addClass('action editTags')
|
||||
.attr('title', _l('label.edit.tags'))
|
||||
.append($('<span></span>').addClass('icon'))
|
||||
.click(function() {
|
||||
$('<div>')
|
||||
.dialog({
|
||||
dialogClass: 'editTags',
|
||||
title: _l('label.edit.tags'),
|
||||
width: 400,
|
||||
buttons: [
|
||||
{
|
||||
text: _l('label.done'),
|
||||
'class': 'ok',
|
||||
click: function() {
|
||||
$(this).dialog('destroy');
|
||||
$('div.overlay:last').remove();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
.append(
|
||||
$('<div></div>').addClass('multi-edit-tags').tagger($.extend(true, {}, options.tags, {
|
||||
context: $.extend(true, {}, options.context, {
|
||||
multiRule: [multiRule]
|
||||
})
|
||||
}))
|
||||
)
|
||||
.closest('.ui-dialog').overlay();
|
||||
|
||||
return false;
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
// Add expandable listing, for multiple-item
|
||||
if (options.multipleAdd) {
|
||||
// Create expandable box
|
||||
|
|
@ -774,6 +804,9 @@
|
|||
$('<div>').addClass('button add-vm custom-action')
|
||||
.html(_l(field.custom.buttonLabel))
|
||||
.click(function() {
|
||||
if (field.custom.requireValidation &&
|
||||
!$multiForm.valid()) return false;
|
||||
|
||||
var formData = getMultiData($multi);
|
||||
|
||||
field.custom.action({
|
||||
|
|
@ -786,6 +819,8 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
}).appendTo($td);
|
||||
} else if (field.addButton) {
|
||||
$addVM = $('<div>').addClass('button add-vm').html(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
var aclMultiEdit = {
|
||||
noSelect: true,
|
||||
fields: {
|
||||
'cidrlist': { edit: true, label: 'label.cidr.list' },
|
||||
'cidrlist': { edit: true, label: 'label.cidr' },
|
||||
'protocol': {
|
||||
label: 'label.protocol',
|
||||
select: function(args) {
|
||||
|
|
@ -107,19 +107,6 @@
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
edit: {
|
||||
label: 'label.edit',
|
||||
|
||||
// Blank -- edit is just for tags right now
|
||||
action: function(args) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'Edit ACL item',
|
||||
poll: function(args) { args.complete(); }
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: {
|
||||
label: 'Remove ACL',
|
||||
action: function(args) {
|
||||
|
|
@ -381,6 +368,21 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
viewConsole: {
|
||||
label: 'label.view.console',
|
||||
action: {
|
||||
externalLink: {
|
||||
url: function(args) {
|
||||
return clientConsoleUrl + '?cmd=access&vm=' + args.context.vpcTierInstances[0].id;
|
||||
},
|
||||
title: function(args) {
|
||||
return args.context.vpcTierInstances[0].id.substr(0,8); //title in window.open() can't have space nor longer than 8 characters. Otherwise, IE browser will have error.
|
||||
},
|
||||
width: 820,
|
||||
height: 640
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -448,8 +450,7 @@
|
|||
listAll: true
|
||||
},
|
||||
success: function(json) {
|
||||
items = json.listprivategatewaysresponse.privategateway;
|
||||
args.response.success({ data: items });
|
||||
items = json.listprivategatewaysresponse.privategateway;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -648,19 +649,6 @@
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
edit: {
|
||||
label: 'label.edit',
|
||||
|
||||
// Blank -- edit is just for tags right now
|
||||
action: function(args) {
|
||||
args.response.success({
|
||||
notification: {
|
||||
label: 'Edit static route',
|
||||
poll: function(args) { args.complete(); }
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: {
|
||||
label: 'Remove static route',
|
||||
action: function(args) {
|
||||
|
|
@ -963,7 +951,7 @@
|
|||
$.ajax({
|
||||
url: createURL('listVpnGateways'),
|
||||
data: {
|
||||
vpcid: args.data.vpcid
|
||||
vpcid: args.context.vpc[0].id
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
|
|
@ -990,8 +978,7 @@
|
|||
{_custom:
|
||||
{
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
debugger;
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.vpnconnection;
|
||||
}
|
||||
}
|
||||
|
|
@ -1403,7 +1390,7 @@
|
|||
isMaximized: true,
|
||||
tabs: {
|
||||
details: {
|
||||
title: 'label.details',
|
||||
title: 'label.tier.details',
|
||||
preFilter: function(args) {
|
||||
var hiddenFields = [];
|
||||
var zone;
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,7 @@ public class NetUtils {
|
|||
if (!policy.equals(cipherHash)) {
|
||||
pfsGroup = policy.split(";")[1];
|
||||
}
|
||||
if (pfsGroup != null && !pfsGroup.matches("modp1024|modp1536|")) {
|
||||
if (pfsGroup != null && !pfsGroup.matches("modp1024|modp1536")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,11 +63,13 @@ public class MockComponentLocator extends ComponentLocator {
|
|||
_managerMap = new LinkedHashMap<String, ComponentInfo<Manager>>();
|
||||
_checkerMap = new LinkedHashMap<String, ComponentInfo<SystemIntegrityChecker>>();
|
||||
_adapterMap = new HashMap<String, Adapters<? extends Adapter>>();
|
||||
_pluggableServicesMap = new LinkedHashMap<String, ComponentInfo<PluggableService>>();
|
||||
_factories = new HashMap<Class<?>, Class<?>>();
|
||||
_daoMap.putAll(_library.getDaos());
|
||||
_managerMap.putAll(_library.getManagers());
|
||||
result.second().putAll(_library.getAdapters());
|
||||
_factories.putAll(_library.getFactories());
|
||||
_pluggableServicesMap.putAll(_library.getPluggableServices());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
<!-- ================ -->
|
||||
|
||||
<category name="com.cloud">
|
||||
<priority value="TRACE"/>
|
||||
<priority value="DEBUG"/>
|
||||
</category>
|
||||
|
||||
<!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue