Skip to content

Commit bdba0dd

Browse files
committed
Bring up to date with master
2 parents a6c1b75 + 4b157fc commit bdba0dd

1,201 files changed

Lines changed: 87210 additions & 31434 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.

INSTALL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ Install needed packages:
213213
$ yum install cloud-agent # agent (kvm)
214214
$ yum install cloud-usage # usage server
215215

216+
## Installing CloudMonkey CLI
217+
218+
CloudMonkey is a CLI for Apache CloudStack. It was earlier in `tools/cli` within
219+
the source code but now it has its own repository:
220+
221+
https://git-wip-us.apache.org/repos/asf?p=cloudstack-cloudmonkey.git
222+
216223
## Notes
217224

218225
If you will be using Xen as your hypervisor, please download [vhd-util](http://download.cloud.com.s3.amazonaws.com/tools/vhd-util)

LICENSE

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Within the scripts/vm/hypervisor/xenserver directory
306306
from OpenStack, LLC http://www.openstack.org
307307
swift
308308

309-
Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directories
309+
Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directory
310310
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
311311

312312
Copyright (c) 2010-2012 Patrick Debois
@@ -460,7 +460,7 @@ Within the ui/lib directory
460460

461461
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
462462

463-
Copyright (c) 2006 - 2011 J�rn Zaefferer
463+
Copyright (c) 2006 - 2011 Jörn Zaefferer
464464

465465
Permission is hereby granted, free of charge, to any person obtaining
466466
a copy of this software and associated documentation files (the
@@ -655,7 +655,7 @@ Within the ui/lib/jquery-ui directory
655655
Within the ui/lib/qunit directory
656656
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
657657

658-
Copyright (c) 2012 John Resig, J�rn Zaefferer
658+
Copyright (c) 2012 John Resig, Jörn Zaefferer
659659

660660
Permission is hereby granted, free of charge, to any person obtaining
661661
a copy of this software and associated documentation files (the
@@ -686,3 +686,10 @@ Within the utils/src/com/cloud/utils/db directory
686686
from Clinton Begin http://code.google.com/p/mybatis/
687687
ScriptRunner.java from http://code.google.com/p/mybatis/
688688

689+
Within the utils/src/org/apache/commons/httpclient/contrib/ssl directory
690+
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
691+
Copyright (c) 2007 The Apache Software Foundation
692+
from The Apache Software Foundation http://www.apache.org/
693+
EasySSLProtocolSocketFactory.java
694+
EasyX509TrustManager.java
695+

agent-simulator/tomcatconf/commands-simulator.properties.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717

1818

19-
configureSimulator=com.cloud.api.commands.ConfigureSimulator;1
19+
configureSimulator=com.cloud.api.commands.ConfigureSimulatorCmd;1

agent/conf/agent.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,23 @@ domr.scripts.dir=scripts/network/domr/kvm
9494
# libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver
9595
# network.direct.source.mode=private
9696
# network.direct.device=eth0
97+
98+
# setting to enable the cpu model to kvm guest globally.
99+
# three option:custom,host-model and host-passthrough.
100+
# custom - user custom the CPU model which specified by guest.cpu.model.
101+
# host-model - identify the named CPU model which most closely matches the host,
102+
# and then request additional CPU flags to complete the match. This should give
103+
# close to maximum functionality/performance, which maintaining good
104+
# reliability/compatibility if the guest is migrated to another host with slightly different host CPUs.
105+
# host-passthrough - tell KVM to passthrough the host CPU with no modifications.
106+
# The difference to host-model, instead of just matching feature flags,
107+
# every last detail of the host CPU is matched. This gives absolutely best performance,
108+
# and can be important to some apps which check low level CPU details,
109+
# but it comes at a cost wrt migration. The guest can only be migrated to
110+
# an exactly matching host CPU.
111+
#
112+
# guest.cpu.mode=custom|host-model|host-passthrough
113+
# This param is only valid if guest.cpu.mode=custom,
114+
# for examples:"Conroe" "Penryn", "Nehalem", "Westmere", "pentiumpro" and so
115+
# on,run virsh capabilities for more details.
116+
# guest.cpu.model=

agent/pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.apache.cloudstack</groupId>
2525
<artifactId>cloudstack</artifactId>
26-
<version>4.2.0-SNAPSHOT</version>
26+
<version>4.3.0-SNAPSHOT</version>
2727
</parent>
2828
<dependencies>
2929
<dependency>
@@ -39,14 +39,12 @@
3939
<dependency>
4040
<groupId>commons-daemon</groupId>
4141
<artifactId>commons-daemon</artifactId>
42-
<version>${cs.daemon.version}</version>
4342
</dependency>
4443
</dependencies>
4544
<build>
4645
<plugins>
4746
<plugin>
4847
<artifactId>maven-antrun-plugin</artifactId>
49-
<version>1.7</version>
5048
<executions>
5149
<execution>
5250
<id>generate-resource</id>
@@ -98,7 +96,6 @@
9896
<plugin>
9997
<groupId>org.apache.maven.plugins</groupId>
10098
<artifactId>maven-dependency-plugin</artifactId>
101-
<version>2.5.1</version>
10299
<executions>
103100
<execution>
104101
<id>copy-dependencies</id>

api/pom.xml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.apache.cloudstack</groupId>
2525
<artifactId>cloudstack</artifactId>
26-
<version>4.2.0-SNAPSHOT</version>
26+
<version>4.3.0-SNAPSHOT</version>
2727
</parent>
2828
<dependencies>
2929
<dependency>
@@ -34,12 +34,27 @@
3434
<dependency>
3535
<groupId>com.google.code.gson</groupId>
3636
<artifactId>gson</artifactId>
37-
<version>${cs.gson.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.apache.cloudstack</groupId>
40+
<artifactId>cloud-framework-db</artifactId>
41+
<version>${project.version}</version>
42+
<scope>test</scope>
3843
</dependency>
3944
</dependencies>
4045
<build>
41-
<defaultGoal>install</defaultGoal>
42-
<sourceDirectory>src</sourceDirectory>
43-
<testSourceDirectory>test</testSourceDirectory>
46+
<plugins>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-jar-plugin</artifactId>
50+
<executions>
51+
<execution>
52+
<goals>
53+
<goal>test-jar</goal>
54+
</goals>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
</plugins>
4459
</build>
4560
</project>

api/src/com/cloud/agent/api/Command.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
*/
2828
public abstract class Command {
2929

30+
public static enum OnError {
31+
Continue, Stop
32+
}
33+
3034
public static final String HYPERVISOR_TYPE = "hypervisorType";
3135

3236
// allow command to carry over hypervisor or other environment related context info

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ protected VolumeTO() {
4141
private Long bytesWriteRate;
4242
private Long iopsReadRate;
4343
private Long iopsWriteRate;
44+
private Long chainSize;
4445

4546
public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo) {
4647
this.id = id;
@@ -77,6 +78,7 @@ public VolumeTO(Volume volume, StoragePool pool) {
7778
this.storagePoolUuid = pool.getUuid();
7879
this.mountPoint = volume.getFolder();
7980
this.chainInfo = volume.getChainInfo();
81+
this.chainSize = volume.getVmSnapshotChainSize();
8082
if (volume.getDeviceId() != null)
8183
this.deviceId = volume.getDeviceId();
8284
}
@@ -170,4 +172,11 @@ public Long getIopsWriteRate() {
170172
return iopsWriteRate;
171173
}
172174

175+
public Long getChainSize() {
176+
return chainSize;
177+
}
178+
179+
public void setChainSize(Long chainSize) {
180+
this.chainSize = chainSize;
181+
}
173182
}

api/src/com/cloud/configuration/ConfigurationService.java

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020

2121
import javax.naming.NamingException;
2222

23-
import com.cloud.exception.InvalidParameterValueException;
24-
import com.cloud.exception.InsufficientCapacityException;
25-
import com.cloud.exception.ConcurrentOperationException;
26-
import com.cloud.exception.ResourceUnavailableException;
27-
import com.cloud.exception.ResourceAllocationException;
2823
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
2924
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
3025
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
@@ -48,17 +43,23 @@
4843
import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
4944
import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
5045
import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd;
46+
import org.apache.cloudstack.config.Configuration;
47+
import org.apache.cloudstack.region.PortableIp;
48+
import org.apache.cloudstack.region.PortableIpRange;
5149

5250
import com.cloud.dc.DataCenter;
5351
import com.cloud.dc.Pod;
5452
import com.cloud.dc.Vlan;
53+
import com.cloud.exception.ConcurrentOperationException;
54+
import com.cloud.exception.InsufficientCapacityException;
55+
import com.cloud.exception.InvalidParameterValueException;
56+
import com.cloud.exception.ResourceAllocationException;
57+
import com.cloud.exception.ResourceUnavailableException;
5558
import com.cloud.network.Networks.TrafficType;
5659
import com.cloud.offering.DiskOffering;
5760
import com.cloud.offering.NetworkOffering;
5861
import com.cloud.offering.ServiceOffering;
5962
import com.cloud.user.Account;
60-
import org.apache.cloudstack.region.PortableIp;
61-
import org.apache.cloudstack.region.PortableIpRange;
6263

6364
public interface ConfigurationService {
6465

@@ -252,30 +253,12 @@ public interface ConfigurationService {
252253

253254
boolean deleteNetworkOffering(DeleteNetworkOfferingCmd cmd);
254255

255-
NetworkOffering getNetworkOffering(long id);
256-
257-
Integer getNetworkOfferingNetworkRate(long networkOfferingId, Long dataCenterId);
258-
259256
Account getVlanAccount(long vlanId);
260257

261258
List<? extends NetworkOffering> listNetworkOfferings(TrafficType trafficType, boolean systemOnly);
262259

263-
DataCenter getZone(long id);
264-
265-
ServiceOffering getServiceOffering(long serviceOfferingId);
266-
267260
Long getDefaultPageSize();
268261

269-
Integer getServiceOfferingNetworkRate(long serviceOfferingId, Long dataCenterId);
270-
271-
DiskOffering getDiskOffering(long diskOfferingId);
272-
273-
/**
274-
* @param offering
275-
* @return
276-
*/
277-
boolean isOfferingForVpc(NetworkOffering offering);
278-
279262
PortableIpRange createPortableIpRange(CreatePortableIpRangeCmd cmd) throws ConcurrentOperationException;
280263

281264
boolean deletePortableIpRange(DeletePortableIpRangeCmd cmd);

plugins/hypervisors/simulator/src/com/cloud/server/ManagementServerSimulatorImpl.java renamed to api/src/com/cloud/consoleproxy/ConsoleProxyAllocator.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.server;
18-
17+
package com.cloud.consoleproxy;
1918

2019
import java.util.List;
20+
import java.util.Map;
2121

22-
import com.cloud.api.commands.ConfigureSimulator;
22+
import com.cloud.utils.component.Adapter;
23+
import com.cloud.vm.ConsoleProxy;
2324

24-
public class ManagementServerSimulatorImpl extends ManagementServerImpl {
25-
@Override
26-
public List<Class<?>> getCommands() {
27-
List<Class<?>> cmdList = super.getCommands();
28-
cmdList.add(ConfigureSimulator.class);
29-
return cmdList;
30-
}
25+
public interface ConsoleProxyAllocator extends Adapter {
26+
/**
27+
* Finds the least loaded console proxy.
28+
* @param candidates
29+
* @param loadInfo
30+
* @param dataCenterId
31+
* @return id of the console proxy to use or null if none.
32+
*/
33+
public Long allocProxy(List<? extends ConsoleProxy> candidates, Map<Long, Integer> loadInfo, long dataCenterId);
3134
}

0 commit comments

Comments
 (0)