Bug 6988: Fixed issue with queryAsyncJobResult returning jobResults in all String format. This is to mirror the same way that the async commands are being serialized.

- Changed client.war to now include all the thirdparty files
- Fixed addVpnUser command to return a vpnuser instead of the response
- Added vmware jar files to the development build.
This commit is contained in:
will 2010-11-04 20:56:04 -07:00
parent 70b4c4d181
commit b9fc4137f7
27 changed files with 271 additions and 45 deletions

View File

@ -260,44 +260,10 @@
<mkdir dir="${server.dist.dir}/lib" />
<mkdir dir="${server.dist.dir}/conf" />
<copy todir="${server.dist.dir}/lib">
<copy todir="${jar.dir}">
<fileset dir="${deps.dir}">
<include name="mysql-connector-java-5.1.7-bin.jar" />
<include name="cglib-nodep-2.2.jar" />
<include name="gson-1.3.jar" />
<include name="log4j-1.2.15.jar" />
<include name="apache-log4j-extras-1.0.jar" />
<include name="ehcache-1.5.0.jar" />
<include name="commons-logging-1.1.1.jar" />
<include name="commons-dbcp-1.2.2.jar" />
<include name="commons-pool-1.4.jar" />
<include name="commons-discovery.jar" />
<include name="backport-util-concurrent-3.0.jar" />
<include name="httpcore-4.0.jar" />
<include name="commons-httpclient-3.1.jar" />
<include name="commons-codec-1.4.jar" />
<include name="email.jar" />
<include name="xmlrpc-client-3.1.3.jar" />
<include name="xmlrpc-common-3.1.3.jar" />
<include name="xenserver-5.5.0-1.jar" />
<include name="ws-commons-util-1.0.2.jar" />
<include name="trilead-ssh2-build213.jar" />
<include name="vmware-apputils.jar" />
<include name="vmware-vim.jar" />
<include name="vmware-vim25.jar" />
<include name="vmware-lib-activation.jar" />
<include name="vmware-lib-axis.jar" />
<include name="vmware-lib-jaxen-core.jar" />
<include name="vmware-lib-jaxen-jdom.jar" />
<include name="vmware-lib-jaxrpc.jar" />
<include name="vmware-lib-jdom.jar" />
<include name="vmware-lib-mailapi.jar" />
<include name="vmware-lib-saxpath.jar" />
<include name="vmware-lib-smtp.jar" />
<include name="vmware-lib-wbem.jar" />
<include name="vmware-lib-xalan.jar" />
<include name="vmware-lib-xerces.jar" />
<include name="vmware-lib-xml-apis.jar" />
<include name="cloud-*.jar"/>
<include name="vmware-*.jar"/>
</fileset>
</copy>
@ -351,7 +317,7 @@
<fileset dir="${deps.dir}">
<include name="log4j-1.2.15.jar" />
<include name="apache-log4j-extras-1.0.jar" />
<include name="gson-1.3.jar" />
<include name="gson-1.5.jar" />
</fileset>
</copy>

View File

@ -151,6 +151,7 @@
</classes>
<lib dir="${jar.dir}">
<include name="cloud-*.jar" />
<include name="vmware-*.jar" />
</lib>
<zipfileset dir="${scripts.target.dir}" prefix="WEB-INF/lib/scripts" filemode="555">
<include name="**/*" />

View File

@ -50,7 +50,15 @@ public class ResponseObjectTypeAdapter implements JsonSerializer<ResponseObject>
ResponseObject subObj = (ResponseObject)fieldValue;
obj.add(serializedName.value(), serialize(subObj, subObj.getClass(), ctx));
} else {
obj.addProperty(serializedName.value(), fieldValue.toString());
if (fieldValue instanceof Number) {
obj.addProperty(serializedName.value(), (Number)fieldValue);
} else if (fieldValue instanceof Character) {
obj.addProperty(serializedName.value(), (Character)fieldValue);
} else if (fieldValue instanceof Boolean) {
obj.addProperty(serializedName.value(), (Boolean)fieldValue);
} else {
obj.addProperty(serializedName.value(), fieldValue.toString());
}
}
}
} catch (IllegalArgumentException e) {

BIN
deps/vmware-apputils.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-credstore.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-activation.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-axis.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-jaxen-core.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-jaxen-jdom.jar vendored Normal file

Binary file not shown.

42
deps/vmware-lib-jaxen.license vendored Normal file
View File

@ -0,0 +1,42 @@
/*
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "Jaxen" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of werken digital. For written permission,
* please contact bob@werken.com.
*
* 4. Products derived from this Software may not be called "Jaxen"
* nor may "Jaxen" appear in their names without prior written
* permission of werken digital. Jaxen is a registered
* trademark of werken digital
*
* 5. Due credit should be given to the Jaxen Project
* (http://jaxen.org/).
*
* THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2001 (C) werken digital. All Rights Reserved.
*/

93
deps/vmware-lib-jaxen.readme vendored Normal file
View File

@ -0,0 +1,93 @@
The Jaxen libraries included here are based on Jaxen 1.0-FCS. Jaxen 1.0-FCS
was written against JDOM Beta 9, and for Jaxen to support JDOM Beta 10+, we
had to make the following change to org.jaxen.jdom.DocumentNavigator. The
jaxen-jdom.jar provided here includes this change, and it's the only
difference between the JARs here and the Jaxen 1.0-FCS JARs.
--- DocumentNavigator.java.orig Tue Aug 31 16:23:32 2004
+++ DocumentNavigator.java Fri Sep 03 00:08:37 2004
@@ -72,6 +72,8 @@
import org.jdom.Document;
import org.jdom.Element;
+import org.jdom.Parent;
+import org.jdom.Content;
import org.jdom.Comment;
import org.jdom.Text;
import org.jdom.Attribute;
@@ -231,7 +233,7 @@
nsMap.put( ns.getPrefix(), new XPathNamespace(elem, ns) );
}
- current = current.getParent();
+ current = current.getParentElement();
}
nsMap.put( "xml", new XPathNamespace(elem, Namespace.XML_NAMESPACE) );
@@ -247,17 +249,9 @@
{
parent = contextNode;
}
- else if ( contextNode instanceof Element )
+ else if ( contextNode instanceof Content )
{
- parent = ((Element)contextNode).getParent();
-
- if ( parent == null )
- {
- if ( ((Element)contextNode).isRootElement() )
- {
- parent = ((Element)contextNode).getDocument();
- }
- }
+ parent = ((Content)contextNode).getParent();
}
else if ( contextNode instanceof Attribute )
{
@@ -267,18 +261,6 @@
{
parent = ((XPathNamespace)contextNode).getJDOMElement();
}
- else if ( contextNode instanceof ProcessingInstruction )
- {
- parent = ((ProcessingInstruction)contextNode).getParent();
- }
- else if ( contextNode instanceof Comment )
- {
- parent = ((Comment)contextNode).getParent();
- }
- else if ( contextNode instanceof Text )
- {
- parent = ((Text)contextNode).getParent();
- }
if ( parent != null )
{
@@ -456,9 +438,9 @@
{
element = (Element) context;
}
- else if ( context instanceof Text )
+ else if ( context instanceof Content )
{
- element = ((Text)context).getParent();
+ element = ((Content)context).getParentElement();
}
else if ( context instanceof Attribute )
{
@@ -467,14 +449,6 @@
else if ( context instanceof XPathNamespace )
{
element = ((XPathNamespace)context).getJDOMElement();
- }
- else if ( context instanceof Comment )
- {
- element = ((Comment)context).getParent();
- }
- else if ( context instanceof ProcessingInstruction )
- {
- element = ((ProcessingInstruction)context).getParent();
}
if ( element != null )

BIN
deps/vmware-lib-jaxrpc.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-jdom.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-mailapi.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-saxpath.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-smtp.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-wbem.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-lib-xalan.jar vendored Normal file

Binary file not shown.

55
deps/vmware-lib-xalan.license vendored Normal file
View File

@ -0,0 +1,55 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xalan" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, Lotus
* Development Corporation., http://www.lotus.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/

2
deps/vmware-lib-xalan.readme vendored Normal file
View File

@ -0,0 +1,2 @@
This is Xalan 2.5.D1, distributed from http://xml.apache.org.
It's designed to go with Xerces 2.4.0.

BIN
deps/vmware-lib-xerces.jar vendored Normal file

Binary file not shown.

63
deps/vmware-lib-xerces.readme vendored Normal file
View File

@ -0,0 +1,63 @@
Xerces 2.6.0
This product includes Xerces software developed by the Apache Software
Foundation (http://www.apache.org/). It is redistributed in accordance with
the license below. For more information, see http://xml.apache.org.
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/

BIN
deps/vmware-lib-xml-apis.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-vim.jar vendored Normal file

Binary file not shown.

BIN
deps/vmware-vim25.jar vendored Normal file

Binary file not shown.

View File

@ -36,7 +36,7 @@ import com.cloud.user.UserContext;
public class AddVpnUserCmd extends BaseAsyncCmd {
public static final Logger s_logger = Logger.getLogger(AddVpnUserCmd.class.getName());
private static final String s_name = "vpnuser";
private static final String s_name = "addvpnuserresponse";
/////////////////////////////////////////////////////
//////////////// API parameters /////////////////////
@ -106,7 +106,7 @@ public class AddVpnUserCmd extends BaseAsyncCmd {
vpnResponse.setDomainName(ApiDBUtils.findDomainById(accountTemp.getDomainId()).getName());
}
vpnResponse.setResponseName(getName());
vpnResponse.setResponseName("vpnuser");
return vpnResponse;
}

View File

@ -77,8 +77,4 @@ public class VpnUsersResponse extends BaseResponse {
public String getDomainName() {
return domainName;
}
public String toString() {
return "id: " + getId() + ", username: " + getUserName() + ", account: " + getAccountName() + ", domainid: " + getDomainId();
}
}