Skip to content

Commit 7bdddd0

Browse files
committed
merged from master
2 parents d84bb97 + 56535a7 commit 7bdddd0

208 files changed

Lines changed: 7651 additions & 3462 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ debian/*.debhelper
8181
replace.properties.tmp
8282
build-indep-stamp
8383
configure-stamp
84+
*_flymake.js

INSTALL.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
This document describes how to develop, build, package and install Apache CloudStack
2-
(Incubating). For more information please refer to the project's website:
1+
This document describes how to develop, build, package and install Apache
2+
CloudStack. For more information please refer to:
33

44
http://cloudstack.apache.org
55

@@ -10,7 +10,7 @@ Refer to the [wiki](http://cwiki.apache.org/confluence/display/CLOUDSTACK/Index)
1010
for the latest information, especially:
1111

1212
- [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack.
13-
- [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building) Apache CloudStack.
13+
- [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+on+master+branch) Apache CloudStack.
1414

1515
## Setting up Development Environment
1616

@@ -21,12 +21,12 @@ Install tools and dependencies used for development:
2121
$ yum install git ant ant-devel java-1.6.0-openjdk java-1.6.0-openjdk-devel
2222
mysql mysql-server tomcat6 mkisofs gcc python MySQL-python openssh-clients wget
2323

24-
Set up Maven (3.0.4):
24+
Set up Maven (3.0.5):
2525

26-
$ wget http://www.us.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz
26+
$ wget http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
2727
$ cd /usr/local/ # or any path
28-
$ tar -zxvf apache-maven-3.0.4-bin.tar.gz
29-
$ echo export M2_HOME=/usr/local/apache-maven-3.0.4 >> ~/.bashrc # or .zshrc or .profile
28+
$ tar -zxvf apache-maven-3.0.5-bin.tar.gz
29+
$ echo export M2_HOME=/usr/local/apache-maven-3.0.5 >> ~/.bashrc # or .zshrc or .profile
3030
$ echo export PATH=${M2_HOME}/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
3131

3232
Note: Tomcat 6.0.35 has some known issue with Apache CloudStack, please use Tomcat
@@ -77,10 +77,10 @@ Start the MySQL service:
7777

7878
You may get the source code from the repository hosted on Apache:
7979

80-
$ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git
80+
$ git clone git://git.apache.org/cloudstack.git
8181

8282
Or, you may fork a repository from the official Apache CloudStack mirror by
83-
Apache on [Github](https://github.com/apache/incubator-cloudstack)
83+
Apache on [Github](https://github.com/apache/cloudstack)
8484

8585
To keep yourself updated on a branch, do:
8686

@@ -92,7 +92,6 @@ For example, for master:
9292

9393
## Building
9494

95-
9695
Clean and build:
9796

9897
$ mvn clean install -P systemvm,developer

agent/bindir/cloud-setup-agent.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ if __name__ == '__main__':
9595
parser.add_option("--prvNic", dest="prvNic", help="Private traffic interface")
9696
parser.add_option("--guestNic", dest="guestNic", help="Guest traffic interface")
9797

98+
old_config = configFileOps("@AGENTSYSCONFDIR@/agent.properties")
99+
bridgeType = old_config.getEntry("network.bridge.type").lower()
100+
if bridgeType:
101+
glbEnv.bridgeType = bridgeType
102+
98103
(options, args) = parser.parse_args()
99104
if options.auto is None:
100105
userInputs = getUserInputs()
@@ -104,7 +109,7 @@ if __name__ == '__main__':
104109
glbEnv.pod = userInputs[3]
105110
glbEnv.cluster = userInputs[4]
106111
#generate UUID
107-
glbEnv.uuid = configFileOps("@AGENTSYSCONFDIR@/agent.properties").getEntry("guid")
112+
glbEnv.uuid = old_config.getEntry("guid")
108113
if glbEnv.uuid == "":
109114
glbEnv.uuid = bash("uuidgen").getStdout()
110115
else:

agent/conf/agent.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ domr.scripts.dir=scripts/network/domr/kvm
8484
# set the hypervisor type, values are: kvm, lxc
8585
# hypervisor.type=kvm
8686

87+
# set the hypervisor URI. Usually there is no need for changing this
88+
# For KVM: qemu:///system
89+
# For LXC: lxc:///
90+
# hypervisor.uri=qemu:///system
91+
8792
# settings to enable direct networking in libvirt, should not be used
8893
# on hosts that run system vms, values for mode are: private, bridge, vepa
8994
# libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver

api/src/com/cloud/agent/api/to/VirtualMachineTO.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class VirtualMachineTO {
5252
boolean rebootOnCrash;
5353
boolean enableHA;
5454
boolean limitCpuUse;
55+
boolean enableDynamicallyScaleVm;
5556
String vncPassword;
5657
String vncAddr;
5758
Map<String, String> params;
@@ -102,6 +103,14 @@ public void setId(long id) {
102103
this.id = id;
103104
}
104105

106+
public boolean isEnableDynamicallyScaleVm() {
107+
return enableDynamicallyScaleVm;
108+
}
109+
110+
public void setEnableDynamicallyScaleVm(boolean enableDynamicallyScaleVm) {
111+
this.enableDynamicallyScaleVm = enableDynamicallyScaleVm;
112+
}
113+
105114
public String getName() {
106115
return name;
107116
}

api/src/com/cloud/event/EventTypes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class EventTypes {
103103
public static final String EVENT_NET_IP_ASSIGN = "NET.IPASSIGN";
104104
public static final String EVENT_NET_IP_RELEASE = "NET.IPRELEASE";
105105
public static final String EVENT_PORTABLE_IP_ASSIGN = "PORTABLE.IPASSIGN";
106-
public static final String EVENT_PORTABLE_IP_RELEASE = "PORTABLEIPRELEASE";
106+
public static final String EVENT_PORTABLE_IP_RELEASE = "PORTABLE.IPRELEASE";
107107
public static final String EVENT_NET_RULE_ADD = "NET.RULEADD";
108108
public static final String EVENT_NET_RULE_DELETE = "NET.RULEDELETE";
109109
public static final String EVENT_NET_RULE_MODIFY = "NET.RULEMODIFY";
@@ -436,6 +436,7 @@ public class EventTypes {
436436

437437
public static final String EVENT_PORTABLE_IP_RANGE_CREATE = "PORTABLE.IP.RANGE.CREATE";
438438
public static final String EVENT_PORTABLE_IP_RANGE_DELETE = "PORTABLE.IP.RANGE.DELETE";
439+
public static final String EVENT_PORTABLE_IP_TRANSFER = "PORTABLE.IP.TRANSFER";
439440

440441
static {
441442

api/src/com/cloud/network/NetworkService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws Resour
5656
IpAddress allocatePortableIP(Account ipOwner, int regionId, Long zoneId, Long networkId, Long vpcId) throws ResourceAllocationException,
5757
InsufficientAddressCapacityException, ConcurrentOperationException;
5858

59-
boolean releasePortableIpAddress(long ipAddressId) throws InsufficientAddressCapacityException;
59+
boolean releasePortableIpAddress(long ipAddressId);
6060

6161
Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException,
6262
ResourceAllocationException;

api/src/com/cloud/network/vpn/RemoteAccessVpnService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface RemoteAccessVpnService {
3232

3333
RemoteAccessVpn createRemoteAccessVpn(long vpnServerAddressId, String ipRange, boolean openFirewall, long networkId)
3434
throws NetworkRuleConflictException;
35-
void destroyRemoteAccessVpn(long vpnServerAddressId, Account caller) throws ResourceUnavailableException;
35+
void destroyRemoteAccessVpnForIp(long vpnServerAddressId, Account caller) throws ResourceUnavailableException;
3636
RemoteAccessVpn startRemoteAccessVpn(long vpnServerAddressId, boolean openFirewall) throws ResourceUnavailableException;
3737

3838
VpnUser addVpnUser(long vpnOwnerId, String userName, String password);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ public Long finalyzeAccountId(String accountName, Long domainId, Long projectId,
522522
return project.getProjectAccountId();
523523
} else {
524524
PermissionDeniedException ex = new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + " as it's no longer active");
525-
ex.addProxyObject(project, projectId, "projectId");
525+
ex.addProxyObject(project.getUuid(), "projectId");
526526
throw ex;
527527
}
528528
} else {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.cloud.exception.CloudException;
2121
import com.cloud.utils.exception.CSExceptionErrorCode;
2222
import com.cloud.utils.exception.CloudRuntimeException;
23+
import com.cloud.utils.exception.ExceptionProxyObject;
2324

2425
@SuppressWarnings("serial")
2526
public class ServerApiException extends CloudRuntimeException {
@@ -45,7 +46,7 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable
4546
_description = description;
4647
if (cause instanceof CloudRuntimeException) {
4748
CloudRuntimeException rt = (CloudRuntimeException) cause;
48-
ArrayList<String> idList = rt.getIdProxyList();
49+
ArrayList<ExceptionProxyObject> idList = rt.getIdProxyList();
4950
if (idList != null) {
5051
for (int i = 0; i < idList.size(); i++) {
5152
addProxyObject(idList.get(i));

0 commit comments

Comments
 (0)