mirror of https://github.com/apache/cloudstack.git
Merge branch '4.2' of https://git-wip-us.apache.org/repos/asf/cloudstack into 4.2
This commit is contained in:
commit
e546fe0e71
2
CHANGES
2
CHANGES
|
|
@ -7,7 +7,7 @@ http://cloudstack.apache.org/docs
|
|||
Version 4.2.0
|
||||
------------------------
|
||||
|
||||
In progress
|
||||
Please check the release notes for details
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
13
LICENSE
13
LICENSE
|
|
@ -306,7 +306,7 @@ Within the scripts/vm/hypervisor/xenserver directory
|
|||
from OpenStack, LLC http://www.openstack.org
|
||||
swift
|
||||
|
||||
Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directories
|
||||
Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2010-2012 Patrick Debois
|
||||
|
|
@ -460,7 +460,7 @@ Within the ui/lib directory
|
|||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2006 - 2011 Jörn Zaefferer
|
||||
Copyright (c) 2006 - 2011 Jörn Zaefferer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -655,7 +655,7 @@ Within the ui/lib/jquery-ui directory
|
|||
Within the ui/lib/qunit directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2012 John Resig, Jörn Zaefferer
|
||||
Copyright (c) 2012 John Resig, Jörn Zaefferer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -686,3 +686,10 @@ Within the utils/src/com/cloud/utils/db directory
|
|||
from Clinton Begin http://code.google.com/p/mybatis/
|
||||
ScriptRunner.java from http://code.google.com/p/mybatis/
|
||||
|
||||
Within the utils/src/org/apache/commons/httpclient/contrib/ssl directory
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2007 The Apache Software Foundation
|
||||
from The Apache Software Foundation http://www.apache.org/
|
||||
EasySSLProtocolSocketFactory.java
|
||||
EasyX509TrustManager.java
|
||||
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
configureSimulator=com.cloud.api.commands.ConfigureSimulator;1
|
||||
configureSimulator=com.cloud.api.commands.ConfigureSimulatorCmd;1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/python
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with 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.
|
||||
from cloudutils.networkConfig import networkConfig
|
||||
from cloudutils.utilities import bash
|
||||
def isOldStyleBridge(brName):
|
||||
if brName.find("cloudVirBr") == 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
def upgradeBridgeName(brName, enslavedDev):
|
||||
print("upgrade bridge: %s, %s"%(brName, enslavedDev))
|
||||
vlanId = brName.replace("cloudVirBr", "")
|
||||
print("find vlan Id: %s"%vlanId)
|
||||
phyDev = enslavedDev.split(".")[0]
|
||||
print("find physical device %s"%phyDev)
|
||||
newBrName = "br" + phyDev + "-" + vlanId
|
||||
print("new bridge name %s"%newBrName)
|
||||
bash("ip link set %s down"%brName)
|
||||
bash("ip link set %s name %s"%(brName, newBrName))
|
||||
bash("ip link set %s up" %newBrName)
|
||||
if __name__ == '__main__':
|
||||
netlib = networkConfig()
|
||||
bridges = netlib.listNetworks()
|
||||
bridges = filter(isOldStyleBridge, bridges)
|
||||
for br in bridges:
|
||||
enslavedDev = netlib.getEnslavedDev(br, 1)
|
||||
if enslavedDev is not None:
|
||||
upgradeBridgeName(br, enslavedDev)
|
||||
|
||||
bridges = netlib.listNetworks()
|
||||
bridges = filter(isOldStyleBridge, bridges)
|
||||
if len(bridges) > 0:
|
||||
print("Warning: upgrade is not finished, still some bridges have the old style name:" + str(bridges))
|
||||
else:
|
||||
print("Upgrade succeed")
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/python
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with 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.
|
||||
import sys
|
||||
from xml.dom.minidom import parse
|
||||
from cloudutils.configFileOps import configFileOps
|
||||
from cloudutils.networkConfig import networkConfig
|
||||
def isOldStyleBridge(brName):
|
||||
if brName.find("cloudVirBr") == 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
def getGuestNetworkDevice():
|
||||
netlib = networkConfig()
|
||||
cfo = configFileOps("/etc/cloudstack/agent/agent.properties")
|
||||
guestDev = cfo.getEntry("guest.network.device")
|
||||
enslavedDev = netlib.getEnslavedDev(guestDev, 1)
|
||||
return enslavedDev
|
||||
def handleMigrateBegin():
|
||||
try:
|
||||
domain = parse(sys.stdin)
|
||||
for interface in domain.getElementsByTagName("interface"):
|
||||
source = interface.getElementsByTagName("source")[0]
|
||||
bridge = source.getAttribute("bridge")
|
||||
if not isOldStyleBridge(bridge):
|
||||
continue
|
||||
vlanId = bridge.replace("cloudVirBr","")
|
||||
phyDev = getGuestNetworkDevice()
|
||||
newBrName="br" + phyDev + "-" + vlanId
|
||||
source.setAttribute("bridge", newBrName)
|
||||
print(domain.toxml())
|
||||
except:
|
||||
pass
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 5:
|
||||
sys.exit(0)
|
||||
|
||||
if sys.argv[2] == "migrate" and sys.argv[3] == "begin":
|
||||
handleMigrateBegin()
|
||||
|
|
@ -94,3 +94,23 @@ domr.scripts.dir=scripts/network/domr/kvm
|
|||
# libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver
|
||||
# network.direct.source.mode=private
|
||||
# network.direct.device=eth0
|
||||
|
||||
# setting to enable the cpu model to kvm guest globally.
|
||||
# three option:custom,host-model and host-passthrough.
|
||||
# custom - user custom the CPU model which specified by guest.cpu.model.
|
||||
# host-model - identify the named CPU model which most closely matches the host,
|
||||
# and then request additional CPU flags to complete the match. This should give
|
||||
# close to maximum functionality/performance, which maintaining good
|
||||
# reliability/compatibility if the guest is migrated to another host with slightly different host CPUs.
|
||||
# host-passthrough - tell KVM to passthrough the host CPU with no modifications.
|
||||
# The difference to host-model, instead of just matching feature flags,
|
||||
# every last detail of the host CPU is matched. This gives absolutely best performance,
|
||||
# and can be important to some apps which check low level CPU details,
|
||||
# but it comes at a cost wrt migration. The guest can only be migrated to
|
||||
# an exactly matching host CPU.
|
||||
#
|
||||
# guest.cpu.mode=custom|host-model|host-passthrough
|
||||
# This param is only valid if guest.cpu.mode=custom,
|
||||
# for examples:"Conroe" "Penryn", "Nehalem", "Westmere", "pentiumpro" and so
|
||||
# on,run virsh capabilities for more details.
|
||||
# guest.cpu.model=
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -126,6 +126,10 @@ public class VolumeTO implements InternalIdentity {
|
|||
public String getChainInfo() {
|
||||
return chainInfo;
|
||||
}
|
||||
|
||||
public void setChainInfo(String chainInfo) {
|
||||
this.chainInfo = chainInfo;
|
||||
}
|
||||
|
||||
public String getOsType() {
|
||||
return guestOsType;
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ public interface DedicatedResources extends InfrastructureEntity, InternalIdenti
|
|||
Long getDomainId();
|
||||
Long getAccountId();
|
||||
String getUuid();
|
||||
|
||||
long getAffinityGroupId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,13 @@ public interface DeploymentPlanner extends Adapter {
|
|||
_podIds.add(podId);
|
||||
}
|
||||
|
||||
public void addPodList(Collection<Long> podList) {
|
||||
if (_podIds == null) {
|
||||
_podIds = new HashSet<Long>();
|
||||
}
|
||||
_podIds.addAll(podList);
|
||||
}
|
||||
|
||||
public void addCluster(long clusterId) {
|
||||
if (_clusterIds == null) {
|
||||
_clusterIds = new HashSet<Long>();
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public interface NetworkService {
|
|||
Long startIndex, Long pageSize, String name);
|
||||
|
||||
PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String> tags,
|
||||
String newVnetRangeString, String state, String removeVlan);
|
||||
String newVnetRangeString, String state);
|
||||
|
||||
boolean deletePhysicalNetwork(Long id);
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public interface VpcGateway extends Identity, ControlledEntity, InternalIdentity
|
|||
/**
|
||||
* @return
|
||||
*/
|
||||
Long getNetworkId();
|
||||
long getNetworkId();
|
||||
|
||||
/**
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with 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.
|
||||
*/
|
||||
package com.cloud.storage;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import com.cloud.agent.api.to.S3TO;
|
||||
|
||||
public interface S3 extends InternalIdentity, Identity {
|
||||
|
||||
String getAccessKey();
|
||||
|
||||
String getSecretKey();
|
||||
|
||||
String getEndPoint();
|
||||
|
||||
String getBucketName();
|
||||
|
||||
Integer getHttpsFlag();
|
||||
|
||||
Integer getConnectionTimeout();
|
||||
|
||||
Integer getMaxErrorRetry();
|
||||
|
||||
Integer getSocketTimeout();
|
||||
|
||||
Date getCreated();
|
||||
|
||||
S3TO toS3TO();
|
||||
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ package com.cloud.storage;
|
|||
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import com.cloud.exception.StorageUnavailableException;
|
||||
import org.apache.cloudstack.api.command.user.volume.*;
|
||||
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
|
|
|
|||
|
|
@ -28,4 +28,6 @@ public interface AffinityGroup extends ControlledEntity, InternalIdentity, Ident
|
|||
|
||||
String getType();
|
||||
|
||||
ACLType getAclType();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,34 @@ public interface AffinityGroupProcessor extends Adapter {
|
|||
*/
|
||||
boolean check(VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination plannedDestination)
|
||||
throws AffinityConflictException;
|
||||
|
||||
/**
|
||||
* isAdminControlledGroup() should return true if the affinity/anti-affinity
|
||||
* group can only be operated on[create/delete/modify] by the Admin
|
||||
*
|
||||
* @return boolean true/false
|
||||
*/
|
||||
boolean isAdminControlledGroup();
|
||||
|
||||
|
||||
/**
|
||||
* canBeSharedDomainWide() should return true if the affinity/anti-affinity
|
||||
* group can be created for a domain and shared by all accounts under the
|
||||
* domain.
|
||||
*
|
||||
* @return boolean true/false
|
||||
*/
|
||||
boolean canBeSharedDomainWide();
|
||||
|
||||
/**
|
||||
* subDomainAccess() should return true if the affinity/anti-affinity group
|
||||
* can be created for a domain and used by the sub-domains. If true, all
|
||||
* accounts under the sub-domains can see this group and use it.
|
||||
*
|
||||
* @return boolean true/false
|
||||
*/
|
||||
boolean subDomainAccess();
|
||||
|
||||
void handleDeleteGroup(AffinityGroup group);
|
||||
|
||||
}
|
||||
|
|
@ -75,4 +75,11 @@ public interface AffinityGroupService {
|
|||
|
||||
boolean isAffinityGroupProcessorAvailable(String affinityGroupType);
|
||||
|
||||
boolean isAdminControlledGroup(AffinityGroup group);
|
||||
|
||||
boolean isAffinityGroupAvailableInDomain(long affinityGroupId, long domainId);
|
||||
|
||||
AffinityGroup createAffinityGroupInternal(String account, Long domainId, String affinityGroupName,
|
||||
String affinityGroupType, String description);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,25 @@ public class AffinityProcessorBase extends AdapterBase implements AffinityGroupP
|
|||
throws AffinityConflictException {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdminControlledGroup() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeSharedDomainWide() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleDeleteGroup(AffinityGroup group) {
|
||||
// TODO Auto-generated method stub
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean subDomainAccess() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,10 +73,8 @@ import com.cloud.projects.ProjectInvitation;
|
|||
import com.cloud.region.ha.GlobalLoadBalancerRule;
|
||||
import com.cloud.server.ResourceTag;
|
||||
import com.cloud.storage.GuestOS;
|
||||
import com.cloud.storage.S3;
|
||||
import com.cloud.storage.Snapshot;
|
||||
import com.cloud.storage.StoragePool;
|
||||
import com.cloud.storage.Swift;
|
||||
import com.cloud.storage.Volume;
|
||||
import com.cloud.storage.snapshot.SnapshotPolicy;
|
||||
import com.cloud.storage.snapshot.SnapshotSchedule;
|
||||
|
|
@ -151,7 +149,6 @@ import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
|
|||
import org.apache.cloudstack.api.response.ResourceCountResponse;
|
||||
import org.apache.cloudstack.api.response.ResourceLimitResponse;
|
||||
import org.apache.cloudstack.api.response.ResourceTagResponse;
|
||||
import org.apache.cloudstack.api.response.S3Response;
|
||||
import org.apache.cloudstack.api.response.SecurityGroupResponse;
|
||||
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
|
||||
import org.apache.cloudstack.api.response.ServiceResponse;
|
||||
|
|
@ -164,7 +161,6 @@ import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
|
|||
import org.apache.cloudstack.api.response.StaticRouteResponse;
|
||||
import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
|
||||
import org.apache.cloudstack.api.response.StoragePoolResponse;
|
||||
import org.apache.cloudstack.api.response.SwiftResponse;
|
||||
import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
|
||||
import org.apache.cloudstack.api.response.SystemVmResponse;
|
||||
import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
|
||||
|
|
@ -349,10 +345,6 @@ public interface ResponseGenerator {
|
|||
|
||||
SystemVmInstanceResponse createSystemVmInstanceResponse(VirtualMachine systemVM);
|
||||
|
||||
SwiftResponse createSwiftResponse(Swift swift);
|
||||
|
||||
S3Response createS3Response(S3 result);
|
||||
|
||||
PhysicalNetworkResponse createPhysicalNetworkResponse(PhysicalNetwork result);
|
||||
|
||||
ServiceResponse createNetworkServiceResponse(Service service);
|
||||
|
|
|
|||
|
|
@ -17,11 +17,9 @@
|
|||
|
||||
package org.apache.cloudstack.api.command.admin.cluster;
|
||||
|
||||
import com.cloud.exception.DiscoveryException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.exception.ResourceInUseException;
|
||||
import com.cloud.org.Cluster;
|
||||
import com.cloud.user.Account;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.ApiErrorCode;
|
||||
|
|
@ -34,8 +32,10 @@ import org.apache.cloudstack.api.response.PodResponse;
|
|||
import org.apache.cloudstack.api.response.ZoneResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.cloud.exception.DiscoveryException;
|
||||
import com.cloud.exception.ResourceInUseException;
|
||||
import com.cloud.org.Cluster;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "addCluster", description="Adds a new cluster", responseObject=ClusterResponse.class)
|
||||
public class AddClusterCmd extends BaseCmd {
|
||||
|
|
@ -87,10 +87,10 @@ public class AddClusterCmd extends BaseCmd {
|
|||
@Parameter(name = ApiConstants.VSWITCH_TYPE_PUBLIC_TRAFFIC, type = CommandType.STRING, required = false, description = "Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)")
|
||||
private String vSwitchTypePublicTraffic;
|
||||
|
||||
@Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC, type = CommandType.STRING, required = false, description = "Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting.")
|
||||
@Parameter(name = ApiConstants.VSWITCH_NAME_GUEST_TRAFFIC, type = CommandType.STRING, required = false, description = "Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting.")
|
||||
private String vSwitchNameGuestTraffic;
|
||||
|
||||
@Parameter(name = ApiConstants.VSWITCH_TYPE_PUBLIC_TRAFFIC, type = CommandType.STRING, required = false, description = "Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting.")
|
||||
@Parameter(name = ApiConstants.VSWITCH_NAME_PUBLIC_TRAFFIC, type = CommandType.STRING, required = false, description = "Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting.")
|
||||
private String vSwitchNamePublicTraffic;
|
||||
|
||||
public String getVSwitchTypeGuestTraffic() {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import org.apache.cloudstack.api.Parameter;
|
|||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.LDAPConfigResponse;
|
||||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
|
|
@ -103,7 +102,7 @@ public class LDAPConfigCmd extends BaseCmd {
|
|||
}
|
||||
|
||||
public void setQueryFilter(String queryFilter) {
|
||||
this.queryFilter=StringEscapeUtils.unescapeHtml(queryFilter);
|
||||
this.queryFilter=queryFilter;
|
||||
}
|
||||
public String getSearchBase() {
|
||||
return searchBase;
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ public class UpdatePhysicalNetworkCmd extends BaseAsyncCmd {
|
|||
|
||||
@Parameter(name=ApiConstants.VLAN, type=CommandType.STRING, description="the VLAN for the physical network")
|
||||
private String vlan;
|
||||
@Parameter(name=ApiConstants.REMOVE_VLAN, type = CommandType.STRING, description ="The vlan range we want to remove")
|
||||
private String removevlan;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
|
|
@ -81,10 +79,6 @@ public class UpdatePhysicalNetworkCmd extends BaseAsyncCmd {
|
|||
return vlan;
|
||||
}
|
||||
|
||||
public String getRemoveVlan(){
|
||||
return removevlan;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
@ -101,7 +95,7 @@ public class UpdatePhysicalNetworkCmd extends BaseAsyncCmd {
|
|||
|
||||
@Override
|
||||
public void execute(){
|
||||
PhysicalNetwork result = _networkService.updatePhysicalNetwork(getId(),getNetworkSpeed(), getTags(), getVlan(), getState(), getRemoveVlan());
|
||||
PhysicalNetwork result = _networkService.updatePhysicalNetwork(getId(),getNetworkSpeed(), getTags(), getVlan(), getState());
|
||||
PhysicalNetworkResponse response = _responseGenerator.createPhysicalNetworkResponse(result);
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ public class ListPortableIpRangesCmd extends BaseListCmd {
|
|||
}
|
||||
rangeResponse.setPortableIpResponses(portableIpResponses);
|
||||
}
|
||||
|
||||
rangeResponse.setObjectName("portableiprange");
|
||||
responses.add(rangeResponse);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class AddImageStoreCmd extends BaseCmd {
|
|||
|
||||
|
||||
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the image store. Example: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss")
|
||||
private Map<String, String> details;
|
||||
private Map details;
|
||||
|
||||
|
||||
|
||||
|
|
@ -81,19 +81,19 @@ public class AddImageStoreCmd extends BaseCmd {
|
|||
return zoneId;
|
||||
}
|
||||
|
||||
public Map<String, String> getDetails() {
|
||||
Map<String, String> detailsMap = null;
|
||||
if (details != null && !details.isEmpty()) {
|
||||
detailsMap = new HashMap<String, String>();
|
||||
Collection<?> props = details.values();
|
||||
Iterator<?> iter = props.iterator();
|
||||
while (iter.hasNext()) {
|
||||
HashMap<String, String> detail = (HashMap<String, String>) iter.next();
|
||||
String key = detail.get("key");
|
||||
String value = detail.get("value");
|
||||
detailsMap.put(key, value);
|
||||
}
|
||||
}
|
||||
public Map<String, String> getDetails() {
|
||||
Map<String, String> detailsMap = null;
|
||||
if (details != null && !details.isEmpty()) {
|
||||
detailsMap = new HashMap<String, String>();
|
||||
Collection<?> props = details.values();
|
||||
Iterator<?> iter = props.iterator();
|
||||
while (iter.hasNext()) {
|
||||
HashMap<String, String> detail = (HashMap<String, String>) iter.next();
|
||||
String key = detail.get("key");
|
||||
String value = detail.get("value");
|
||||
detailsMap.put(key, value);
|
||||
}
|
||||
}
|
||||
return detailsMap;
|
||||
}
|
||||
|
||||
|
|
@ -139,10 +139,10 @@ public class AddImageStoreCmd extends BaseCmd {
|
|||
ImageStore result = _storageService.discoverImageStore(this);
|
||||
ImageStoreResponse storeResponse = null;
|
||||
if (result != null ) {
|
||||
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
||||
storeResponse.setResponseName(getCommandName());
|
||||
storeResponse.setObjectName("imagestore");
|
||||
this.setResponseObject(storeResponse);
|
||||
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
||||
storeResponse.setResponseName(getCommandName());
|
||||
storeResponse.setObjectName("imagestore");
|
||||
this.setResponseObject(storeResponse);
|
||||
} else {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add secondary storage");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,31 +91,44 @@ public final class AddS3Cmd extends BaseCmd {
|
|||
|
||||
@Override
|
||||
public void execute() throws ResourceUnavailableException, InsufficientCapacityException,
|
||||
ServerApiException, ConcurrentOperationException, ResourceAllocationException,
|
||||
NetworkRuleConflictException {
|
||||
ServerApiException, ConcurrentOperationException, ResourceAllocationException,
|
||||
NetworkRuleConflictException {
|
||||
|
||||
AddImageStoreCmd cmd = new AddImageStoreCmd();
|
||||
AddImageStoreCmd cmd = new AddImageStoreCmd() {
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
Map<String, String> dm = new HashMap<String, String>();
|
||||
dm.put(ApiConstants.S3_ACCESS_KEY, getAccessKey());
|
||||
dm.put(ApiConstants.S3_SECRET_KEY, getSecretKey());
|
||||
dm.put(ApiConstants.S3_END_POINT, getEndPoint());
|
||||
dm.put(ApiConstants.S3_BUCKET_NAME, getBucketName());
|
||||
if (getHttpsFlag() != null) {
|
||||
dm.put(ApiConstants.S3_HTTPS_FLAG, getHttpsFlag().toString());
|
||||
}
|
||||
if (getConnectionTimeout() != null) {
|
||||
dm.put(ApiConstants.S3_CONNECTION_TIMEOUT, getConnectionTimeout().toString());
|
||||
}
|
||||
if (getMaxErrorRetry() != null) {
|
||||
dm.put(ApiConstants.S3_MAX_ERROR_RETRY, getMaxErrorRetry().toString());
|
||||
}
|
||||
if (getSocketTimeout() != null) {
|
||||
dm.put(ApiConstants.S3_SOCKET_TIMEOUT, getSocketTimeout().toString());
|
||||
}
|
||||
return dm;
|
||||
}
|
||||
};
|
||||
cmd.setProviderName("S3");
|
||||
Map<String, String> details = new HashMap<String, String>();
|
||||
details.put(ApiConstants.S3_ACCESS_KEY, this.getAccessKey());
|
||||
details.put(ApiConstants.S3_SECRET_KEY, this.getSecretKey());
|
||||
details.put(ApiConstants.S3_END_POINT, this.getEndPoint());
|
||||
details.put(ApiConstants.S3_BUCKET_NAME, this.getBucketName());
|
||||
details.put(ApiConstants.S3_HTTPS_FLAG, this.getHttpsFlag().toString());
|
||||
details.put(ApiConstants.S3_CONNECTION_TIMEOUT, this.getConnectionTimeout().toString());
|
||||
details.put(ApiConstants.S3_MAX_ERROR_RETRY, this.getMaxErrorRetry().toString());
|
||||
details.put(ApiConstants.S3_SOCKET_TIMEOUT, this.getSocketTimeout().toString());
|
||||
|
||||
try{
|
||||
ImageStore result = _storageService.discoverImageStore(cmd);
|
||||
ImageStoreResponse storeResponse = null;
|
||||
if (result != null ) {
|
||||
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
||||
storeResponse.setResponseName(getCommandName());
|
||||
storeResponse.setObjectName("secondarystorage");
|
||||
this.setResponseObject(storeResponse);
|
||||
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
||||
storeResponse.setResponseName(getCommandName());
|
||||
storeResponse.setObjectName("secondarystorage");
|
||||
this.setResponseObject(storeResponse);
|
||||
} else {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add secondary storage");
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add S3 secondary storage");
|
||||
}
|
||||
} catch (DiscoveryException ex) {
|
||||
s_logger.warn("Exception: ", ex);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,13 @@ public class UpdateStoragePoolCmd extends BaseCmd {
|
|||
@Parameter(name=ApiConstants.TAGS, type=CommandType.LIST, collectionType=CommandType.STRING, description="comma-separated list of tags for the storage pool")
|
||||
private List<String> tags;
|
||||
|
||||
@Parameter(name=ApiConstants.CAPACITY_IOPS, type=CommandType.LONG,
|
||||
required=false, description="IOPS CloudStack can provision from this storage pool")
|
||||
private Long capacityIops;
|
||||
|
||||
@Parameter(name=ApiConstants.CAPACITY_BYTES, type=CommandType.LONG,
|
||||
required=false, description="bytes CloudStack can provision from this storage pool")
|
||||
private Long capacityBytes;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
|
|
@ -60,6 +67,14 @@ public class UpdateStoragePoolCmd extends BaseCmd {
|
|||
return tags;
|
||||
}
|
||||
|
||||
public Long getCapacityIops() {
|
||||
return capacityIops;
|
||||
}
|
||||
|
||||
public Long getCapacityBytes() {
|
||||
return capacityBytes;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -0,0 +1,122 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with 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.
|
||||
package org.apache.cloudstack.api.command.admin.swift;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.ApiErrorCode;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd;
|
||||
import org.apache.cloudstack.api.response.ImageStoreResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.exception.DiscoveryException;
|
||||
import com.cloud.storage.ImageStore;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "addSwift", description = "Adds Swift.", responseObject = ImageStoreResponse.class, since="3.0.0")
|
||||
public class AddSwiftCmd extends BaseCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(AddSwiftCmd.class.getName());
|
||||
private static final String s_name = "addswiftresponse";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL for swift")
|
||||
private String url;
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account for swift")
|
||||
private String account;
|
||||
|
||||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "the username for swift")
|
||||
private String username;
|
||||
|
||||
@Parameter(name = ApiConstants.KEY, type = CommandType.STRING, description = " key for the user for swift")
|
||||
private String key;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandName() {
|
||||
return s_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getEntityOwnerId() {
|
||||
return Account.ACCOUNT_ID_SYSTEM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(){
|
||||
AddImageStoreCmd cmd = new AddImageStoreCmd() {
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
Map<String, String> dm = new HashMap<String, String>();
|
||||
dm.put(ApiConstants.ACCOUNT, getAccount());
|
||||
dm.put(ApiConstants.USERNAME, getUsername());
|
||||
dm.put(ApiConstants.KEY, getKey());
|
||||
return dm;
|
||||
}
|
||||
};
|
||||
cmd.setProviderName("Swift");
|
||||
cmd.setUrl(this.getUrl());
|
||||
|
||||
try{
|
||||
ImageStore result = _storageService.discoverImageStore(cmd);
|
||||
ImageStoreResponse storeResponse = null;
|
||||
if (result != null ) {
|
||||
storeResponse = _responseGenerator.createImageStoreResponse(result);
|
||||
storeResponse.setResponseName(getCommandName());
|
||||
storeResponse.setObjectName("secondarystorage");
|
||||
this.setResponseObject(storeResponse);
|
||||
} else {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add Swift secondary storage");
|
||||
}
|
||||
} catch (DiscoveryException ex) {
|
||||
s_logger.warn("Exception: ", ex);
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with 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.
|
||||
package org.apache.cloudstack.api.command.admin.swift;
|
||||
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseListCmd;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd;
|
||||
import org.apache.cloudstack.api.response.ImageStoreResponse;
|
||||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "listSwifts", description = "List Swift.", responseObject = ImageStoreResponse.class, since="3.0.0")
|
||||
public class ListSwiftsCmd extends BaseListCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListSwiftsCmd.class.getName());
|
||||
private static final String s_name = "listswiftsresponse";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "the id of the swift")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getCommandName() {
|
||||
return s_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getEntityOwnerId() {
|
||||
return Account.ACCOUNT_ID_SYSTEM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(){
|
||||
|
||||
ListImageStoresCmd cmd = new ListImageStoresCmd();
|
||||
cmd.setProvider("Swift");
|
||||
ListResponse<ImageStoreResponse> response = _queryService.searchForImageStores(cmd);
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ import org.apache.log4j.Logger;
|
|||
import com.cloud.user.Account;
|
||||
import com.cloud.uservm.UserVm;
|
||||
|
||||
@APICommand(name = "assignVirtualMachine", description="Assign a VM from one account to another under the same domain. This API is available for Basic zones with security groups and Advance zones with guest networks. The VM is restricted to move between accounts under same domain.", responseObject=UserVmResponse.class, since="3.0.0")
|
||||
@APICommand(name = "assignVirtualMachine", description="Change ownership of a VM from one account to another. This API is available for Basic zones with security groups and Advanced zones with guest networks. A root administrator can reassign a VM from any account to any other account in any domain. A domain administrator can reassign a VM to any account in the same domain.", responseObject=UserVmResponse.class, since="3.0.0")
|
||||
public class AssignVMCmd extends BaseCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(AssignVMCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ public class ListCapabilitiesCmd extends BaseCmd {
|
|||
response.setProjectInviteRequired((Boolean)capabilities.get("projectInviteRequired"));
|
||||
response.setAllowUsersCreateProjects((Boolean)capabilities.get("allowusercreateprojects"));
|
||||
response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize"));
|
||||
response.setKVMSnapshotEnabled((Boolean)capabilities.get("KVMSnapshotEnabled"));
|
||||
response.setRegionSecondaryEnabled((Boolean)capabilities.get("regionSecondaryEnabled"));
|
||||
|
||||
if (capabilities.containsKey("apiLimitInterval")) {
|
||||
response.setApiLimitInterval((Integer) capabilities.get("apiLimitInterval"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import org.apache.cloudstack.api.response.UserVmResponse;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.network.IpAddress;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
|
|
@ -127,4 +128,22 @@ public class UpdatePortForwardingRuleCmd extends BaseAsyncCmd {
|
|||
// throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update port forwarding rule");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.networkSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
return getIp().getAssociatedWithNetworkId();
|
||||
}
|
||||
|
||||
private IpAddress getIp() {
|
||||
IpAddress ip = _networkService.getIp(publicIpId);
|
||||
if (ip == null) {
|
||||
throw new InvalidParameterValueException("Unable to find ip address by id " + publicIpId);
|
||||
}
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import java.util.Map;
|
|||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.ApiErrorCode;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseAsyncCreateCmd;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
|
|
@ -30,6 +31,7 @@ import org.apache.cloudstack.api.response.LBStickinessResponse;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.exception.NetworkRuleConflictException;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
|
|
@ -156,5 +158,18 @@ public class CreateLBStickinessPolicyCmd extends BaseAsyncCreateCmd {
|
|||
return "creating a Load Balancer Stickiness policy: " + getLBStickinessPolicyName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.networkSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
LoadBalancer lb = _lbService.findById(getLbRuleId());
|
||||
if (lb == null) {
|
||||
throw new InvalidParameterValueException("Unable to find load balancer rule " + getLbRuleId() + " to create stickiness rule");
|
||||
}
|
||||
return lb.getNetworkId();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.ApiErrorCode;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseAsyncCreateCmd;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
|
|
@ -380,5 +381,14 @@ public class CreateLoadBalancerRuleCmd extends BaseAsyncCreateCmd /*implements
|
|||
return AsyncJob.Type.FirewallRule;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.networkSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
return getNetworkId();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import org.apache.cloudstack.api.response.LoadBalancerResponse;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.network.rules.LoadBalancer;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
|
@ -113,4 +114,18 @@ public class UpdateLoadBalancerRuleCmd extends BaseAsyncCmd {
|
|||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update load balancer rule");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.networkSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
LoadBalancer lb = _lbService.findById(getId());
|
||||
if (lb == null) {
|
||||
throw new InvalidParameterValueException("Unable to find load balancer rule " + getId());
|
||||
}
|
||||
return lb.getNetworkId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,4 +158,14 @@ public class UpdateNetworkCmd extends BaseAsyncCmd {
|
|||
public String getEventType() {
|
||||
return EventTypes.EVENT_NETWORK_UPDATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.networkSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,13 +207,6 @@ public class AuthorizeSecurityGroupIngressCmd extends BaseAsyncCmd {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
if(cidrList != null){
|
||||
for(String cidr : cidrList ){
|
||||
if (!NetUtils.isValidCIDR(cidr)){
|
||||
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, cidr + " is an Invalid CIDR ");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<? extends SecurityRule> ingressRules = _securityGroupService.authorizeSecurityGroupIngress(this);
|
||||
if (ingressRules != null && !ingressRules.isEmpty()) {
|
||||
SecurityGroupResponse response = _responseGenerator.createSecurityGroupResponseFromSecurityGroupRule(ingressRules);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import org.apache.log4j.Logger;
|
|||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.network.security.SecurityGroup;
|
||||
import com.cloud.network.security.SecurityRule;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "revokeSecurityGroupEgress", responseObject = SuccessResponse.class, description = "Deletes a particular egress rule from this security group", since="3.0.0")
|
||||
|
|
@ -67,9 +68,12 @@ public class RevokeSecurityGroupEgressCmd extends BaseAsyncCmd {
|
|||
|
||||
@Override
|
||||
public long getEntityOwnerId() {
|
||||
SecurityGroup group = _entityMgr.findById(SecurityGroup.class, getId());
|
||||
if (group != null) {
|
||||
return group.getAccountId();
|
||||
SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
|
||||
if (rule != null) {
|
||||
SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
|
||||
if (group != null) {
|
||||
return group.getAccountId();
|
||||
}
|
||||
}
|
||||
|
||||
return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import org.apache.log4j.Logger;
|
|||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.network.security.SecurityGroup;
|
||||
import com.cloud.network.security.SecurityRule;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "revokeSecurityGroupIngress", responseObject = SuccessResponse.class, description = "Deletes a particular ingress rule from this security group")
|
||||
|
|
@ -67,9 +68,12 @@ public class RevokeSecurityGroupIngressCmd extends BaseAsyncCmd {
|
|||
|
||||
@Override
|
||||
public long getEntityOwnerId() {
|
||||
SecurityGroup group = _entityMgr.findById(SecurityGroup.class, getId());
|
||||
if (group != null) {
|
||||
return group.getAccountId();
|
||||
SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
|
||||
if (rule != null) {
|
||||
SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
|
||||
if (group != null) {
|
||||
return group.getAccountId();
|
||||
}
|
||||
}
|
||||
|
||||
return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
|
|||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="name of the virtual machine")
|
||||
private String instanceName;
|
||||
private String name;
|
||||
|
||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class,
|
||||
description="the pod ID")
|
||||
|
|
@ -130,8 +130,8 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
|
|||
return id;
|
||||
}
|
||||
|
||||
public String getInstanceName() {
|
||||
return instanceName;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Long getPodId() {
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ public class MigrateVolumeCmd extends BaseAsyncCmd {
|
|||
@Override
|
||||
public void execute(){
|
||||
Volume result;
|
||||
|
||||
result = _volumeService.migrateVolume(this);
|
||||
if (result != null) {
|
||||
VolumeResponse response = _responseGenerator.createVolumeResponse(result);
|
||||
|
|
|
|||
|
|
@ -101,4 +101,13 @@ public class DeleteVPCCmd extends BaseAsyncCmd{
|
|||
return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.vpcSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,4 +106,14 @@ public class RestartVPCCmd extends BaseAsyncCmd{
|
|||
public String getEventDescription() {
|
||||
return "restarting VPC id=" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.vpcSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,4 +105,14 @@ public class UpdateVPCCmd extends BaseAsyncCmd{
|
|||
public String getEventDescription() {
|
||||
return "updating VPC id=" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncObjType() {
|
||||
return BaseAsyncCmd.vpcSyncObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSyncObjId() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,14 @@ package org.apache.cloudstack.api.response;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.EntityReference;
|
||||
|
||||
import com.cloud.serializer.Param;
|
||||
import com.cloud.user.Account;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@EntityReference(value = Account.class)
|
||||
|
|
@ -189,7 +190,7 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou
|
|||
|
||||
@Override
|
||||
public String getObjectId() {
|
||||
return this.id;
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
|
|
@ -351,7 +352,22 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou
|
|||
public void setNetworkAvailable(String networkAvailable) {
|
||||
this.networkAvailable = networkAvailable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVpcLimit(String vpcLimit) {
|
||||
this.vpcLimit = networkLimit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVpcTotal(Long vpcTotal) {
|
||||
this.vpcTotal = vpcTotal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVpcAvailable(String vpcAvailable) {
|
||||
this.vpcAvailable = vpcAvailable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCpuLimit(String cpuLimit) {
|
||||
this.cpuLimit = cpuLimit;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,12 @@ public class CapabilitiesResponse extends BaseResponse {
|
|||
"create disk from disk offering with custom size")
|
||||
private Long diskOffMaxSize;
|
||||
|
||||
@SerializedName("KVMsnapshotenabled") @Param(description = "true if snapshot is supported for KVM host, false otherwise")
|
||||
private boolean KVMSnapshotEnabled;
|
||||
|
||||
@SerializedName("regionsecondaryenabled") @Param(description = "true if region wide secondary is enabled, false otherwise")
|
||||
private boolean regionSecondaryEnabled;
|
||||
|
||||
@SerializedName("apilimitinterval") @Param(description="time interval (in seconds) to reset api count")
|
||||
private Integer apiLimitInterval;
|
||||
|
||||
|
|
@ -81,6 +87,14 @@ public class CapabilitiesResponse extends BaseResponse {
|
|||
this.diskOffMaxSize = diskOffMaxSize;
|
||||
}
|
||||
|
||||
public void setKVMSnapshotEnabled(boolean KVMSnapshotEnabled) {
|
||||
this.KVMSnapshotEnabled = KVMSnapshotEnabled;
|
||||
}
|
||||
|
||||
public void setRegionSecondaryEnabled(boolean regionSecondaryEnabled){
|
||||
this.regionSecondaryEnabled = regionSecondaryEnabled;
|
||||
}
|
||||
|
||||
public void setApiLimitInterval(Integer apiLimitInterval) {
|
||||
this.apiLimitInterval = apiLimitInterval;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,14 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
|
||||
public class CreateCmdResponse extends BaseResponse {
|
||||
|
||||
@SerializedName(ApiConstants.ID)
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ public class NetworkOfferingResponse extends BaseResponse {
|
|||
@SerializedName(ApiConstants.EGRESS_DEFAULT_POLICY) @Param(description="true if network offering supports persistent networks, false otherwise")
|
||||
private Boolean egressDefaultPolicy;
|
||||
|
||||
@SerializedName(ApiConstants.MAX_CONNECTIONS) @Param(description = "maximum number of concurrents connections to be handled by lb")
|
||||
private Integer concurrentConnections;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
|
|
@ -173,4 +175,8 @@ public class NetworkOfferingResponse extends BaseResponse {
|
|||
this.egressDefaultPolicy = egressDefaultPolicy;
|
||||
}
|
||||
|
||||
public void setConcurrentConnections(Integer concurrentConnections) {
|
||||
this.concurrentConnections = concurrentConnections;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
|||
@SerializedName("networkofferingdisplaytext") @Param(description="display text of the network offering the network is created from")
|
||||
private String networkOfferingDisplayText;
|
||||
|
||||
@SerializedName("networkofferingconservemode") @Param(description="true if network offering is ip conserve mode enabled")
|
||||
private Boolean networkOfferingConserveMode;
|
||||
|
||||
@SerializedName("networkofferingavailability") @Param(description="availability of the network offering the network is created from")
|
||||
private String networkOfferingAvailability;
|
||||
|
||||
|
|
@ -247,7 +250,11 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
|||
public void setNetworkOfferingDisplayText(String networkOfferingDisplayText) {
|
||||
this.networkOfferingDisplayText = networkOfferingDisplayText;
|
||||
}
|
||||
|
||||
|
||||
public void setNetworkOfferingConserveMode(Boolean networkOfferingConserveMode) {
|
||||
this.networkOfferingConserveMode = networkOfferingConserveMode;
|
||||
}
|
||||
|
||||
public void setDisplaytext(String displaytext) {
|
||||
this.displaytext = displaytext;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,14 @@ package org.apache.cloudstack.api.response;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.EntityReference;
|
||||
|
||||
import com.cloud.projects.Project;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@EntityReference(value=Project.class)
|
||||
@SuppressWarnings("unused")
|
||||
|
|
@ -182,7 +183,7 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou
|
|||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.ownerName = owner;
|
||||
ownerName = owner;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
|
|
@ -194,7 +195,7 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou
|
|||
}
|
||||
|
||||
public void addTag(ResourceTagResponse tag){
|
||||
this.tags.add(tag);
|
||||
tags.add(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -296,7 +297,22 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou
|
|||
public void setNetworkAvailable(String networkAvailable) {
|
||||
this.networkAvailable = networkAvailable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVpcLimit(String vpcLimit) {
|
||||
this.vpcLimit = networkLimit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVpcTotal(Long vpcTotal) {
|
||||
this.vpcTotal = vpcTotal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVpcAvailable(String vpcAvailable) {
|
||||
this.vpcAvailable = vpcAvailable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCpuLimit(String cpuLimit) {
|
||||
this.cpuLimit = cpuLimit;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ public class RegionResponse extends BaseResponse {
|
|||
@SerializedName(ApiConstants.END_POINT) @Param(description="the end point of the region")
|
||||
private String endPoint;
|
||||
|
||||
@SerializedName("gslbserviceenabled") @Param(description="true if GSLB service is enabled in the region, false otherwise")
|
||||
private boolean gslbServiceEnabled;
|
||||
|
||||
@SerializedName("portableipserviceenabled") @Param(description="true if security groups support is enabled, false otherwise")
|
||||
private boolean portableipServiceEnabled;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -59,4 +65,11 @@ public class RegionResponse extends BaseResponse {
|
|||
this.endPoint = endPoint;
|
||||
}
|
||||
|
||||
}
|
||||
public void setGslbServiceEnabled(boolean gslbServiceEnabled) {
|
||||
this.gslbServiceEnabled = gslbServiceEnabled;
|
||||
}
|
||||
|
||||
public void setPortableipServiceEnabled(boolean portableipServiceEnabled) {
|
||||
this.portableipServiceEnabled = portableipServiceEnabled;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@ public interface ResourceLimitAndCountResponse {
|
|||
|
||||
public void setNetworkAvailable(String networkAvailable);
|
||||
|
||||
public void setVpcLimit(String vpcLimit);
|
||||
|
||||
public void setVpcTotal(Long vpcTotal);
|
||||
|
||||
public void setVpcAvailable(String vpcAvailable);
|
||||
|
||||
public void setCpuLimit(String cpuLimit);
|
||||
|
||||
public void setCpuTotal(Long cpuTotal);
|
||||
|
|
|
|||
|
|
@ -1,218 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with 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.
|
||||
*/
|
||||
package org.apache.cloudstack.api.response;
|
||||
|
||||
import static org.apache.cloudstack.api.ApiConstants.ID;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_ACCESS_KEY;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_BUCKET_NAME;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_CONNECTION_TIMEOUT;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_END_POINT;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_HTTPS_FLAG;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_MAX_ERROR_RETRY;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_SECRET_KEY;
|
||||
import static org.apache.cloudstack.api.ApiConstants.S3_SOCKET_TIMEOUT;
|
||||
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class S3Response extends BaseResponse {
|
||||
|
||||
@SerializedName(ID)
|
||||
@Param(description = "The ID of the S3 configuration")
|
||||
private String id;
|
||||
|
||||
@SerializedName(S3_ACCESS_KEY)
|
||||
@Param(description = "The S3 access key")
|
||||
private String accessKey;
|
||||
|
||||
@SerializedName(S3_SECRET_KEY)
|
||||
@Param(description = "The S3 secret key")
|
||||
private String secretKey;
|
||||
|
||||
@SerializedName(S3_END_POINT)
|
||||
@Param(description = "The S3 end point")
|
||||
private String endPoint;
|
||||
|
||||
@SerializedName(S3_BUCKET_NAME)
|
||||
@Param(description = "The name of the template storage bucket")
|
||||
private String bucketName;
|
||||
|
||||
@SerializedName(S3_HTTPS_FLAG)
|
||||
@Param(description = "Connect to S3 using HTTPS?")
|
||||
private Integer httpsFlag;
|
||||
|
||||
@SerializedName(S3_CONNECTION_TIMEOUT)
|
||||
@Param(description = "The connection timeout (milliseconds)")
|
||||
private Integer connectionTimeout;
|
||||
|
||||
@SerializedName(S3_MAX_ERROR_RETRY)
|
||||
@Param(description = "The maximum number of time to retry a connection on error.")
|
||||
private Integer maxErrorRetry;
|
||||
|
||||
@SerializedName(S3_SOCKET_TIMEOUT)
|
||||
@Param(description = "The connection socket (milliseconds)")
|
||||
private Integer socketTimeout;
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object thatObject) {
|
||||
|
||||
if (this == thatObject) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thatObject == null || this.getClass() != thatObject.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final S3Response thatS3Response = (S3Response) thatObject;
|
||||
|
||||
if (this.httpsFlag != null ? !this.httpsFlag.equals(thatS3Response.httpsFlag) : thatS3Response.httpsFlag != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.accessKey != null ? !this.accessKey.equals(thatS3Response.accessKey) : thatS3Response.accessKey != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.connectionTimeout != null ? !this.connectionTimeout.equals(thatS3Response.connectionTimeout) : thatS3Response.connectionTimeout != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.endPoint != null ? !this.endPoint.equals(thatS3Response.endPoint) : thatS3Response.endPoint != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.id != null ? !this.id.equals(thatS3Response.id) : thatS3Response.id != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.maxErrorRetry != null ? !this.maxErrorRetry.equals(thatS3Response.maxErrorRetry) : thatS3Response.maxErrorRetry != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.secretKey != null ? !this.secretKey.equals(thatS3Response.secretKey) : thatS3Response.secretKey != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.socketTimeout != null ? !this.socketTimeout.equals(thatS3Response.socketTimeout) : thatS3Response.socketTimeout != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.bucketName != null ? !this.bucketName.equals(thatS3Response.bucketName) : thatS3Response.bucketName != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
int result = this.id != null ? this.id.hashCode() : 0;
|
||||
result = 31 * result + (this.accessKey != null ? this.accessKey.hashCode() : 0);
|
||||
result = 31 * result + (this.secretKey != null ? this.secretKey.hashCode() : 0);
|
||||
result = 31 * result + (this.endPoint != null ? this.endPoint.hashCode() : 0);
|
||||
result = 31 * result + (this.bucketName != null ? this.bucketName.hashCode() : 0);
|
||||
result = 31 * result + (this.httpsFlag != null ? this.httpsFlag : 0);
|
||||
result = 31 * result + (this.connectionTimeout != null ? this.connectionTimeout.hashCode() : 0);
|
||||
result = 31 * result + (this.maxErrorRetry != null ? this.maxErrorRetry.hashCode() : 0);
|
||||
result = 31 * result + (this.socketTimeout != null ? this.socketTimeout.hashCode() : 0);
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getObjectId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setObjectId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAccessKey() {
|
||||
return this.accessKey;
|
||||
}
|
||||
|
||||
public void setAccessKey(final String accessKey) {
|
||||
this.accessKey = accessKey;
|
||||
}
|
||||
|
||||
public String getSecretKey() {
|
||||
return this.secretKey;
|
||||
}
|
||||
|
||||
public void setSecretKey(final String secretKey) {
|
||||
this.secretKey = secretKey;
|
||||
}
|
||||
|
||||
public String getEndPoint() {
|
||||
return this.endPoint;
|
||||
}
|
||||
|
||||
public void setEndPoint(final String endPoint) {
|
||||
this.endPoint = endPoint;
|
||||
}
|
||||
|
||||
|
||||
public String getTemplateBucketName() {
|
||||
return this.bucketName;
|
||||
}
|
||||
|
||||
public void setTemplateBucketName(final String templateBucketName) {
|
||||
this.bucketName = templateBucketName;
|
||||
}
|
||||
|
||||
public Integer getHttpsFlag() {
|
||||
return this.httpsFlag;
|
||||
}
|
||||
|
||||
public void setHttpsFlag(final Integer httpsFlag) {
|
||||
this.httpsFlag = httpsFlag;
|
||||
}
|
||||
|
||||
public Integer getConnectionTimeout() {
|
||||
return this.connectionTimeout;
|
||||
}
|
||||
|
||||
public void setConnectionTimeout(final Integer connectionTimeout) {
|
||||
this.connectionTimeout = connectionTimeout;
|
||||
}
|
||||
|
||||
public Integer getMaxErrorRetry() {
|
||||
return this.maxErrorRetry;
|
||||
}
|
||||
|
||||
public void setMaxErrorRetry(final Integer maxErrorRetry) {
|
||||
this.maxErrorRetry = maxErrorRetry;
|
||||
}
|
||||
|
||||
public Integer getSocketTimeout() {
|
||||
return this.socketTimeout;
|
||||
}
|
||||
|
||||
public void setSocketTimeout(final Integer socketTimeout) {
|
||||
this.socketTimeout = socketTimeout;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -20,11 +20,11 @@ import org.apache.cloudstack.api.ApiConstants;
|
|||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.EntityReference;
|
||||
|
||||
import com.cloud.network.security.SecurityGroupRules;
|
||||
import com.cloud.network.security.SecurityRule;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@EntityReference(value = SecurityGroupRules.class)
|
||||
@EntityReference(value = SecurityRule.class)
|
||||
public class SecurityGroupRuleResponse extends BaseResponse {
|
||||
@SerializedName("ruleid") @Param(description="the id of the security group rule")
|
||||
private String ruleId;
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with 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.
|
||||
package org.apache.cloudstack.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SwiftResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.ID)
|
||||
@Param(description = "the ID of swift")
|
||||
private String id;
|
||||
|
||||
@SerializedName(ApiConstants.URL)
|
||||
@Param(description = "url for swift")
|
||||
private String url;
|
||||
|
||||
@SerializedName(ApiConstants.CREATED)
|
||||
@Param(description = "the date and time the host was created")
|
||||
private Date created;
|
||||
|
||||
@SerializedName(ApiConstants.ACCOUNT)
|
||||
@Param(description = "the account for swift")
|
||||
private String account;
|
||||
|
||||
@SerializedName(ApiConstants.ACCOUNT)
|
||||
@Param(description = "the username for swift")
|
||||
private String username;
|
||||
|
||||
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -99,6 +99,10 @@ public class ZoneResponse extends BaseResponse {
|
|||
@SerializedName(ApiConstants.LOCAL_STORAGE_ENABLED) @Param(description="true if local storage offering enabled, false otherwise")
|
||||
private boolean localStorageEnabled;
|
||||
|
||||
@SerializedName(ApiConstants.AFFINITY_GROUP_ID)
|
||||
@Param(description = "the UUID of the affinity group associated, null for public zones")
|
||||
private String affinityGroupId;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
|
@ -198,4 +202,8 @@ public class ZoneResponse extends BaseResponse {
|
|||
public void setIp6Dns2(String ip6Dns2) {
|
||||
this.ip6Dns2 = ip6Dns2;
|
||||
}
|
||||
|
||||
public void setAffinityGroupId(String affinityGroupId) {
|
||||
this.affinityGroupId = affinityGroupId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@ public interface Region {
|
|||
public void setName(String name);
|
||||
|
||||
public String getEndPoint();
|
||||
|
||||
|
||||
public boolean checkIfServiceEnabled(Service service);
|
||||
|
||||
public void enableService(Service service);
|
||||
|
||||
/**
|
||||
* A region level service, is a service that constitute services across one or more zones in the region or a service
|
||||
* made available to all the zones in the region.
|
||||
|
|
@ -45,6 +46,7 @@ public interface Region {
|
|||
private static List<Service> regionServices = new ArrayList<Service>();
|
||||
|
||||
public static final Service Gslb = new Service("Gslb");
|
||||
public static final Service PortableIp = new Service("PortableIp");
|
||||
|
||||
public Service(String name ) {
|
||||
this.name = name;
|
||||
|
|
|
|||
|
|
@ -24,16 +24,12 @@ import org.apache.cloudstack.api.ResponseGenerator;
|
|||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
|
||||
|
||||
import org.apache.cloudstack.api.response.SwiftResponse;
|
||||
import org.apache.cloudstack.api.response.UserVmResponse;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.mockito.Mockito;
|
||||
import static org.mockito.Matchers.anyInt;
|
||||
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -45,6 +41,7 @@ public class ScaleVMCmdTest extends TestCase{
|
|||
@Rule
|
||||
public ExpectedException expectedException = ExpectedException.none();
|
||||
|
||||
@Override
|
||||
@Before
|
||||
public void setUp() {
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<context:annotation-config />
|
||||
|
||||
<context:component-scan base-package="com.amazon, com.cloud" />
|
||||
<context:component-scan base-package="com.amazon, com.cloud.bridge, com.cloud.stack" />
|
||||
|
||||
<!--
|
||||
@DB support
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
@ -69,6 +69,16 @@
|
|||
<artifactId>log4j</artifactId>
|
||||
<version>${cs.log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-syslog-alerts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-snmp-alerts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.neethi</groupId>
|
||||
<artifactId>neethi</artifactId>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,16 @@
|
|||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
label.delete.events=Delete events
|
||||
label.delete.alerts=Delete alerts
|
||||
label.archive.alerts=Archive alerts
|
||||
label.archive.events=Archive events
|
||||
label.by.alert.type=By alert type
|
||||
label.by.event.type=By event type
|
||||
label.by.date.start=By date (start)
|
||||
label.by.date.end=By date (end)
|
||||
label.switch.type=Switch Type
|
||||
label.service.state=Service State
|
||||
label.egress.default.policy=Egress Default Policy
|
||||
label.routing=Routing
|
||||
label.about=About
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -16,7 +16,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -293,7 +293,6 @@
|
|||
<bean id="resourceTagJoinDaoImpl" class="com.cloud.api.query.dao.ResourceTagJoinDaoImpl" />
|
||||
<bean id="resourceTagsDaoImpl" class="com.cloud.tags.dao.ResourceTagsDaoImpl" />
|
||||
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
|
||||
<bean id="s3DaoImpl" class="com.cloud.storage.dao.S3DaoImpl" />
|
||||
<bean id="sSHKeyPairDaoImpl" class="com.cloud.user.dao.SSHKeyPairDaoImpl" />
|
||||
<bean id="secondaryStorageVmDaoImpl" class="com.cloud.vm.dao.SecondaryStorageVmDaoImpl" />
|
||||
<bean id="securityGroupDaoImpl" class="com.cloud.network.security.dao.SecurityGroupDaoImpl" />
|
||||
|
|
@ -354,7 +353,6 @@
|
|||
<bean id="vMTemplateDetailsDaoImpl" class="com.cloud.storage.dao.VMTemplateDetailsDaoImpl" />
|
||||
<bean id="vMTemplateHostDaoImpl" class="com.cloud.storage.dao.VMTemplateHostDaoImpl" />
|
||||
<bean id="vMTemplatePoolDaoImpl" class="com.cloud.storage.dao.VMTemplatePoolDaoImpl" />
|
||||
<bean id="vMTemplateS3DaoImpl" class="com.cloud.storage.dao.VMTemplateS3DaoImpl" />
|
||||
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
|
||||
<bean id="versionDaoImpl" class="com.cloud.upgrade.dao.VersionDaoImpl" />
|
||||
<bean id="virtualRouterProviderDaoImpl" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" />
|
||||
|
|
@ -381,6 +379,7 @@
|
|||
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
|
||||
<bean id="databaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker" />
|
||||
<bean id="domainChecker" class="com.cloud.acl.DomainChecker" />
|
||||
<bean id="affinityGroupAccessChecker" class="com.cloud.acl.AffinityGroupAccessChecker" />
|
||||
|
||||
<!--
|
||||
Authenticators
|
||||
|
|
@ -486,6 +485,10 @@
|
|||
<property name="name" value="XenServerInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KVMInvestigator" class="com.cloud.ha.KVMInvestigator">
|
||||
<property name="name" value="KVMInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
|
||||
<property name="name" value="PingInvestigator"/>
|
||||
</bean>
|
||||
|
|
@ -915,6 +918,8 @@
|
|||
</bean>
|
||||
<bean id="AffinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl">
|
||||
</bean>
|
||||
<bean id="AffinityGroupDomainMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDomainMapDaoImpl">
|
||||
</bean>
|
||||
|
||||
<bean id="PlannerHostReservationDaoImpl" class="com.cloud.deploy.dao.PlannerHostReservationDaoImpl">
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -242,6 +242,10 @@ deleteAlerts=1
|
|||
#### system capacity commands
|
||||
listCapacity=3
|
||||
|
||||
#### swift commands
|
||||
addSwift=1
|
||||
listSwifts=1
|
||||
|
||||
#### s3 commands
|
||||
addS3=1
|
||||
listS3s=1
|
||||
|
|
@ -605,7 +609,7 @@ addBaremetalPxeKickStartServer=1
|
|||
addBaremetalPxePingServer=1
|
||||
addBaremetalDhcp=1
|
||||
listBaremetalDhcp=1
|
||||
listBaremetalPxePingServer=1
|
||||
listBaremetalPxeServers=1
|
||||
|
||||
#### UCS commands
|
||||
addUcsManager=1
|
||||
|
|
@ -613,6 +617,7 @@ listUcsManagers=1
|
|||
listUcsProfiles=1
|
||||
listUcsBlades=1
|
||||
associateUcsProfileToBlade=1
|
||||
removedeleteUcsManager=1
|
||||
|
||||
#### New Load Balancer commands
|
||||
createLoadBalancer=15
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@
|
|||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="affinityGroupAccessChecker"/>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
|
|
@ -173,6 +174,7 @@
|
|||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
<ref bean="KVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
@ -222,7 +224,6 @@
|
|||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@
|
|||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="affinityGroupAccessChecker"/>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
|
|
@ -271,6 +272,7 @@
|
|||
<ref bean="VmwareInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
<ref bean="KVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
@ -321,7 +323,6 @@
|
|||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@
|
|||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="affinityGroupAccessChecker"/>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,10 @@ public class GlobalLoadBalancerConfigCommand extends Command {
|
|||
return revoked;
|
||||
}
|
||||
|
||||
public void setForRevoke(boolean revoke) {
|
||||
this.revoked = revoke;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean executeInSequence() {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1002,6 +1002,41 @@ public class VirtualRoutingResource implements Manager {
|
|||
|
||||
return routerProxy("ipassoc.sh", privateIpAddress, args);
|
||||
}
|
||||
|
||||
public String checkPublicIpsCount(final String vmName,
|
||||
final String privateIpAddress, final String publicIpAddress,
|
||||
final boolean firstIP, final boolean sourceNat,
|
||||
final String vlanId, final String vlanGateway,
|
||||
final String vlanNetmask, final String vifMacAddress, int nicNum, boolean newNic){
|
||||
|
||||
String args = "";
|
||||
args += "-D";
|
||||
|
||||
String cidrSize = Long.toString(NetUtils.getCidrSize(vlanNetmask));
|
||||
if (sourceNat) {
|
||||
args +=" -s";
|
||||
}
|
||||
if (firstIP) {
|
||||
args += " -f";
|
||||
}
|
||||
args += " -l ";
|
||||
args += publicIpAddress + "/" + cidrSize;
|
||||
|
||||
String publicNic = "eth" + nicNum;
|
||||
args += " -c ";
|
||||
args += publicNic;
|
||||
|
||||
args +=" -g ";
|
||||
args += vlanGateway;
|
||||
|
||||
if (newNic) {
|
||||
args += " -n";
|
||||
}
|
||||
args += " -d";
|
||||
|
||||
return routerProxy("ipassoc.sh", privateIpAddress, args);
|
||||
|
||||
}
|
||||
|
||||
private void deleteBridge(String brName) {
|
||||
Script cmd = new Script("/bin/sh", _timeout);
|
||||
|
|
@ -1221,6 +1256,41 @@ public class VirtualRoutingResource implements Manager {
|
|||
return "Unable to connect";
|
||||
}
|
||||
|
||||
public boolean connect(final String ipAddress, int retry, int sleep) {
|
||||
for (int i = 0; i <= retry; i++) {
|
||||
SocketChannel sch = null;
|
||||
try {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Trying to connect to " + ipAddress);
|
||||
}
|
||||
sch = SocketChannel.open();
|
||||
sch.configureBlocking(true);
|
||||
|
||||
final InetSocketAddress addr = new InetSocketAddress(ipAddress, _port);
|
||||
sch.connect(addr);
|
||||
return true;
|
||||
} catch (final IOException e) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Could not connect to " + ipAddress);
|
||||
}
|
||||
} finally {
|
||||
if (sch != null) {
|
||||
try {
|
||||
sch.close();
|
||||
} catch (final IOException e) {}
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(sleep);
|
||||
} catch (final InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
s_logger.debug("Unable to logon to " + ipAddress);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import com.cloud.storage.Volume;
|
|||
|
||||
public class StorageSubsystemCommandHandlerBase implements StorageSubsystemCommandHandler {
|
||||
private static final Logger s_logger = Logger.getLogger(StorageSubsystemCommandHandlerBase.class);
|
||||
private StorageProcessor processor;
|
||||
protected StorageProcessor processor;
|
||||
public StorageSubsystemCommandHandlerBase(StorageProcessor processor) {
|
||||
this.processor = processor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ public class IsoProcessor extends AdapterBase implements Processor {
|
|||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getVirtualSize(File file) {
|
||||
return file.length();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
_storage = (StorageLayer)params.get(StorageLayer.InstanceConfigKey);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ import com.cloud.exception.InternalErrorException;
|
|||
import com.cloud.storage.Storage.ImageFormat;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Generic interface to process different types of image formats
|
||||
* for templates downloaded and for conversion from one format
|
||||
|
|
@ -45,4 +47,7 @@ public interface Processor extends Adapter {
|
|||
public String filename;
|
||||
public boolean isCorrupted;
|
||||
}
|
||||
|
||||
Long getVirtualSize(File file);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,29 @@ public class QCOW2Processor extends AdapterBase implements Processor {
|
|||
return info;
|
||||
}
|
||||
|
||||
public Long getVirtualSize(File file) {
|
||||
FileInputStream strm = null;
|
||||
byte[] b = new byte[8];
|
||||
try {
|
||||
strm = new FileInputStream(file);
|
||||
strm.skip(24);
|
||||
strm.read(b);
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("Unable to read qcow2 file " + file, e);
|
||||
return null;
|
||||
} finally {
|
||||
if (strm != null) {
|
||||
try {
|
||||
strm.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long templateSize = NumbersUtil.bytesToLong(b);
|
||||
return templateSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params)
|
||||
throws ConfigurationException {
|
||||
|
|
|
|||
|
|
@ -68,4 +68,9 @@ public class RawImageProcessor extends AdapterBase implements Processor {
|
|||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getVirtualSize(File file) {
|
||||
return file.length();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,8 +171,8 @@ public class TemplateLocation {
|
|||
if (_props.getProperty("virtualsize") != null) {
|
||||
tmplInfo.size = Long.parseLong(_props.getProperty("virtualsize"));
|
||||
}
|
||||
if (_props.getProperty("physicalSize") != null) {
|
||||
tmplInfo.physicalSize = Long.parseLong(_props.getProperty("physicalSize"));
|
||||
if (_props.getProperty("size") != null) {
|
||||
tmplInfo.physicalSize = Long.parseLong(_props.getProperty("size"));
|
||||
}
|
||||
|
||||
return tmplInfo;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import java.util.Map;
|
|||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.exception.InternalErrorException;
|
||||
|
|
@ -100,6 +101,33 @@ public class VhdProcessor extends AdapterBase implements Processor {
|
|||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getVirtualSize(File file) {
|
||||
FileInputStream strm = null;
|
||||
byte[] currentSize = new byte[8];
|
||||
byte[] creatorApp = new byte[4];
|
||||
try {
|
||||
strm = new FileInputStream(file);
|
||||
strm.skip(file.length() - vhd_footer_size + vhd_footer_creator_app_offset);
|
||||
strm.read(creatorApp);
|
||||
strm.skip(vhd_footer_current_size_offset - vhd_footer_creator_ver_offset);
|
||||
strm.read(currentSize);
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("Unable to read vhd file " + file.getAbsolutePath(), e);
|
||||
throw new CloudRuntimeException("Unable to read vhd file " + file.getAbsolutePath() + ": " + e);
|
||||
} finally {
|
||||
if (strm != null) {
|
||||
try {
|
||||
strm.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long templateSize = NumbersUtil.bytesToLong(currentSize);
|
||||
return templateSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
_name = name;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,17 @@ public class VmdkProcessor extends AdapterBase implements Processor {
|
|||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getVirtualSize(File file) {
|
||||
try {
|
||||
long size = getTemplateVirtualSize(file.getParent(), file.getName());
|
||||
return size;
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
return file.length();
|
||||
}
|
||||
|
||||
public long getTemplateVirtualSize(String templatePath, String templateName) throws InternalErrorException {
|
||||
// get the virtual size from the OVF file meta data
|
||||
long virtualSize=0;
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ install:
|
|||
mkdir $(DESTDIR)/var/log/$(PACKAGE)/agent
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/plugins
|
||||
install -D agent/target/cloud-agent-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/$(PACKAGE)-agent.jar
|
||||
install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
|
||||
install -D agent/target/cloud-agent-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/$(PACKAGE)-agent.jar
|
||||
install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
|
||||
install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
|
||||
install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent
|
||||
install -D agent/target/transformed/cloud-setup-agent $(DESTDIR)/usr/bin/cloudstack-setup-agent
|
||||
|
|
@ -90,7 +90,7 @@ install:
|
|||
mkdir $(DESTDIR)/var/lib/$(PACKAGE)/management
|
||||
mkdir $(DESTDIR)/var/lib/$(PACKAGE)/mnt
|
||||
cp -r client/target/utilities/scripts/db/* $(DESTDIR)/usr/share/$(PACKAGE)-management/setup/
|
||||
cp -r client/target/cloud-client-ui-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/
|
||||
cp -r client/target/cloud-client-ui-$(VERSION)/* $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/
|
||||
cp server/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/
|
||||
cp client/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ install:
|
|||
mkdir $(DESTDIR)/var/log/$(PACKAGE)/usage
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage/plugins
|
||||
install -D usage/target/cloud-usage-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar
|
||||
install -D usage/target/cloud-usage-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar
|
||||
install -D usage/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/
|
||||
cp usage/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/
|
||||
install -D packaging/debian/init/cloud-usage $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-usage
|
||||
|
|
@ -155,7 +155,7 @@ install:
|
|||
mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup
|
||||
ln -s /usr/share/$(PACKAGE)-bridge/webapps/awsapi $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps7080/awsapi
|
||||
cp -r awsapi/target/cloud-awsapi-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi
|
||||
cp -r awsapi/target/cloud-awsapi-$(VERSION)/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi
|
||||
install -D awsapi-setup/setup/cloud-setup-bridge $(DESTDIR)/usr/bin/cloudstack-setup-bridge
|
||||
install -D awsapi-setup/setup/cloudstack-aws-api-register $(DESTDIR)/usr/bin/cloudstack-aws-api-register
|
||||
cp -r awsapi-setup/db/mysql/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>xapi</artifactId>
|
||||
<version>5.6.100-1-SNAPSHOT</version>
|
||||
<version>5.6.100-1</version>
|
||||
<name>Apache XenSource XAPI</name>
|
||||
<description>XenSource XAPI Java Bindings</description>
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<version>4.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<!-- specify the dependent jdbc driver here -->
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@
|
|||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<bookinfo id="book-release-notes-4.1">
|
||||
<title>Version 4.1.0 Release Notes</title>
|
||||
<productname>Apache CloudStack</productname>
|
||||
<bookinfo id="book-release-notes-4.2">
|
||||
<title>Version 4.2.0 Release Notes</title>
|
||||
<productname>Apache &PRODUCT;</productname>
|
||||
<productnumber/>
|
||||
<pubsnumber/>
|
||||
<abstract>
|
||||
<para>Release notes for the Apache CloudStack 4.1.0 release.</para>
|
||||
<para>Release notes for the Apache &PRODUCT; 4.2.0 release.</para>
|
||||
</abstract>
|
||||
<corpauthor>
|
||||
<inlinemediaobject>
|
||||
|
|
@ -50,6 +50,8 @@
|
|||
<xi:include href="whats-new.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="api-calls.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="working-with-usage-data.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="storage-plugins.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="third-party-ui-plugin.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="working-with-documentation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="tools.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="event-types.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -24,9 +24,12 @@
|
|||
|
||||
<section id="about-primary-storage">
|
||||
<title>About Primary Storage</title>
|
||||
<para>Primary storage is associated with a cluster, and it stores the disk volumes for all the VMs running on hosts in that cluster. You can add multiple primary storage servers to a cluster. At least one is required. It is typically located close to the hosts for increased performance.</para>
|
||||
<para>Primary storage is associated with a cluster and/or a zone. It stores the disk volumes for all of the VMs running on hosts in that cluster. You can add multiple primary storage servers to a cluster or a zone (at least one is required at the cluster level). Primary storage is typically located close to the hosts for increased performance. &PRODUCT; manages the allocation of guest virtual disks to particular primary storage devices.</para>
|
||||
<para>Primary storage uses the concept of a storage tag. A storage tag is a label that is used to identify the primary storage. Each primary storage can be associated with zero, one, or more storage tags. When a VM is spun up or a data disk attached to a VM for the first time, these tags, if supplied, are used to determine which primary storage can support the VM or data disk (ex. say you need to guarantee a certain number of IOPS to a particular volume).</para>
|
||||
<para>Primary storage can be either static or dynamic. Static primary storage is what CloudStack has traditionally supported. In this model, the administrator must present CloudStack with a certain amount of preallocated storage (ex. a volume from a SAN) and CloudStack can place many of its volumes on this storage. In the newer, dynamic model, the administrator can present CloudStack with a storage system itself (ex. a SAN). CloudStack, working in concert with a plug-in developed for that storage system, can dynamically create volumes on the storage system. A valuable use for this ability is Quality of Service (QoS). If a volume created in CloudStack can be backed by a dedicated volume on a SAN (i.e. a one-to-one mapping between a SAN volume and a CloudStack volume) and the SAN provides QoS, then CloudStack can provide QoS.</para>
|
||||
<para>&PRODUCT; is designed to work with all standards-compliant iSCSI and NFS servers that are supported by the underlying hypervisor, including, for example:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>SolidFire for iSCSI</para></listitem>
|
||||
<listitem><para>Dell EqualLogic™ for iSCSI</para></listitem>
|
||||
<listitem><para>Network Appliances filers for NFS and iSCSI</para></listitem>
|
||||
<listitem><para>Scale Computing for NFS</para></listitem>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
</imageobject>
|
||||
<textobject><phrase>region-overview.png: Nested structure of a region.</phrase></textobject>
|
||||
</mediaobject>
|
||||
<para>Regions are visible to the end user. When a user starts a guest VM, the user must select a region for their guest.
|
||||
Users might also be required to copy their private templates to additional regions to enable creation of guest VMs using their templates in those regions.</para>
|
||||
<para>Regions are visible to the end user. When a user starts a guest VM on a particular &PRODUCT; Management Server,
|
||||
the user is implicitly selecting that region for their guest.
|
||||
Users might also be required to copy their private templates to additional regions to enable creation of guest VMs using their templates in those regions.</para>
|
||||
</section>
|
||||
|
|
@ -24,12 +24,28 @@
|
|||
|
||||
<section id="about-secondary-storage">
|
||||
<title>About Secondary Storage</title>
|
||||
<para>Secondary storage is associated with a zone, and it stores the following:</para>
|
||||
<para>Secondary storage stores the following:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Templates — OS images that can be used to boot VMs and can include additional configuration information, such as installed applications</para></listitem>
|
||||
<listitem><para>ISO images — disc images containing data or bootable media for operating systems</para></listitem>
|
||||
<listitem><para>Disk volume snapshots — saved copies of VM data which can be used for data recovery or to create new templates</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>The items in zone-based NFS secondary storage are available to all hosts in the zone. &PRODUCT; manages the allocation of guest virtual disks to particular primary storage devices.</para>
|
||||
<para>To make items in secondary storage available to all hosts throughout the cloud, you can add OpenStack Object Storage (Swift, <ulink url="http://swift.openstack.org">swift.openstack.org</ulink>) in addition to the zone-based NFS secondary storage. When using Swift, you configure Swift storage for the entire &PRODUCT;, then set up NFS secondary storage for each zone as usual. The NFS storage in each zone acts as a staging area through which all templates and other secondary storage data pass before being forwarded to Swift. The Swift storage acts as a cloud-wide resource, making templates and other data available to any zone in the cloud. There is no hierarchy in the Swift storage, just one Swift container per storage object. Any secondary storage in the whole cloud can pull a container from Swift at need. It is not necessary to copy templates and snapshots from one zone to another, as would be required when using zone NFS alone. Everything is available everywhere.</para>
|
||||
<para>The items in secondary storage are available to all hosts in the scope of
|
||||
the secondary storage, which may be defined as per zone or per region.</para>
|
||||
<para>To make items in secondary storage available to all hosts throughout the cloud, you can
|
||||
add object storage in addition to the
|
||||
zone-based NFS Secondary Staging Store.
|
||||
It is not necessary to
|
||||
copy templates and snapshots from one zone to another, as would be required when using zone
|
||||
NFS alone. Everything is available everywhere.</para>
|
||||
<para>&PRODUCT; provides plugins that enable both
|
||||
OpenStack Object Storage (Swift,
|
||||
<ulink url="http://swift.openstack.org">swift.openstack.org</ulink>)
|
||||
and Amazon Simple Storage Service (S3) object storage.
|
||||
When using one of these storage plugins, you configure Swift or S3 storage for
|
||||
the entire &PRODUCT;, then set up the NFS Secondary Staging Store for each zone. The NFS
|
||||
storage in each zone acts as a staging area through which all templates and other secondary
|
||||
storage data pass before being forwarded to Swoft or S3.
|
||||
The backing object storage acts as a cloud-wide
|
||||
resource, making templates and other data available to any zone in the cloud.</para>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
<para>A zone consists of:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>One or more pods. Each pod contains one or more clusters of hosts and one or more primary storage servers.</para></listitem>
|
||||
<listitem><para>A zone may contain one or more primary storage servers, which are shared by all the pods in the zone.</para></listitem>
|
||||
<listitem><para>Secondary storage, which is shared by all the pods in the zone.</para></listitem>
|
||||
</itemizedlist>
|
||||
<mediaobject>
|
||||
|
|
@ -45,12 +46,29 @@
|
|||
<para>Hosts in the same zone are directly accessible to each other without having to go through a firewall. Hosts in different zones can access each other through statically configured VPN tunnels.</para>
|
||||
<para>For each zone, the administrator must decide the following.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>How many pods to place in a zone.</para></listitem>
|
||||
<listitem><para>How many pods to place in each zone.</para></listitem>
|
||||
<listitem><para>How many clusters to place in each pod.</para></listitem>
|
||||
<listitem><para>How many hosts to place in each cluster.</para></listitem>
|
||||
<listitem><para>How many primary storage servers to place in each cluster and total capacity for the storage servers.</para></listitem>
|
||||
<listitem><para>(Optional) How many primary storage servers to place in each zone and total capacity for these storage servers.</para></listitem>
|
||||
<listitem><para>How many primary storage servers to place in each cluster and total capacity for these storage servers.</para></listitem>
|
||||
<listitem><para>How much secondary storage to deploy in a zone.</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>When you add a new zone using the &PRODUCT; UI, you will be prompted to configure the zone’s physical network
|
||||
and add the first pod, cluster, host, primary storage, and secondary storage.</para>
|
||||
<para>In order to support zone-wide functions for VMware, &PRODUCT; is aware of VMware Datacenters and can map each Datacenter to a
|
||||
&PRODUCT; zone. To enable features like storage live migration and zone-wide
|
||||
primary storage for VMware hosts, &PRODUCT; has to make sure that a zone
|
||||
contains only a single VMware Datacenter. Therefore, when you are creating a new
|
||||
&PRODUCT; zone, you can select a VMware Datacenter for the zone. If you
|
||||
are provisioning multiple VMware Datacenters, each one will be set up as a single zone
|
||||
in &PRODUCT;. </para>
|
||||
<note>
|
||||
<para>If you are upgrading from a previous &PRODUCT; version, and your existing
|
||||
deployment contains a zone with clusters from multiple VMware Datacenters, that zone
|
||||
will not be forcibly migrated to the new model. It will continue to function as
|
||||
before. However, any new zone-wide operations, such as zone-wide primary storage
|
||||
and live storage migration, will
|
||||
not be available in that zone.</para>
|
||||
</note>
|
||||
<para/>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
]>
|
||||
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with 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.
|
||||
-->
|
||||
|
||||
<section id="accessing-system-vms">
|
||||
<title>Accessing System VMs</title>
|
||||
<para>It may sometimes be necessary to access System VMs for diagnostics of certain issues, for example if you are experiencing SSVM (Secondary Storage VM) connection issues. Use the steps below in order to connect to the SSH console of a running System VM.</para>
|
||||
<para>
|
||||
Accessing System VMs over the network requires the use of private keys and connecting to System VMs SSH Daemon on port 3922.
|
||||
XenServer/KVM Hypervisors store this key at /root/.ssh/id_rsa.cloud on each &PRODUCT; agent.
|
||||
To access System VMs running on ESXi, the key is stored on the management server at /var/lib/cloudstack/management/.ssh/id_rsa.
|
||||
</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Find the details of the System VM</para>
|
||||
<orderedlist numeration="loweralpha">
|
||||
<listitem><para>Log in with admin privileges to the &PRODUCT; UI.</para></listitem>
|
||||
<listitem><para>Click Infrastructure, then System VMs, and then click the name of a running VM.</para></listitem>
|
||||
<listitem><para>Take a note of the 'Host', 'Private IP Address' and 'Link Local IP Address' of the System VM you wish to access.</para></listitem>
|
||||
</orderedlist>
|
||||
<para><inlinegraphic format="PNG" fileref="images/view-systemvm-details.png"/></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>XenServer/KVM Hypervisors</para>
|
||||
<orderedlist numeration="loweralpha">
|
||||
<listitem><para>Connect to the Host of which the System VM is running.</para></listitem>
|
||||
<listitem><para>SSH the 'Link Local IP Address' of the System VM from the Host on which the VM is running.</para></listitem>
|
||||
<listitem><para>Format: ssh -i <path-to-private-key> <link-local-ip> -p 3922</para></listitem>
|
||||
<listitem><para>Example: root@faith:~# ssh -i /root/.ssh/id_rsa.cloud 169.254.3.93 -p 3922</para></listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>ESXi Hypervisors</para>
|
||||
<orderedlist numeration="loweralpha">
|
||||
<listitem><para>Connect to your &PRODUCT; Management Server.</para></listitem>
|
||||
<listitem><para>ESXi users should SSH to the private IP address of the System VM.</para></listitem>
|
||||
<listitem><para>Format: ssh -i <path-to-private-key> <vm-private-ip> -p 3922</para></listitem>
|
||||
<listitem><para>Example: root@management:~# ssh -i /var/lib/cloudstack/management/.ssh/id_rsa 172.16.0.250 -p 3922</para></listitem>
|
||||
</orderedlist>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
|
@ -46,8 +46,88 @@
|
|||
<title>Root Administrator</title>
|
||||
<para>Root administrators have complete access to the system, including managing templates, service offerings, customer care administrators, and domains</para>
|
||||
</formalpara>
|
||||
<para>The resources belong to the account, not individual users in that account. For example,
|
||||
billing, resource limits, and so on are maintained by the account, not the users. A user can
|
||||
operate on any resource in the account provided the user has privileges for that operation.
|
||||
The privileges are determined by the role.</para>
|
||||
<formalpara>
|
||||
<title>Resource Ownership</title>
|
||||
<para>Resources belong to the account, not individual users in that account. For example,
|
||||
billing, resource limits, and so on are maintained by the account, not the users. A user
|
||||
can operate on any resource in the account provided the user has privileges for that
|
||||
operation. The privileges are determined by the role. A root administrator can change
|
||||
the ownership of any virtual machine from one account to any other account by using the
|
||||
assignVirtualMachine API. A domain or sub-domain administrator can do the same for VMs
|
||||
within the domain from one account to any other account in the domain or any of its
|
||||
sub-domains.</para>
|
||||
</formalpara>
|
||||
<section id="dedicated-host-cluster-pod">
|
||||
<title>Dedicating Resources to Accounts and Domains</title>
|
||||
<para>The root administrator can dedicate resources to a specific domain or account
|
||||
that needs private infrastructure for additional security or performance guarantees.
|
||||
A zone, pod, cluster, or host can be reserved by the root administrator for a specific domain or account.
|
||||
Only users in that domain or its subdomain may use the infrastructure.
|
||||
For example, only users in a given domain can create guests in a zone dedicated to that domain.</para>
|
||||
<para>There are several types of dedication available:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Explicit dedication. A zone, pod, cluster, or host is dedicated to an account or
|
||||
domain by the root administrator during initial deployment and
|
||||
configuration.</para></listitem>
|
||||
<listitem><para>Strict implicit dedication. A host will not be shared across multiple accounts. For example,
|
||||
strict implicit dedication is useful for deployment of certain types of
|
||||
applications, such as desktops, where no host can be shared
|
||||
between different accounts without violating the desktop software's terms of license.</para></listitem>
|
||||
<listitem><para>Preferred implicit dedication. The VM will be deployed in dedicated infrastructure if
|
||||
possible. Otherwise, the VM can be deployed in shared
|
||||
infrastructure.</para></listitem>
|
||||
</itemizedlist>
|
||||
<section id="dedication-how-to">
|
||||
<title>How to Dedicate a Zone, Cluster, Pod, or Host to an Account or Domain</title>
|
||||
<para>For explicit dedication: When deploying a new zone, pod, cluster, or host, the
|
||||
root administrator can click the Dedicated checkbox, then choose a domain or account
|
||||
to own the resource.</para>
|
||||
<para>To explicitly dedicate an existing zone, pod, cluster, or host: log in as the root admin,
|
||||
find the resource in the UI, and click the Dedicate button. <inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/dedicate-resource-button.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>dedicate-resource-button.png: button to dedicate a zone, pod, cluster, or host</phrase>
|
||||
</textobject>
|
||||
</inlinemediaobject></para>
|
||||
<para>For implicit dedication: The administrator creates a compute service offering and
|
||||
in the Deployment Planner field, chooses ImplicitDedicationPlanner. Then in Planner
|
||||
Mode, the administrator specifies either Strict or Preferred, depending on whether
|
||||
it is permissible to allow some use of shared resources when dedicated resources are
|
||||
not available. Whenever a user creates a VM based on this service offering, it is
|
||||
allocated on one of the dedicated hosts.</para>
|
||||
</section>
|
||||
<section id="using-dedication-how-to">
|
||||
<title>How to Use Dedicated Hosts</title>
|
||||
<para>To use an explicitly dedicated host, use the explicit-dedicated type of affinity
|
||||
group (see <xref linkend="affinity-groups"/>). For example, when creating a new VM,
|
||||
an end user can choose to place it on dedicated infrastructure. This operation will
|
||||
succeed only if some infrastructure has already been assigned as dedicated to the
|
||||
user's account or domain.</para>
|
||||
</section>
|
||||
<section id="dedicated-infrastructure-behavior">
|
||||
<title>Behavior of Dedicated Hosts, Clusters, Pods, and Zones</title>
|
||||
<para>The administrator can live migrate VMs away from dedicated hosts if desired, whether the destination
|
||||
is a host reserved for a different account/domain or a host that is shared (not dedicated to any particular account or domain).
|
||||
&PRODUCT; will generate an alert, but the operation is allowed.</para>
|
||||
<para>Dedicated hosts can be used in conjunction with host tags. If both a host tag and dedication are requested,
|
||||
the VM will be placed only on a host that meets both requirements. If there is no dedicated resource available
|
||||
to that user that also has the host tag requested by the user, then the VM will not deploy.</para>
|
||||
<para>If you delete an account or domain, any hosts, clusters, pods, and zones that were
|
||||
dedicated to it are freed up. They will now be available to be shared by any account
|
||||
or domain, or the administrator may choose to re-dedicate them to a different
|
||||
account or domain.</para>
|
||||
<para>System VMs and virtual routers affect the behavior of host dedication.
|
||||
System VMs and virtual routers are owned by the &PRODUCT; system account,
|
||||
and they can be deployed on any host. They do not adhere to explicit dedication.
|
||||
The presence of system vms and virtual routers on a host makes it unsuitable for strict implicit dedication.
|
||||
The host can not be used for strict implicit dedication,
|
||||
because the host already has VMs of a specific account (the default system account).
|
||||
However, a host with system VMs or virtual routers can be used
|
||||
for preferred implicit dedication.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -135,25 +135,85 @@
|
|||
<para>You might want to deploy multiple VPCs with the same super CIDR and guest tier CIDR.
|
||||
Therefore, multiple guest VMs from different VPCs can have the same IPs to reach a enterprise
|
||||
data center through the private gateway. In such cases, a NAT service need to be configured on
|
||||
the private gateway. If Source NAT is enabled, the guest VMs in VPC reaches the enterprise
|
||||
network via private gateway IP address by using the NAT service. </para>
|
||||
the private gateway to avoid IP conflicts. If Source NAT is enabled, the guest VMs in VPC
|
||||
reaches the enterprise network via private gateway IP address by using the NAT service. </para>
|
||||
<para>The Source NAT service on a private gateway can be enabled while adding the private
|
||||
gateway. On deletion of a private gateway, source NAT rules specific to the private gateway
|
||||
are deleted.</para>
|
||||
<para>To enable source NAT on existing private gateways, delete them and create afresh with
|
||||
source NAT. </para>
|
||||
</section>
|
||||
<section id="acl-private-gateway">
|
||||
<title>ACL on Private Gateway</title>
|
||||
<para>The traffic on the VPC private gateway is controlled by creating both ingress and egress
|
||||
network ACL rules. The ACLs contains both allow and deny rules. In addition to the default ACL
|
||||
rules, rules you might have created are also listed in the ACL drop-down list. As per the
|
||||
rule, all the ingress traffic to the private gateway interface and all the egress traffic out
|
||||
from the private gateway interface are blocked. You can change this default behaviour while
|
||||
creating a private gateway.</para>
|
||||
network ACL rules. The ACLs contains both allow and deny rules. As per the rule, all the
|
||||
ingress traffic to the private gateway interface and all the egress traffic out from the
|
||||
private gateway interface are blocked. </para>
|
||||
<para>You can change this default behaviour while creating a private gateway. Alternatively, you
|
||||
can do the following:</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>In a VPC, identify the Private Gateway you want to work with.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Private Gateway page, do either of the following:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Use the Quickview. See <xref linkend="quickview"/>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the Details tab. See <xref linkend="details-tab"/> through .</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem id="quickview">
|
||||
<para>In the Quickview of the selected Private Gateway, click Replace ACL, select the ACL
|
||||
rule, then click OK</para>
|
||||
</listitem>
|
||||
<listitem id="details-tab">
|
||||
<para>Click the IP address of the Private Gateway you want to work with.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Detail tab, click the Replace ACL button. <inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/replace-acl-icon.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>replace-acl-icon.png: button to replace the default ACL behaviour.</phrase>
|
||||
</textobject>
|
||||
</inlinemediaobject></para>
|
||||
<para>The Replace ACL dialog is displayed.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>select the ACL rule, then click OK.</para>
|
||||
<para>Wait for few seconds. You can see that the new ACL rule is displayed in the Details
|
||||
page.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section id="static-route">
|
||||
<title>Creating a Static Route</title>
|
||||
<para>&PRODUCT; enables you to specify routing for the VPN connection you create. You can enter
|
||||
one or CIDR addresses to indicate which traffic is to be routed back to the gateway.</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>In a VPC, identify the Private Gateway you want to work with.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Private Gateway page, click the IP address of the Private Gateway you want to
|
||||
work with.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Select the Static Routes tab.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Specify the CIDR of destination network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Add.</para>
|
||||
<para>Wait for few seconds until the new route is created.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section id="blacklist-route">
|
||||
<title>Blacklisting Routes</title>
|
||||
|
|
|
|||
|
|
@ -19,85 +19,106 @@
|
|||
under the License.
|
||||
-->
|
||||
<section id="add-ip-range">
|
||||
<title>Adding Multiple IP Ranges</title>
|
||||
<note>
|
||||
<para>The feature can only be implemented on IPv4 addresses.</para>
|
||||
</note>
|
||||
<title>Multiple Subnets in Shared Network</title>
|
||||
<para>&PRODUCT; provides you with the flexibility to add guest IP ranges from different subnets in
|
||||
Basic zones and security groups-enabled Advanced zones. For security groups-enabled Advanced
|
||||
zones, it implies multiple subnets can be added to the same VLAN. With the addition of this
|
||||
feature, you will be able to add IP address ranges from the same subnet or from a different one
|
||||
when IP address are exhausted. This would in turn allows you to employ higher number of subnets
|
||||
and thus reduce the address management overhead.</para>
|
||||
<para>Ensure that you manually configure the gateway of the new subnet before adding the IP range.
|
||||
Note that &PRODUCT; supports only one gateway for a subnet; overlapping subnets are not
|
||||
currently supported.</para>
|
||||
<para>You can also delete IP ranges. This operation fails if an IP from the remove range is in
|
||||
use. If the remove range contains the IP address on which the DHCP server is running, &PRODUCT;
|
||||
acquires a new IP from the same subnet. If no IP is available in the subnet, the remove
|
||||
operation fails.</para>
|
||||
<para>This feature is supported on KVM, xenServer, and VMware hypervisors.</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation, choose Infrastructure. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>On Zones, click View More, then click the zone to which you want to work with..</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Physical Network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Guest node of the diagram, click Configure.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Networks.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Select the networks you want to work with.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click View IP Ranges.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Add IP Range.</para>
|
||||
<para>The Add IP Range dialog is displayed, as follows:</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/add-ip-range.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>add-ip-range.png: adding an IP range to a network.</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Specify the following:</para>
|
||||
<para>All the fields are mandatory.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Gateway</emphasis>: The gateway for the tier you create.
|
||||
Ensure that the gateway is within the Super CIDR range that you specified while creating
|
||||
the VPC, and is not overlapped with the CIDR of any existing tier within the VPC.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Netmask</emphasis>: The netmask for the tier you create. </para>
|
||||
<para>For example, if the VPC CIDR is 10.0.0.0/16 and the network tier CIDR is
|
||||
10.0.1.0/24, the gateway of the tier is 10.0.1.1, and the netmask of the tier is
|
||||
255.255.255.0.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Start IP/ End IP</emphasis>: A range of IP addresses that are
|
||||
accessible from the Internet and will be allocated to guest VMs. Enter the first and
|
||||
last IP addresses that define a range that &PRODUCT; can assign to guest VMs .</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click OK.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
and thus reduce the address management overhead. You can delete the IP ranges you have
|
||||
added.</para>
|
||||
<section id="guidelines-multiplesubnet">
|
||||
<title>Prerequisites and Guidelines</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>This feature can only be implemented:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>on IPv4 addresses</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>if virtual router is the DHCP provider</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>on KVM, xenServer, and VMware hypervisors</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Manually configure the gateway of the new subnet before adding the IP range. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&PRODUCT; supports only one gateway for a subnet; overlapping subnets are not
|
||||
currently supported</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="how-to-add-ip">
|
||||
<title>Adding Multiple Subnets to a Shared Network</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation, choose Infrastructure. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>On Zones, click View More, then click the zone to which you want to work with..</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Physical Network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Guest node of the diagram, click Configure.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Networks.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Select the networks you want to work with.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click View IP Ranges.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click Add IP Range.</para>
|
||||
<para>The Add IP Range dialog is displayed, as follows:</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/add-ip-range.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>add-ip-range.png: adding an IP range to a network.</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Specify the following:</para>
|
||||
<para>All the fields are mandatory.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Gateway</emphasis>: The gateway for the tier you create.
|
||||
Ensure that the gateway is within the Super CIDR range that you specified while
|
||||
creating the VPC, and is not overlapped with the CIDR of any existing tier within the
|
||||
VPC.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Netmask</emphasis>: The netmask for the tier you create. </para>
|
||||
<para>For example, if the VPC CIDR is 10.0.0.0/16 and the network tier CIDR is
|
||||
10.0.1.0/24, the gateway of the tier is 10.0.1.1, and the netmask of the tier is
|
||||
255.255.255.0.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Start IP/ End IP</emphasis>: A range of IP addresses that
|
||||
are accessible from the Internet and will be allocated to guest VMs. Enter the first
|
||||
and last IP addresses that define a range that &PRODUCT; can assign to guest VMs
|
||||
.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click OK.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,22 @@
|
|||
<para><emphasis role="bold">AutoScale</emphasis>: Click Configure and complete the
|
||||
AutoScale configuration as explained in <xref linkend="autoscale"/>.</para>
|
||||
</listitem>
|
||||
<listitem><para><emphasis role="bold">Health Check</emphasis>: (Optional; NetScaler load balancers only)
|
||||
Click Configure and fill in the characteristics of the health check policy.
|
||||
See <xref linkend="health-checks-for-lb-rules"/>.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis role="bold">Ping path (Optional)</emphasis>: Sequence of destinations to which to send health check queries.
|
||||
Default: / (all).</para></listitem>
|
||||
<listitem><para><emphasis role="bold">Response time (Optional)</emphasis>: How long to wait for a response from the health check (2 - 60 seconds).
|
||||
Default: 5 seconds.</para></listitem>
|
||||
<listitem><para><emphasis role="bold">Interval time (Optional)</emphasis>: Amount of time between health checks (1 second - 5 minutes).
|
||||
Default value is set in the global configuration parameter lbrule_health check_time_interval.</para></listitem>
|
||||
<listitem><para><emphasis role="bold">Healthy threshold (Optional)</emphasis>: Number of consecutive health check successes
|
||||
that are required before declaring an instance healthy.
|
||||
Default: 2.</para></listitem>
|
||||
<listitem><para><emphasis role="bold">Unhealthy threshold (Optional)</emphasis>: Number of consecutive health check failures that are required before declaring an instance unhealthy.
|
||||
Default: 10.</para></listitem>
|
||||
</itemizedlist></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
</section>
|
||||
<section id="ext-lb-offering">
|
||||
<title>Creating a Network Offering for External LB</title>
|
||||
<para>To have internal LB support on VPC, create a network offering as follows: </para>
|
||||
<para>To have external LB support on VPC, create a network offering as follows: </para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as a user or admin.</para>
|
||||
|
|
@ -111,12 +111,16 @@
|
|||
Indicate whether a VLAN should be specified when this offering is used.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Supported Services</emphasis>: Select Load Balancer.
|
||||
Select <code>InternalLbVM</code> from the provider list.</para>
|
||||
<para><emphasis role="bold">Supported Services</emphasis>: Select Load Balancer. Use
|
||||
Netscaler or VpcVirtualRouter.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Load Balancer Type</emphasis>: Select external LB from the
|
||||
drop-down. Use Netscaler</para>
|
||||
<para><emphasis role="bold">Load Balancer Type</emphasis>: Select Public LB from the
|
||||
drop-down.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">LB Isolation</emphasis>: Select Dedicated if Netscaler is
|
||||
used as the external LB provider.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">System Offering</emphasis>: Choose the system service
|
||||
|
|
@ -274,6 +278,19 @@
|
|||
</textobject>
|
||||
</mediaobject>
|
||||
</section>
|
||||
<section id="internallb-notes">
|
||||
<title>Guidelines</title>
|
||||
<itemizedlist>
|
||||
<listitem><para>Internal LB and Public LB are mutually exclusive on a tier. If the tier has LB on the public
|
||||
side, then it can't have the Internal LB.</para></listitem>
|
||||
<listitem><para>Internal LB is supported just on VPC networks in &PRODUCT; 4.2 release.</para></listitem>
|
||||
<listitem><para>Only Internal LB VM can act as the Internal LB provider in &PRODUCT; 4.2 release.</para></listitem>
|
||||
<listitem><para>Network upgrade is not supported from the network offering with Internal LB to the network
|
||||
offering with Public LB.</para></listitem>
|
||||
<listitem><para>Multiple tiers can have internal LB support in a VPC.</para></listitem>
|
||||
<listitem><para>Only one tier can have Public LB support in a VPC.</para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="enable-vpc-lb">
|
||||
<title>Enabling Internal LB on a VPC Tier</title>
|
||||
<orderedlist>
|
||||
|
|
@ -288,7 +305,9 @@
|
|||
</section>
|
||||
<section id="int-lb-offering">
|
||||
<title>Creating a Network Offering for Internal LB</title>
|
||||
<para>To have internal LB support on VPC, create a network offering as follows: </para>
|
||||
<para>To have internal LB support on VPC, either use the default offering,
|
||||
DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB, or create a network offering as
|
||||
follows: </para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as a user or admin.</para>
|
||||
|
|
@ -364,6 +383,14 @@
|
|||
</section>
|
||||
<section id="int-lb-vpc">
|
||||
<title>Creating an Internal LB Rule</title>
|
||||
<para>When you create the Internal LB rule and applies to a VM, an Internal LB VM, which is
|
||||
responsible for load balancing, is created. </para>
|
||||
<para>You can view the created Internal LB VM in the Instances page if you navigate to
|
||||
<emphasis role="bold">Infrastructure</emphasis> > <emphasis role="bold">Zones</emphasis> >
|
||||
<<emphasis role="italic">zone_ name</emphasis>> > <<emphasis role="italic"
|
||||
>physical_network_name</emphasis>> > <emphasis role="bold">Network Service
|
||||
Providers</emphasis> > <emphasis role="bold">Internal LB VM</emphasis>. You can manage the
|
||||
Internal LB VMs as and when required from the location.</para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
|
|
@ -397,9 +424,11 @@
|
|||
that can be displayed to users.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Source IP Address</emphasis>: The source IP from which
|
||||
traffic originates. Typically, this is the IP of an instance on another tier within
|
||||
your VPC.</para>
|
||||
<para><emphasis role="bold">Source IP Address</emphasis>: (Optional) The source IP
|
||||
from which traffic originates. The IP is acquired from the CIDR of that particular
|
||||
tier on which you want to create the Internal LB rule. If not specified, the IP
|
||||
address is automatically allocated from the network CIDR.</para>
|
||||
<para>For every Source IP, a new Internal LB VM is created for load balancing.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Source Port</emphasis>: The port associated with the
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<title>Adding a Network</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the CloudPlatform UI as an administrator or end user.</para>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation, click Instances.</para>
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
<title>Removing a Network</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the CloudPlatform UI as an administrator or end user.</para>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation, click Instances.</para>
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
<title>Selecting the Default Network</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the CloudPlatform UI as an administrator or end user.</para>
|
||||
<para>Log in to the &PRODUCT; UI as an administrator or end user.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation, click Instances.</para>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@
|
|||
the VPC, and is not overlapped with the CIDR of any existing tier within the VPC.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">VLAN</emphasis>: The VLAN ID for the tier you create. </para>
|
||||
<para><emphasis role="bold">VLAN</emphasis>: The VLAN ID for the tier that the root admin
|
||||
creates. </para>
|
||||
<para>This option is only visible if the network offering you selected is
|
||||
VLAN-enabled.</para>
|
||||
<para condition="install">For more information, see the Assigning VLANs to Isolated
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@
|
|||
<section id="added-API-commands-4.2">
|
||||
<title>Added API Commands in 4.2</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>addImageStore</para>
|
||||
<para>Adds all types of secondary storage providers, S3/Swift/NFS.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createSecondaryStagingStore</para>
|
||||
<para>Adds a staging secondary storage in each zone.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listImageStores</para>
|
||||
<para>Lists all secondary storages, S3/Swift/NFS.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listSecondaryStagingStores</para>
|
||||
<para>Lists all staging secondary storages.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addIpToNic </para>
|
||||
<para>Adds an IP address to the NIC from the guest subnet. The request parameters are: nicid,
|
||||
|
|
@ -135,328 +151,404 @@
|
|||
<para>The request parameters are elastic ip id and region id.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createVMSnapshot (create a virtual machine snapshot)</para>
|
||||
<para>createVMSnapshot</para>
|
||||
<para>Creates a virtual machine snapshot.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteVMSnapshot (delete a virtual machine snapshot)</para>
|
||||
<para>deleteVMSnapshot </para>
|
||||
<para>Deletes a virtual machine snapshot.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listVMSnapshot (show a virtual machine snapshot)</para>
|
||||
<para>listVMSnapshot</para>
|
||||
<para>Shows a virtual machine snapshot.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>revertToVMSnapshot (return a virtual machine to the state and data saved in a given
|
||||
snapshot)</para>
|
||||
<para>revertToVMSnapshot </para>
|
||||
<para>Returns a virtual machine to the state and data saved in a given snapshot.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createLBHealthCheckPolicy (creates a new health check policy for a load balancer rule;
|
||||
see <xref linkend="health-check"/>)</para>
|
||||
<para>createLBHealthCheckPolicy </para>
|
||||
<para>Creates a new health check policy for a load balancer rule.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteLBHealthCheckPolicy (deletes an existing health check policy from a load balancer
|
||||
rule)</para>
|
||||
<para>deleteLBHealthCheckPolicy</para>
|
||||
<para>Deletes an existing health check policy from a load balancer rule.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listLBHealthCheckPolicies (displays the health check policy for a load balancer
|
||||
rule)</para>
|
||||
<para>listLBHealthCheckPolicies</para>
|
||||
<para>Displays the health check policy for a load balancer rule.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createEgressFirewallRules (creates an egress firewall rule on the guest network; see
|
||||
<xref linkend="egress-firewall"/>)</para>
|
||||
<para>createEgressFirewallRules </para>
|
||||
<para>Creates an egress firewall rule on the guest network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteEgressFirewallRules (deletes a egress firewall rule on the guest network.)</para>
|
||||
<para>deleteEgressFirewallRules </para>
|
||||
<para>Deletes a egress firewall rule on the guest network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listEgressFirewallRules (lists the egress firewall rules configured for a guest
|
||||
network.)</para>
|
||||
<para>listEgressFirewallRules </para>
|
||||
<para>Lists the egress firewall rules configured for a guest network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>resetSSHKeyForVirtualMachine (Resets the SSHkey for virtual machine.)</para>
|
||||
<para>resetSSHKeyForVirtualMachine </para>
|
||||
<para>Resets the SSHkey for virtual machine.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addBaremetalHost (Adds a new host. Technically, this API command was present in v3.0.6,
|
||||
but its functionality was disabled. See <xref linkend="baremetal"/>)</para>
|
||||
<para>addBaremetalHost </para>
|
||||
<para>Adds a new host. Technically, this API command was present in v3.0.6, but its
|
||||
functionality was disabled.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addBaremetalDhcp (Adds a DHCP server for bare metal hosts)</para>
|
||||
<para>addBaremetalDhcp </para>
|
||||
<para>Adds a DHCP server for bare metal hosts.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> addBaremetalPxePingServer (Adds a PXE PING server for bare metal hosts)</para>
|
||||
<para> addBaremetalPxePingServer </para>
|
||||
<para>Adds a PXE PING server for bare metal hosts.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> addBaremetalPxeKickStartServer (Adds a PXE server for bare metal hosts)</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> listBaremetalDhcp (Shows the DHCP servers currently defined for bare metal
|
||||
hosts)</para>
|
||||
<para> listBaremetalDhcp </para>
|
||||
<para>Shows the DHCP servers currently defined for bare metal hosts.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> listBaremetalPxePingServer (Shows the PXE PING servers currently defined for bare metal
|
||||
hosts)</para>
|
||||
<para> listBaremetalPxePingServer </para>
|
||||
<para>Shows the PXE PING servers currently defined for bare metal hosts.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addNicToVirtualMachine (Adds a new NIC to the specified VM on a selected network; see
|
||||
<xref linkend="multiple-ip-nic"/>)</para>
|
||||
<para>addNicToVirtualMachine </para>
|
||||
<para>Adds a new NIC to the specified VM on a selected network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>removeNicFromVirtualMachine (Removes the specified NIC from a selected VM.)</para>
|
||||
<para>removeNicFromVirtualMachine </para>
|
||||
<para>Removes the specified NIC from a selected VM.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>updateDefaultNicForVirtualMachine (Updates the specified NIC to be the default one for a
|
||||
selected VM.)</para>
|
||||
<para>updateDefaultNicForVirtualMachine </para>
|
||||
<para>Updates the specified NIC to be the default one for a selected VM.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addRegion (Registers a Region into another Region; see <xref linkend="regions"/>)</para>
|
||||
<para>addRegion </para>
|
||||
<para>Registers a Region into another Region.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>updateRegion (Updates Region details: ID, Name, Endpoint, User API Key, and User Secret
|
||||
Key.)</para>
|
||||
<para>updateRegion </para>
|
||||
<para>Updates Region details: ID, Name, Endpoint, User API Key, and User Secret Key.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>removeRegion (Removes a Region from current Region.)</para>
|
||||
<para>removeRegion </para>
|
||||
<para>Removes a Region from current Region.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listRegions (Get all the Regions. They can be filtered by using the ID or Name.)</para>
|
||||
<para>listRegions </para>
|
||||
<para>Get all the Regions. They can be filtered by using the ID or Name.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>getUser (This API can only be used by the Admin. Get user account details by using the
|
||||
API Key.) </para>
|
||||
<para>getUser </para>
|
||||
<para>This API can only be used by the Admin. Get user account details by using the API
|
||||
Key.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>getApiLimit (Show number of remaining APIs for the invoking user in current
|
||||
window)</para>
|
||||
<para>getApiLimit </para>
|
||||
<para>Shows number of remaining APIs for the invoking user in current window.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>resetApiLimit (For root admin, if account ID parameter is passed, it will reset count
|
||||
for that particular account, otherwise it will reset all counters)</para>
|
||||
<para>resetApiLimit </para>
|
||||
<para>For root admin, if account ID parameter is passed, it will reset count for that
|
||||
particular account, otherwise it will reset all counters.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>lockAccount (Locks an account)</para>
|
||||
<para>lockAccount </para>
|
||||
<para>Locks an account.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>lockUser (Locks a user account)</para>
|
||||
<para>lockUser </para>
|
||||
<para>Locks a user account.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>scaleVirtualMachine (Scales the virtual machine to a new service offering.) </para>
|
||||
<para>scaleVirtualMachine </para>
|
||||
<para>Scales the virtual machine to a new service offering.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>migrateVirtualMachineWithVolume (Attempts migrating VM with its volumes to a different
|
||||
host.) </para>
|
||||
<para>migrateVirtualMachineWithVolume </para>
|
||||
<para>Attempts migrating VM with its volumes to a different host. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>dedicatePublicIpRange (Dedicates a Public IP range to an account.) </para>
|
||||
<para>dedicatePublicIpRange </para>
|
||||
<para>Dedicates a Public IP range to an account.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releasePublicIpRange (Releases a Public IP range back to the system pool.) </para>
|
||||
<para>releasePublicIpRange </para>
|
||||
<para>Releases a Public IP range back to the system pool. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>dedicateGuestVlanRange (Dedicates a guest VLAN range to an account.) </para>
|
||||
<para>dedicateGuestVlanRange </para>
|
||||
<para>Dedicates a guest VLAN range to an account. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releaseDedicatedGuestVlanRange (Releases a dedicated guest VLAN range to the system.)
|
||||
</para>
|
||||
<para>releaseDedicatedGuestVlanRange </para>
|
||||
<para>Releases a dedicated guest VLAN range to the system.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listDedicatedGuestVlanRanges (Lists dedicated guest VLAN ranges.) </para>
|
||||
<para>listDedicatedGuestVlanRanges </para>
|
||||
<para>Lists dedicated guest VLAN ranges.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>updatePortForwardingRule (Updates a port forwarding rule. Only the private port and the
|
||||
VM can be updated.) </para>
|
||||
<para>updatePortForwardingRule </para>
|
||||
<para>Updates a port forwarding rule. Only the private port and the VM can be updated. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>scaleSystemVm (Scale the service offering for a systemVM, console proxy, or secondary
|
||||
storage. The system VM must be in Stopped state for this command to take effect.) </para>
|
||||
<para>scaleSystemVm </para>
|
||||
<para>Scales the service offering for a systemVM, console proxy, or secondary storage.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listDeploymentPlanners (Lists all the deployment planners available.) </para>
|
||||
<para>listDeploymentPlanners </para>
|
||||
<para>Lists all the deployment planners available.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addS3 (Adds a Amazon Simple Storage Service instance.) </para>
|
||||
<para>addS3 </para>
|
||||
<para>Adds a Amazon Simple Storage Service instance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listS3s (Lists all the Amazon Simple Storage Service instances.) </para>
|
||||
<para>listS3s </para>
|
||||
<para>Lists all the Amazon Simple Storage Service instances. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>findHostsForMigration (Find hosts suitable for migrating a VM to.) </para>
|
||||
<para>findHostsForMigration </para>
|
||||
<para>Finds hosts suitable for migrating a VM to.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releaseHostReservation (Releases host reservation.) </para>
|
||||
<para>releaseHostReservation </para>
|
||||
<para>Releases host reservation.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>resizeVolume (Resizes a volume.) </para>
|
||||
<para>resizeVolume </para>
|
||||
<para>Resizes a volume.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>updateVolume (Updates the volume.) </para>
|
||||
<para>updateVolume </para>
|
||||
<para>Updates the volume.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listStorageProviders (Lists storage providers.) </para>
|
||||
<para>listStorageProviders </para>
|
||||
<para>Lists storage providers. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>findStoragePoolsForMigration (Lists storage pools available for migrating a volume.)
|
||||
</para>
|
||||
<para>findStoragePoolsForMigration </para>
|
||||
<para>Lists storage pools available for migrating a volume. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createEgressFirewallRule (Creates a egress firewall rule for a given network. ) </para>
|
||||
<para>createEgressFirewallRule </para>
|
||||
<para>Creates a egress firewall rule for a given network. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteEgressFirewallRule (Deletes an egress firewall rule.) </para>
|
||||
<para>deleteEgressFirewallRule </para>
|
||||
<para>Deletes an egress firewall rule.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listEgressFirewallRules (Lists all egress firewall rules for network.) </para>
|
||||
<para>listEgressFirewallRules </para>
|
||||
<para>Lists all egress firewall rules for network.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>updateNetworkACLItem (Updates ACL item with specified ID.) </para>
|
||||
<para>updateNetworkACLItem </para>
|
||||
<para>Updates ACL item with specified ID.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createNetworkACLList (Creates a Network ACL for the given VPC.) </para>
|
||||
<para>createNetworkACLList </para>
|
||||
<para>Creates a Network ACL for the given VPC. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteNetworkACLList (Deletes a Network ACL.) </para>
|
||||
<para>deleteNetworkACLList </para>
|
||||
<para>Deletes a Network ACL. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>replaceNetworkACLList (Replaces ACL associated with a Network or private gateway.)
|
||||
</para>
|
||||
<para>replaceNetworkACLList </para>
|
||||
<para>Replaces ACL associated with a Network or private gateway.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listNetworkACLLists (Lists all network ACLs.) </para>
|
||||
<para>listNetworkACLLists </para>
|
||||
<para>Lists all network ACLs.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addResourceDetail (Adds detail for the Resource.) </para>
|
||||
<para>addResourceDetail </para>
|
||||
<para>Adds detail for the Resource. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>removeResourceDetail (Removes detail for the Resource.) </para>
|
||||
<para>removeResourceDetail </para>
|
||||
<para>Removes details of the resource.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listResourceDetails (List resource details.) </para>
|
||||
<para>listResourceDetails </para>
|
||||
<para>Lists resource details. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addNiciraNvpDevice (Adds a Nicira NVP device.) </para>
|
||||
<para>addNiciraNvpDevice </para>
|
||||
<para>Adds a Nicira NVP device.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteNiciraNvpDevice (Deletes a Nicira NVP device.) </para>
|
||||
<para>deleteNiciraNvpDevice </para>
|
||||
<para>Deletes a Nicira NVP device.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listNiciraNvpDevices (Lists Nicira NVP devices.) </para>
|
||||
<para>listNiciraNvpDevices </para>
|
||||
<para>Lists Nicira NVP devices.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listNiciraNvpDeviceNetworks (Lists network that are using a Nicira NVP device.) </para>
|
||||
<para>listNiciraNvpDeviceNetworks </para>
|
||||
<para>Lists network that are using a Nicira NVP device.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>addBigSwitchVnsDevice (Adds a BigSwitch VNS device.) </para>
|
||||
<para>addBigSwitchVnsDevice </para>
|
||||
<para>Adds a BigSwitch VNS device.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteBigSwitchVnsDevice (Deletes a BigSwitch VNS device.) </para>
|
||||
<para>deleteBigSwitchVnsDevice </para>
|
||||
<para>Deletes a BigSwitch VNS device.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listBigSwitchVnsDevices (Lists BigSwitch VNS devices.) </para>
|
||||
<para>listBigSwitchVnsDevices </para>
|
||||
<para>Lists BigSwitch VNS devices.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>configureSimulator (Configures a simulator.) </para>
|
||||
<para>configureSimulator </para>
|
||||
<para>Configures a simulator.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listApis (Lists all the available APIs on the server, provided by the API Discovery
|
||||
plugin.) </para>
|
||||
<para>listApis </para>
|
||||
<para>Lists all the available APIs on the server, provided by the API Discovery plugin. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>getApiLimit (Get the API limit count for the caller.) </para>
|
||||
<para>getApiLimit </para>
|
||||
<para>Gets the API limit count for the caller. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>resetApiLimit (Reset the API count.) </para>
|
||||
<para>resetApiLimit </para>
|
||||
<para>Resets the API count.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>assignToGlobalLoadBalancerRule (Assign load balancer rule or list of load balancer rules
|
||||
to a global load balancer rules.) </para>
|
||||
<para>assignToGlobalLoadBalancerRule </para>
|
||||
<para>Assigns load balancer rule or list of load balancer rules to a global load balancer
|
||||
rules.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>removeFromGlobalLoadBalancerRule (Removes a load balancer rule association with global
|
||||
load balancer rule) </para>
|
||||
<para>removeFromGlobalLoadBalancerRule </para>
|
||||
<para>Removes a load balancer rule association with global load balancer rule.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listVMSnapshot (List virtual machine snapshot by conditions) </para>
|
||||
<para>listVMSnapshot </para>
|
||||
<para>Lists virtual machine snapshot by conditions.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createLoadBalancer (Creates a Load Balancer) </para>
|
||||
<para>createLoadBalancer </para>
|
||||
<para>Creates a load balancer.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listLoadBalancers (Lists Load Balancers) </para>
|
||||
<para>listLoadBalancers </para>
|
||||
<para>Lists load balancers.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteLoadBalancer (Deletes a load balancer) </para>
|
||||
<para>deleteLoadBalancer </para>
|
||||
<para>Deletes a load balancer. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>configureInternalLoadBalancerElement (Configures an Internal Load Balancer element.)
|
||||
</para>
|
||||
<para>configureInternalLoadBalancerElement </para>
|
||||
<para>Configures an Internal Load Balancer element.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createInternalLoadBalancerElement (Create an Internal Load Balancer element.) </para>
|
||||
<para>createInternalLoadBalancerElement </para>
|
||||
<para>Creates an Internal Load Balancer element.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listInternalLoadBalancerElements (Lists all available Internal Load Balancer elements.)
|
||||
</para>
|
||||
<para>listInternalLoadBalancerElements </para>
|
||||
<para>Lists all available Internal Load Balancer elements.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>createAffinityGroup (Creates an affinity or anti-affinity group.) </para>
|
||||
<para>createAffinityGroup </para>
|
||||
<para>Creates an affinity or anti-affinity group.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>deleteAffinityGroup (Deletes an affinity group.) </para>
|
||||
<para>deleteAffinityGroup </para>
|
||||
<para>Deletes an affinity group.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listAffinityGroups (Lists all the affinity groups.)</para>
|
||||
<para>listAffinityGroups </para>
|
||||
<para>Lists all the affinity groups.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>updateVMAffinityGroup (Updates the affinity or anti-affinity group associations of a VM.
|
||||
The VM has to be stopped and restarted for the new properties to take effect.) </para>
|
||||
<para>updateVMAffinityGroup </para>
|
||||
<para>Updates the affinity or anti-affinity group associations of a VM. The VM has to be
|
||||
stopped and restarted for the new properties to take effect.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listAffinityGroupTypes (Lists affinity group types available.) </para>
|
||||
<para>listAffinityGroupTypes </para>
|
||||
<para>Lists affinity group types available. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>stopInternalLoadBalancerVM (Stops an Internal LB VM.) </para>
|
||||
<para>stopInternalLoadBalancerVM </para>
|
||||
<para>Stops an Internal LB VM.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>startInternalLoadBalancerVM (Starts an existing Internal LB VM.) </para>
|
||||
<para>startInternalLoadBalancerVM </para>
|
||||
<para>Starts an existing Internal LB VM.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listInternalLoadBalancerVMs (List internal LB VMs.) </para>
|
||||
<para>listInternalLoadBalancerVMs </para>
|
||||
<para>Lists internal LB VMs.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listNetworkIsolationMethods (Lists supported methods of network isolation.) </para>
|
||||
<para>listNetworkIsolationMethods </para>
|
||||
<para>Lists supported methods of network isolation.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>dedicateZone (Dedicates a zone.) </para>
|
||||
<para>dedicateZone </para>
|
||||
<para>Dedicates a zone.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>dedicatePod (Dedicates a pod.) </para>
|
||||
<para>dedicatePod </para>
|
||||
<para>Dedicates a pod. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>dedicateCluster (Dedicate an existing cluster.) </para>
|
||||
<para>dedicateCluster </para>
|
||||
<para>Dedicates an existing cluster. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>dedicateHost (Dedicates a host.) </para>
|
||||
<para>dedicateHost </para>
|
||||
<para>Dedicates a host.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releaseDedicatedZone (Release dedication of zone.) </para>
|
||||
<para>releaseDedicatedZone </para>
|
||||
<para>Releases dedication of zone. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releaseDedicatedPod (Release dedication for the pod.) </para>
|
||||
<para>releaseDedicatedPod </para>
|
||||
<para>Releases dedication for the pod. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releaseDedicatedCluster (Release dedication for cluster.) </para>
|
||||
<para>releaseDedicatedCluster </para>
|
||||
<para>Releases dedication for cluster. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>releaseDedicatedHost (Release dedication for host.) </para>
|
||||
<para>releaseDedicatedHost </para>
|
||||
<para>Releases dedication for host. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listDedicatedZones (List dedicated zones.) </para>
|
||||
<para>listDedicatedZones </para>
|
||||
<para>Lists dedicated zones. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listDedicatedPods (Lists dedicated pods.) </para>
|
||||
<para>listDedicatedPods </para>
|
||||
<para>Lists dedicated pods.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listDedicatedClusters (Lists dedicated clusters.) </para>
|
||||
<para>listDedicatedClusters </para>
|
||||
<para>Lists dedicated clusters.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>listDedicatedHosts (Lists dedicated hosts.) </para>
|
||||
<para>listDedicatedHosts </para>
|
||||
<para>Lists dedicated hosts. </para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -31,5 +31,98 @@
|
|||
<listitem><para>The Management Server cluster runs low on CPU, memory, or storage resources</para></listitem>
|
||||
<listitem><para>The Management Server loses heartbeat from a Host for more than 3 minutes</para></listitem>
|
||||
<listitem><para>The Host cluster runs low on CPU, memory, or storage resources</para></listitem>
|
||||
</itemizedlist>
|
||||
</itemizedlist>
|
||||
<section id="external-snmp-manager">
|
||||
<!-- CLOUDSTACK-680 -->
|
||||
<title>Sending Alerts to External SNMP and Syslog Managers</title>
|
||||
<para>In addition to showing administrator alerts on the Dashboard in the &PRODUCT; UI and
|
||||
sending them in email, &PRODUCT; can also send the same alerts to external SNMP or
|
||||
Syslog management software. This is useful if you prefer to use an SNMP or Syslog
|
||||
manager to monitor your cloud.</para>
|
||||
<para>The alerts which can be sent are listed in <xref linkend="alerts"/>. You can also
|
||||
display the most up to date list by calling the API command listAlerts.</para>
|
||||
<section id="snmp-alert-details">
|
||||
<title>SNMP Alert Details</title>
|
||||
<para>The supported protocol is SNMP version 2.</para>
|
||||
<para>Each SNMP trap contains the following information: message, podId, dataCenterId, clusterId, and generationTime.</para>
|
||||
</section>
|
||||
<section id="syslog-alert-details">
|
||||
<title>Syslog Alert Details</title>
|
||||
<para>&PRODUCT; generates a syslog message for every alert. Each syslog message incudes
|
||||
the fields alertType, message, podId, dataCenterId, and clusterId, in the following
|
||||
format. If any field does not have a valid value, it will not be included.</para>
|
||||
<programlisting>Date severity_level Management_Server_IP_Address/Name alertType:: value dataCenterId:: value podId:: value clusterId:: value message:: value</programlisting>
|
||||
<para>For example:</para>
|
||||
<programlisting>Mar 4 10:13:47 WARN localhost alertType:: managementNode message:: Management server node 127.0.0.1 is up</programlisting>
|
||||
</section>
|
||||
<section id="snmp-syslog-config">
|
||||
<title>Configuring SNMP and Syslog Managers</title>
|
||||
<para>To configure one or more SNMP managers or Syslog managers to receive alerts from
|
||||
&PRODUCT;:</para>
|
||||
<orderedlist>
|
||||
<listitem><para>For an SNMP manager, install the &PRODUCT; MIB file on your SNMP manager system.
|
||||
This maps the SNMP OIDs to trap types that can be more easily read by users.
|
||||
The file must be publicly available.
|
||||
For more information on how to install this file, consult the documentation provided with the SNMP manager.</para></listitem>
|
||||
<listitem>
|
||||
<para>Edit the file /etc/cloudstack/management/log4j-cloud.xml.</para>
|
||||
<programlisting># vi /etc/cloudstack/management/log4j-cloud.xml</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Add an entry using the syntax shown below. Follow the appropriate example
|
||||
depending on whether you are adding an SNMP manager or a Syslog manager. To specify
|
||||
multiple external managers, separate the IP addresses and other configuration values
|
||||
with commas (,).</para>
|
||||
<note>
|
||||
<para>The recommended maximum number of SNMP or Syslog managers is 20 for
|
||||
each.</para>
|
||||
</note>
|
||||
<para/>
|
||||
<para>The following example shows how to configure two SNMP managers at IP addresses
|
||||
10.1.1.1 and 10.1.1.2. Substitute your own IP addresses, ports, and communities. Do
|
||||
not change the other values (name, threshold, class, and layout values).</para>
|
||||
<programlisting><appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender">
|
||||
<param name="Threshold" value="WARN"/> <!-- Do not edit. The alert feature assumes WARN. -->
|
||||
<param name="SnmpManagerIpAddresses" value="10.1.1.1,10.1.1.2"/>
|
||||
<param name="SnmpManagerPorts" value="162,162"/>
|
||||
<param name="SnmpManagerCommunities" value="public,public"/>
|
||||
<layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout"> <!-- Do not edit -->
|
||||
<param name="PairDelimeter" value="//"/>
|
||||
<param name="KeyValueDelimeter" value="::"/>
|
||||
</layout>
|
||||
</appender></programlisting>
|
||||
<para>The following example shows how to configure two Syslog managers at IP
|
||||
addresses 10.1.1.1 and 10.1.1.2. Substitute your own IP addresses. You can
|
||||
set Facility to any syslog-defined value, such as LOCAL0 - LOCAL7. Do not
|
||||
change the other values.</para>
|
||||
<programlisting><appender name="ALERTSYSLOG">
|
||||
<param name="Threshold" value="WARN"/>
|
||||
<param name="SyslogHosts" value="10.1.1.1,10.1.1.2"/>
|
||||
<param name="Facility" value="LOCAL6"/>
|
||||
<layout>
|
||||
<param name="ConversionPattern" value=""/>
|
||||
</layout>
|
||||
</appender></programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If your cloud has multiple Management Server nodes, repeat these steps to edit
|
||||
log4j-cloud.xml on every instance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If you have made these changes while the Management Server is running, wait a
|
||||
few minutes for the change to take effect.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<para><emphasis role="bold">Troubleshooting:</emphasis> If no alerts appear at the
|
||||
configured SNMP or Syslog manager after a reasonable amount of time, it is likely that
|
||||
there is an error in the syntax of the <appender> entry in log4j-cloud.xml. Check
|
||||
to be sure that the format and settings are correct.</para>
|
||||
</section>
|
||||
<section id="delete-snmp-syslog-manager">
|
||||
<title>Deleting an SNMP or Syslog Manager</title>
|
||||
<para>To remove an external SNMP manager or Syslog manager so that it no longer receives
|
||||
alerts from &PRODUCT;, remove the corresponding entry from the file
|
||||
/etc/cloudstack/management/log4j-cloud.xml.</para>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue