Skip to content

Commit 79bfbe3

Browse files
committed
Merge branch 'master' into ui-regions
2 parents 2386270 + 8ba91fc commit 79bfbe3

File tree

133 files changed

+4115
-2127
lines changed

Some content is hidden

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

133 files changed

+4115
-2127
lines changed

agent/pom.xml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<filterreader
8484
classname="org.apache.tools.ant.filters.ReplaceTokens">
8585
<param type="propertiesfile"
86-
value="${basedir}/../build/replace.properties" />
86+
value="${cs.replace.properties}" />
8787
</filterreader>
8888
</filterchain>
8989
</copy>
@@ -97,7 +97,7 @@
9797
<filterreader
9898
classname="org.apache.tools.ant.filters.ReplaceTokens">
9999
<param type="propertiesfile"
100-
value="${basedir}/../build/replace.properties" />
100+
value="${cs.replace.properties}" />
101101
</filterreader>
102102
</filterchain>
103103
</copy>
@@ -106,6 +106,24 @@
106106
</execution>
107107
</executions>
108108
</plugin>
109+
<plugin>
110+
<groupId>org.apache.maven.plugins</groupId>
111+
<artifactId>maven-dependency-plugin</artifactId>
112+
<version>2.5.1</version>
113+
<executions>
114+
<execution>
115+
<id>copy-dependencies</id>
116+
<phase>package</phase>
117+
<goals>
118+
<goal>copy-dependencies</goal>
119+
</goals>
120+
<configuration>
121+
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
122+
<includeScope>runtime</includeScope>
123+
</configuration>
124+
</execution>
125+
</executions>
126+
</plugin>
109127
</plugins>
110128
</build>
111129
</project>

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,20 @@ public class VirtualMachineTO {
2828
private BootloaderType bootloader;
2929
Type type;
3030
int cpus;
31+
32+
/**
33+
'speed' is still here since 4.0.X/4.1.X management servers do not support
34+
the overcommit feature yet.
35+
36+
The overcommit feature sends minSpeed and maxSpeed
37+
38+
So this is here for backwards compatibility with 4.0.X/4.1.X management servers
39+
and newer agents.
40+
*/
41+
Integer speed;
3142
Integer minSpeed;
3243
Integer maxSpeed;
44+
3345
long minRam;
3446
long maxRam;
3547
String hostName;
@@ -48,6 +60,21 @@ public class VirtualMachineTO {
4860
VolumeTO[] disks;
4961
NicTO[] nics;
5062

63+
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
64+
this.id = id;
65+
this.name = instanceName;
66+
this.type = type;
67+
this.cpus = cpus;
68+
this.speed = speed;
69+
this.minRam = minRam;
70+
this.maxRam = maxRam;
71+
this.bootloader = bootloader;
72+
this.os = os;
73+
this.enableHA = enableHA;
74+
this.limitCpuUse = limitCpuUse;
75+
this.vncPassword = vncPassword;
76+
}
77+
5178
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer minSpeed, Integer maxSpeed, long minRam, long maxRam, BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
5279
this.id = id;
5380
this.name = instanceName;
@@ -103,6 +130,10 @@ public void setCpus(int cpus) {
103130
this.cpus = cpus;
104131
}
105132

133+
public Integer getSpeed() {
134+
return speed;
135+
}
136+
106137
public Integer getMinSpeed() {
107138
return minSpeed;
108139
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package com.cloud.network;
18+
19+
import com.cloud.network.Networks.TrafficType;
20+
21+
/* User can provide a Label, while configuring a zone, to specify
22+
* a physical network that is to be used for a traffic type defined
23+
* by CloudStack. See the enum data type TrafficType. This label is
24+
* called Traffic label. This might encapsulate physical network
25+
* specific properties like VLAN ID, name of virtual network object or more.
26+
* The name of virtual network object is dependent on type of hypervisor.
27+
* For example it is name of xenserver bridge in case of XenServer and
28+
* name of virtual switch in case of VMware hypervisor
29+
*/
30+
public interface TrafficLabel {
31+
32+
public TrafficType getTrafficType();
33+
34+
public String getNetworkLabel();
35+
36+
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,10 @@ public class ApiConstants {
360360
public static final String CUSTOM_DISK_OFF_MAX_SIZE = "customdiskofferingmaxsize";
361361
public static final String DEFAULT_ZONE_ID = "defaultzoneid";
362362
public static final String GUID = "guid";
363-
363+
public static final String VSWITCH_TYPE_GUEST_TRAFFIC = "guestvswitchtype";
364+
public static final String VSWITCH_TYPE_PUBLIC_TRAFFIC = "publicvswitchtype";
365+
public static final String VSWITCH_NAME_GUEST_TRAFFIC = "guestvswitchname";
366+
public static final String VSWITCH_NAME_PUBLIC_TRAFFIC = "publicvswitchname";
364367
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_ID = "vsmdeviceid";
365368
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_NAME = "vsmdevicename";
366369
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_STATE = "vsmdevicestate";

api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,34 @@ public class AddClusterCmd extends BaseCmd {
9191
@Parameter(name = ApiConstants.MEMORY_OVERCOMMIT_RATIO, type = CommandType.STRING, required = false ,description = "value of the default ram overcommit ratio, defaults to 1")
9292
private String memoryovercommitratio;
9393

94+
@Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC, type = CommandType.STRING, required = false, description = "Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)")
95+
private String vSwitchTypeGuestTraffic;
96+
97+
@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)")
98+
private String vSwitchTypePublicTraffic;
99+
100+
@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.")
101+
private String vSwitchNameGuestTraffic;
102+
103+
@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.")
104+
private String vSwitchNamePublicTraffic;
105+
106+
public String getVSwitchTypeGuestTraffic() {
107+
return vSwitchTypeGuestTraffic;
108+
}
109+
110+
public String getVSwitchTypePublicTraffic() {
111+
return vSwitchTypePublicTraffic;
112+
}
113+
114+
public String getVSwitchNameGuestTraffic() {
115+
return vSwitchNameGuestTraffic;
116+
}
117+
118+
public String getVSwitchNamePublicTraffic() {
119+
return vSwitchNamePublicTraffic;
120+
}
121+
94122
public String getVSMIpaddress() {
95123
return vsmipaddress;
96124
}

api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class CreateStoragePoolCmd extends BaseCmd {
4949
/////////////////////////////////////////////////////
5050

5151
@Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.UUID, entityType = ClusterResponse.class,
52-
required=true, description="the cluster ID for the storage pool")
52+
description="the cluster ID for the storage pool")
5353
private Long clusterId;
5454

5555
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the storage pool")
@@ -59,7 +59,7 @@ public class CreateStoragePoolCmd extends BaseCmd {
5959
private String storagePoolName;
6060

6161
@Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType = PodResponse.class,
62-
required=true, description="the Pod ID for the storage pool")
62+
description="the Pod ID for the storage pool")
6363
private Long podId;
6464

6565
@Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="the tags for the storage pool")

api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public class ListZonesByCmd extends BaseListCmd {
5353
description="the ID of the domain associated with the zone")
5454
private Long domainId;
5555

56+
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the zone")
57+
private String name;
58+
5659
@Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the zones")
5760
private Boolean showCapacities;
5861

@@ -72,6 +75,10 @@ public Long getDomainId(){
7275
return domainId;
7376
}
7477

78+
public String getName(){
79+
return name;
80+
}
81+
7582
public Boolean getShowCapacities() {
7683
return showCapacities;
7784
}

awsapi/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
<filterreader
355355
classname="org.apache.tools.ant.filters.ReplaceTokens">
356356
<param type="propertiesfile"
357-
value="${basedir}/../build/replace.properties" />
357+
value="${cs.replace.properties}" />
358358
</filterreader>
359359
</filterchain>
360360
</copy>

client/pom.xml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
<exec executable="cp">
276276
<arg value="-r" />
277277
<arg value="${basedir}/../scripts" />
278-
<arg value="${basedir}/target/generated-webapp/WEB-INF/classes/scripts" />
278+
<arg value="${basedir}/target/generated-webapp/WEB-INF/classes/" />
279279
</exec>
280280
<copy
281281
todir="${basedir}/target/generated-webapp/WEB-INF/">
@@ -308,7 +308,7 @@
308308
<filterreader
309309
classname="org.apache.tools.ant.filters.ReplaceTokens">
310310
<param type="propertiesfile"
311-
value="${basedir}/../build/replace.properties" />
311+
value="${cs.replace.properties}" />
312312
</filterreader>
313313
</filterchain>
314314
</copy>
@@ -319,7 +319,7 @@
319319
<globmapper from="*.in" to="*" />
320320
<filterchain>
321321
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
322-
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
322+
<param type="propertiesfile" value="${cs.replace.properties}" />
323323
</filterreader>
324324
</filterchain>
325325
</copy>
@@ -330,7 +330,7 @@
330330
<globmapper from="*.in" to="*" />
331331
<filterchain>
332332
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
333-
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
333+
<param type="propertiesfile" value="${cs.replace.properties}" />
334334
</filterreader>
335335
</filterchain>
336336
</copy>
@@ -341,7 +341,7 @@
341341
<globmapper from="*.in" to="*" />
342342
<filterchain>
343343
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
344-
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
344+
<param type="propertiesfile" value="${cs.replace.properties}" />
345345
</filterreader>
346346
</filterchain>
347347
</copy>
@@ -351,10 +351,26 @@
351351
</fileset>
352352
<filterchain>
353353
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
354-
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
354+
<param type="propertiesfile" value="${cs.replace.properties}" />
355355
</filterreader>
356356
</filterchain>
357357
</copy>
358+
<copy overwrite="true" todir="${basedir}/target/conf">
359+
<fileset dir="${basedir}/tomcatconf">
360+
<include name="*.in" />
361+
</fileset>
362+
<globmapper from="*.in" to="*" />
363+
<filterchain>
364+
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
365+
<param type="propertiesfile" value="${cs.replace.properties}" />
366+
</filterreader>
367+
</filterchain>
368+
</copy>
369+
<copy overwrite="true" todir="${basedir}/target/conf">
370+
<fileset dir="${basedir}/tomcatconf">
371+
<exclude name="*.in" />
372+
</fileset>
373+
</copy>
358374
</target>
359375
</configuration>
360376
</execution>

client/tomcatconf/classpath.conf.in

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,11 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818

19-
SYSTEMJARS="@SYSTEMJARS@"
20-
SCP=$(build-classpath $SYSTEMJARS 2>/dev/null) ; if [ $? != 0 ] ; then export SCP="@SYSTEMCLASSPATH@" ; fi
21-
MCP="@MSCLASSPATH@"
22-
DCP="@DEPSCLASSPATH@"
23-
CLASSPATH=$SCP:$DCP:$MCP:@MSCONF@:@SETUPDATADIR@
24-
for jarfile in "@PREMIUMJAVADIR@"/* ; do
25-
if [ ! -e "$jarfile" ] ; then continue ; fi
26-
CLASSPATH=$jarfile:$CLASSPATH
27-
done
28-
for plugin in "@PLUGINJAVADIR@"/* ; do
29-
if [ ! -e "$plugin" ] ; then continue ; fi
30-
CLASSPATH=$plugin:$CLASSPATH
31-
done
32-
for vendorconf in "@MSCONF@"/vendor/* ; do
33-
if [ ! -d "$vendorconf" ] ; then continue ; fi
34-
CLASSPATH=$vendorconf:$CLASSPATH
19+
# We use WEB-INF/lib in the webapp for including things into
20+
# the classpath nowdays
21+
22+
for jar in /usr/share/tomcat6/lib/*.jar; do
23+
CLASSPATH=$jar:$CLASSPATH
3524
done
25+
CLASSPATH=${CLASSPATH}/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/mysql-connector-java-5.1.21.jar
3626
export CLASSPATH
37-
PATH=/sbin:/usr/sbin:$PATH
38-
export PATH

0 commit comments

Comments
 (0)