Skip to content

Commit db9cc97

Browse files
author
Alex Huang
committed
Brought over new changes from master
2 parents 06b7d80 + cfc2b85 commit db9cc97

143 files changed

Lines changed: 5940 additions & 7337 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,6 @@ deps/*.mar
5151
*.jar
5252
awsapi/modules/*
5353
!.gitignore
54-
54+
.classpath
55+
.project
56+
.settings.xml

agent-simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,15 @@ public class SimulatorManagerImpl implements SimulatorManager {
109109
private ConnectionConcierge _concierge;
110110
@Override
111111
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
112+
/*
112113
try {
113114
Connection conn = Transaction.getStandaloneConnectionWithException();
114115
conn.setAutoCommit(true);
115116
_concierge = new ConnectionConcierge("SimulatorConnection", conn, true);
116117
} catch (SQLException e) {
117118
throw new CloudRuntimeException("Unable to get a db connection", e);
118119
}
120+
*/
119121
return true;
120122
}
121123

@@ -152,8 +154,8 @@ public MockAgentManager getAgentMgr() {
152154
@DB
153155
@Override
154156
public Answer simulate(Command cmd, String hostGuid) {
155-
Transaction txn = Transaction.currentTxn();
156-
txn.transitToUserManagedConnection(_concierge.conn());
157+
Transaction txn = Transaction.open(Transaction.SIMULATOR_DB);
158+
// txn.transitToUserManagedConnection(_concierge.conn());
157159

158160
try {
159161
MockHost host = _mockHost.findByGuid(hostGuid);

agent/conf/environment.properties.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# management server compile-time environment parameters
1919

2020
paths.pid=@PIDDIR@
21-
paths.script=@AGENTLIBDIR@
21+
paths.script=@COMMONLIBDIR@

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ public class IpAddressTO {
3030
private String vlanGateway;
3131
private String vlanNetmask;
3232
private String vifMacAddress;
33-
private String guestIp;
3433
private Integer networkRate;
3534
private TrafficType trafficType;
3635
private String networkName;
3736

3837
public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstIP, boolean sourceNat, String vlanId,
39-
String vlanGateway, String vlanNetmask, String vifMacAddress, String guestIp, Integer networkRate, boolean isOneToOneNat) {
38+
String vlanGateway, String vlanNetmask, String vifMacAddress, Integer networkRate, boolean isOneToOneNat) {
4039
this.accountId = accountId;
4140
this.publicIp = ipAddress;
4241
this.add = add;
@@ -46,7 +45,6 @@ public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstI
4645
this.vlanGateway = vlanGateway;
4746
this.vlanNetmask = vlanNetmask;
4847
this.vifMacAddress = vifMacAddress;
49-
this.guestIp = guestIp;
5048
this.networkRate = networkRate;
5149
this.oneToOneNat = isOneToOneNat;
5250
}
@@ -58,10 +56,6 @@ public long getAccountId() {
5856
return accountId;
5957
}
6058

61-
public String getGuestIp(){
62-
return guestIp;
63-
}
64-
6559
public String getPublicIp() {
6660
return publicIp;
6761
}

api/src/com/cloud/api/commands/ListVMsCmd.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
9696
@Parameter(name=ApiConstants.ISO_ID, type=CommandType.LONG, description="list vms by iso")
9797
private Long isoId;
9898

99+
@IdentityMapper(entityTableName="vpc")
100+
@Parameter(name=ApiConstants.VPC_ID, type=CommandType.LONG, description="list vms by vpc")
101+
private Long vpcId;
99102
/////////////////////////////////////////////////////
100103
/////////////////// Accessors ///////////////////////
101104
/////////////////////////////////////////////////////
@@ -156,6 +159,10 @@ public Long getIsoId() {
156159
return isoId;
157160
}
158161

162+
public Long getVpcId(){
163+
return vpcId;
164+
}
165+
159166
public EnumSet<VMDetails> getDetails() throws InvalidParameterValueException {
160167
EnumSet<VMDetails> dv;
161168
if (viewDetails==null || viewDetails.size() <=0){

awsapi/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,24 @@
9595
<artifactId>rahas</artifactId>
9696
<version>1.5</version>
9797
<type>mar</type>
98+
<exclusions>
99+
<exclusion>
100+
<groupId>bouncycastle</groupId>
101+
<artifactId>bcprov-jdk14</artifactId>
102+
</exclusion>
103+
</exclusions>
98104
</dependency>
99105
<dependency>
100106
<groupId>org.apache.rampart</groupId>
101107
<artifactId>rampart</artifactId>
102108
<version>1.5</version>
103109
<type>mar</type>
110+
<exclusions>
111+
<exclusion>
112+
<groupId>bouncycastle</groupId>
113+
<artifactId>bcprov-jdk14</artifactId>
114+
</exclusion>
115+
</exclusions>
104116
</dependency>
105117
<dependency>
106118
<groupId>org.apache.rampart</groupId>

build/build-aws-api.xml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<property name="jar.dir" location="${target.dir}/jar" />
4545
<property name="build.log" location="${target.dir}/ant_verbose.txt" />
4646
<property name="thirdparty.dir" location="${base.dir}/deps/awsapi-lib" />
47-
<property name="rampart.dir" location="${base.dir}/deps/awsapi-lib/rampart-lib" />
47+
<!-- <property name="rampart.dir" location="${base.dir}/deps/awsapi-lib/rampart-lib" /> -->
4848
<property file="${build.dir}/build-aws-api.properties" />
4949
<property name="version" value="${company.major.version}.${company.minor.version}.${company.patch.version}" />
5050
<property name="tomcat.home" location="${catalina.dir}" />
@@ -58,11 +58,11 @@
5858
<include name="*.jar" />
5959
</fileset>
6060
</path>
61-
<path id="rampart.classpath">
61+
<!-- <path id="rampart.classpath">
6262
<fileset dir="${rampart.dir}">
6363
<include name="*.jar" />
6464
</fileset>
65-
</path>
65+
</path> -->
6666
<path id="dist.classpath">
6767
<fileset dir="${target.dir}">
6868
<include name="**/*.jar" />
@@ -114,7 +114,7 @@
114114
<path id="awsapi.classpath">
115115
<path refid="deps.classpath" />
116116
<!-- <path refid="thirdparty.classpath" /> -->
117-
<path refid="rampart.classpath" />
117+
<!-- <path refid="rampart.classpath" /> -->
118118
<path refid="dist.classpath" />
119119
</path>
120120
<target name="compile-awsapi" depends="-init-awsapi" description="Compile Cloud.com Simple Storage Service">
@@ -171,7 +171,11 @@
171171
</jar>
172172
</target>
173173
<target name="deploy-axis" depends="-init-awsapi">
174-
<unwar overwrite="true" src="${base.dir}/deps/awsapi-lib/axis2-webapp-1.5.1.war" dest="${server.deploy.to.dir}/webapps7080/awsapi" />
174+
<unwar overwrite="true" src="${base.dir}/deps/awsapi-lib/axis2-webapp-1.5.1.war" dest="${server.deploy.to.dir}/webapps7080/awsapi" >
175+
<patternset>
176+
<exclude name="WEB-INF/lib/log4j-1.2.15.jar"/>
177+
</patternset>
178+
</unwar>
175179
</target>
176180
<condition property="access_key.private.notpresent">
177181
<not>
@@ -252,12 +256,12 @@
252256
<include name="web.xml" />
253257
</fileset>
254258
</copy>
255-
<!-- rampart lib goes where the axis lib files go -->
259+
<!-- rampart lib goes where the axis lib files go
256260
<copy todir="${server.deploy.to.dir}/webapps7080/awsapi/WEB-INF/lib">
257261
<fileset dir="${base.dir}/deps/awsapi-lib/rampart-lib">
258262
<include name="*.jar" />
259263
</fileset>
260-
</copy>
264+
</copy> -->
261265
<!-- copying over rampart mar files for WS-Security -->
262266
<copy todir="${server.deploy.to.dir}/webapps7080/awsapi/WEB-INF/modules">
263267
<fileset dir="${base.dir}/deps/awsapi-lib/modules">
@@ -365,9 +369,9 @@
365369
</fileset>
366370
</copy>
367371
<copy todir="${rpm.tomcat.dir}/webapps7080/awsapi/WEB-INF/lib">
368-
<fileset dir="${base.dir}/deps/awsapi-lib/rampart-lib">
372+
<!-- <fileset dir="${base.dir}/deps/awsapi-lib/rampart-lib">
369373
<include name="*.jar" />
370-
</fileset>
374+
</fileset> -->
371375
<fileset dir="${jar.dir}">
372376
<include name="cloud-awsapi.jar" />
373377
<include name="cloud-jasypt-1.8.jar" />

build/build-cloud-plugins.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
<property name="tools.dir" location="${base.dir}/tools" />
120120
<!-- <property name="antcontrib.dir" location="${tools.dir}/tools/ant/apache-ant-1.8.0/lib" />-->
121121
<property name="deploy.dir" location="${build.dir}/deploy" />
122-
<property name="production.dir" location="${deploy.dir}/production" />
123122
<property name="meld.home" location="/usr/local/bin" />
124123
<property name="assertion" value="-da" />
125124

build/build-cloud.xml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
<import file="${build.dir}/build-common.xml" />
6262

6363
<!-- In case these didn't get defined in the build-cloud.properties -->
64-
<property name="branding.name" value="default" />
6564
<property name="tomcat.home" value="${env.CATALINA_HOME}" />
6665
<property name="deprecation" value="off" />
6766
<property name="target.compat.version" value="1.6" />
@@ -113,17 +112,12 @@
113112

114113
<property name="tools.dir" location="${base.dir}/tools" />
115114
<!-- <property name="antcontrib.dir" location="${tools.dir}/tools/ant/apache-ant-1.8.0/lib" />-->
116-
<property name="deploy.dir" location="${build.dir}/deploy" />
117-
<property name="production.dir" location="${deploy.dir}/production" />
118115
<property name="meld.home" location="/usr/local/bin" />
119116
<property name="assertion" value="-da" />
120117

121118
<!-- directory for vmware-base library -->
122119
<property name="vmware-base.dir" location="${base.dir}/vmware-base" />
123120

124-
<!-- directories for branding -->
125-
<property name="branding.dir" location="${build.dir}/deploy/branding/${branding.name}" />
126-
127121
<property name="core.jar" value="cloud-core.jar" />
128122
<property name="utils.jar" value="cloud-utils.jar" />
129123
<property name="server.jar" value="cloud-server.jar" />
@@ -374,7 +368,7 @@
374368
</fileset>
375369
</copy>
376370
<copy todir="${copyto.dir}/conf">
377-
<fileset dir="${production.dir}/consoleproxy/conf">
371+
<fileset dir="${console-proxy.dir}/conf">
378372
<include name="log4j-cloud.xml" />
379373
<include name="consoleproxy.properties" />
380374
</fileset>
@@ -487,26 +481,16 @@
487481
<target name="build-servers" depends="-init, build-server" />
488482

489483
<target name="build-opensource" depends="-init, build-server, build-agent, build-scripts, build-ui, build-console-proxy, package-oss-systemvm-iso">
490-
<copy overwrite="true" todir="${dist.dir}">
491-
<fileset dir="${base.dir}/build/deploy/">
492-
<include name="deploy-agent.sh" />
493-
<include name="deploy-server.sh" />
494-
<include name="deploy-console-proxy.sh" />
495-
<include name="install.sh" />
496-
</fileset>
497484
<fileset dir="${base.dir}/client">
498485
<include name="setup/**/*" />
499486
</fileset>
500-
</copy>
501487

502488
<copy overwrite="true" todir="${jar.dir}">
503489
<fileset dir="${deps.dir}">
504490
<include name="vmware-*.jar" />
505491
</fileset>
506492
</copy>
507493

508-
<chmod file="${dist.dir}/deploy-agent.sh" perm="uog+xr" />
509-
<chmod file="${dist.dir}/deploy-server.sh" perm="uog+xr" />
510494
</target>
511495

512496

-1.37 KB
Binary file not shown.

0 commit comments

Comments
 (0)