diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000000..54d02512ba2 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,143 @@ +This document describes how to set up and configure a single server CloudStack +development environment. If you aren't looking for a development environment, +the easiest way to deploy CloudStack is by using RPM or DEB packages from: + + - http://cloudstack.org/download.html + - http://jenkins.cloudstack.org (CI/Build server) + - http://cloudstack.apt-get.eu (Debian repository) + +CloudStack developers use various platforms for development, this guide will +focus on CentOS and was tested against a CentOS 6.2 x86_64 setup. + +Refer to the [wiki](http://cwiki.apache.org/confluence/display/CLOUDSTACK/Index) +for the latest information, especially: + + - [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for CloudStack. + - [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven) CloudStack. + +## Setting up Development Environment + +### Installing Tools and Dependencies + +Install tools and dependencies used for development: + + $ yum install git ant ant-devel java-1.6.0-openjdk java-1.6.0-openjdk-devel + mysql mysql-server tomcat6 mkisofs gcc python MySQL-python openssh-clients wget + +Set up Maven (3.0.4): + + $ wget http://www.us.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz + $ cd /usr/local/ # or any path + $ tar -zxvf apache-maven-3.0.4-bin.tar.gz + $ echo export M2_HOME=/usr/local/apache-maven-3.0.4 >> ~/.bashrc # or .zshrc or .profile + $ echo export PATH=${M2_HOME}/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile + +Note: Tomcat 6.0.35 has some known issue with CloudStack, please use Tomcat +6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin + +### Configure Environment + +Set CATALINA_HOME to path where you extract/install tomcat, put them in your +.bashrc or .zshrc or .profile: + + $ echo export CATALINA_HOME=/usr/share/tomcat6/ >> ~/.bashrc + +Fix permissions on CATALINA_HOME: + + $ chown -R : $CATALINA_HOME + +Generate you ssh keys, useful for ssh-ing to your hosts and vm etc.: + + $ ssh-keygen -t rsa -q + +CloudStack uses some ports, make sure at least those used by the management +server are available and not blocked by any local firewall. Following ports are +used by CloudStack and its entities: + +8787: CloudStack (Tomcat) debug socket +9090, 8250: CloudStack Management Server, User/Client API +8096: User/Client to CloudStack Management Server (unauthenticated) +3306: MySQL Server +3922, 8250, 80/443, 111/2049, 53: Secondary Storage VM +3922, 8250, 53: Console Proxy VM +3922, 8250, 53: Virtual Router +22, 80, 443: XenServer, XAPI +22: KVM +443: vCenter +DNS: 53 +NFS: 111/2049 + +### Configuring MySQL Server + +Start the MySQL service: + + $ service mysqld start + +### Getting the Source Code + +You may get the source code from the repository hosted on Apache: + + $ git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git + +Or, you may fork a repository from the official Apache CloudStack mirror by +Apache on [Github](https://github.com/apache/incubator-cloudstack) + +To keep yourself updated on a branch, do: + + $ git pull + +For example, for master: + + $ git pull origin master + +## Building + +Populate the dependencies using Maven: + + $ mvn -P deps + +Clean previous build, if needed: + + $ mvn clean + $ ant clean-all + $ ant clean-tomcat + +Build all sub-modules: + + $ ant build-all + +Deploy the built project on tomcat: + + $ ant deploy-server + +Clear old database (if any) and deploy the database schema: + + $ ant deploydb + +Start the management server in debug mode: + + $ ant debug + +If this works, you've successfully setup a single server CloudStack installation. + +Open the following URL on your browser to access the Management Server UI: + + http://localhost:8080/client/ + +Or, + + http://management-server-ip-address:8080/client + +The default credentials are; user: admin, password: password and the domain +field should be left blank which is defaulted to the ROOT domain. + +## Packaging + +To create rpms: + + $ mvn -P deps && ./waf rpm + +To create debs: + + $ mvn -P deps && dpkg-buildpackage + diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index 87404780e06..00000000000 --- a/INSTALL.txt +++ /dev/null @@ -1,70 +0,0 @@ -This document describes how to set up and configure a single server CloudStack development environment. If you aren't looking for a development environment The easiest way is to deploy CloudStack from RPM package, building CloudStack from source is for developers. This guide is all about building CloudStack from the source and installing directly from there . This guide is suitable for you if you want to develop the CloudStack. - -I have tested this procedure on Fedora Core 14 - -Step 1: Install the tools and dependencies: -For fedora the package names are ant ant-devel, openjdk, openjdk-devel - -Tools: -yum install ant ant-devel openjdk openjdk-devel mysql mysql-server tomcat - -Dependencies: -yum install jakarta-commons-collections jakarta-commons-dbcp.noarch apache-commons-logging.noarch jakarta-commons-pool jakarta-commons-httpclient.noarch ws-commons-util.noarch glibc-devel gcc python MySQL-python openssh-clients - -Tomcat: -Download tomcat6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/ instead of using distribution's default tomcat. Set CATALINA_HOME and CATALINA_BASE to path where you extract tomcat in environment variable, it would be better off setting them in .bashrc as it will take effect every time you log in. - -Note: Tomcat6.0.35 has some known issue with CloudStack, please avoid it - -SSHKEY: -Run: -sh-keygen -t rsa -q -to create sshkey for your account if you don't have one - -Step 2: Configuration - -Start the MySQL service : - -# service mysqld start - -Step 3: Get the source - -$ git clone https://github.com/CloudStack/CloudStack.git - -For subsequent pulls, do: -$ git pull - -Step 4: Building, testing, and deploying CloudStack using Ant : - -Ant is a Java-based build tool designed to be cross-platform, easy to use, extensible, and scalable. Ant is controlled by providing a text file that tells how to perform all the stages of building, testing, and deploying a project. These files are build files, and every project that uses Ant must have at least one named as build.xml. You can see build.xml in your CloudStack source. - -Type to build CloudStack : -$ ant clean-all build-all - -Type to deploy mgt server : -$ ant deploy-server - -Type to deploy database : -$ ant deploydb - -Type to run mgt server: -$ ant debug - -If all of the above process is successful. You are done the single server CloudStack installation.Now your CloudStack Management Server is running. - -Open your browser and type the bellow url in address bar: - -http://localhost:8080/client/ - -OR - -http://management-server-ip-address:8080/client - -You can see CloudStack Management Console page via a web browser. It will show you management consle login page. You can use the default username and password and leave domain as blank. - -The default credentials are “admin” for user and “password” for password. The domain field should be left blank. A blank -domain field is defaulted to the ROOT domain. - -NOTE : This document is very basic CloudStack development installation. If you are very new to CloudStack and want to feel the power of CloudStack very quickly in RPM based distro, this document will guide very clear step to get it done. Since I am new to CloudStack, I doing this documentation by learning from community. I will keet update new information in this guide to make it more valuable resource. - - diff --git a/LICENSE b/LICENSE index 96952ecc65b..d43769fbf4b 100644 --- a/LICENSE +++ b/LICENSE @@ -2350,6 +2350,8 @@ Within the deps/awsapi-lib directory Within the patches/systemvm/debian/config/etc directory placed in the public domain + by Adiscon GmbH http://www.adiscon.com/ + rsyslog.conf by Simon Kelley dnsmasq.conf vpcdnsmasq.conf diff --git a/README.md b/README.md index a672397c31a..c565de6a0ae 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Software License Version 2. To build the default build target, use maven3 and execute: -maven install +mvn install ## Including optional third party libraries in your build diff --git a/agent/pom.xml b/agent/pom.xml index a5595805042..458d97ce4df 100644 --- a/agent/pom.xml +++ b/agent/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-agent Apache CloudStack Agents org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT diff --git a/api/pom.xml b/api/pom.xml index db147758ff3..f25a6bcbf74 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-api Apache CloudStack API org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT diff --git a/awsapi/conf/cloud-bridge.properties b/awsapi/conf/cloud-bridge.properties index 4d1b23f86e7..d0820e840ec 100644 --- a/awsapi/conf/cloud-bridge.properties +++ b/awsapi/conf/cloud-bridge.properties @@ -1,25 +1,25 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -host=http://localhost:7080/awsapi -storage.root=/Users/john1/S3-Mount -storage.multipartDir=__multipart__uploads__ -bucket.dns=false -serviceEndpoint=localhost:7080 - - - +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +host=http://localhost:7080/awsapi +storage.root=/Users/john1/S3-Mount +storage.multipartDir=__multipart__uploads__ +bucket.dns=false +serviceEndpoint=localhost:7080 + + + diff --git a/awsapi/pom.xml b/awsapi/pom.xml index 9654c2e73dd..10b9c9be5b5 100644 --- a/awsapi/pom.xml +++ b/awsapi/pom.xml @@ -16,16 +16,15 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-awsapi - 4.0.0-SNAPSHOT Apache CloudStack AWS API Bridge + war org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -38,6 +37,11 @@ axis2 ${cs.axis2.version} + + org.apache.axis2 + axis2-adb + ${cs.axis2.version} + org.apache.axis2 axis2-webapp @@ -46,7 +50,7 @@ org.apache.ws.commons.axiom - axiom-api + axiom-impl ${cs.axiom.version} @@ -58,6 +62,16 @@ org.apache.neethi neethi ${cs.neethi.version} + + + org.apache.ws.commons.axiom + axiom-api + + + org.apache.ws.commons.axiom + axiom-impl + + com.google.code.gson @@ -161,19 +175,19 @@ org.slf4j slf4j-jdk14 - 1.5.11 + 1.6.1 runtime org.slf4j slf4j-api - 1.5.11 + 1.6.1 runtime org.apache.ws.security wss4j - 1.5.8 + 1.6.1 runtime @@ -218,6 +232,12 @@ 1.45 runtime + + mysql + mysql-connector-java + 5.1.21 + runtime + install @@ -229,6 +249,9 @@ **/*.java + + ../utils/conf/ + @@ -280,6 +303,22 @@ + + org.mortbay.jetty + maven-jetty-plugin + 6.1.26 + + + + 7080 + 60000 + + + /awsapi + ${basedir}/web/web.xml + ${basedir}/target/cloud-awsapi-${project.version} + + - - - - - - true - false - false - false - - - - - - - - - - - - - - - - 30000 - - - - false - - - - - - false - - admin - axis2 - - - - - - - - - - - - - - - - - - - - - - - - - false - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8080 - - - - - - - - - - - - - > - - - - - - - - - - - - - - HTTP/1.1 - chunked - - - - - - - HTTP/1.1 - chunked - - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - - - - multicast - - - apache.axis2.domain - - - apache.axis2.application.domain - - - true - - - 10 - - - 228.0.0.4 - - - 45564 - - - 500 - - - 3000 - - - 127.0.0.1 - - - 127.0.0.1 - - - 4000 - - - true - - - true - - - - - 127.0.0.1 - 4000 - - - 127.0.0.1 - 4001 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + true + false + false + false + + + + + + + + + + + + + + + + 30000 + + + + false + + + + + + false + + admin + axis2 + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8080 + + + + + + + + + + + + + > + + + + + + + + + + + + + + HTTP/1.1 + chunked + + + + + + + HTTP/1.1 + chunked + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + + + + multicast + + + apache.axis2.domain + + + apache.axis2.application.domain + + + true + + + 10 + + + 228.0.0.4 + + + 45564 + + + 500 + + + 3000 + + + 127.0.0.1 + + + 127.0.0.1 + + + 4000 + + + true + + + true + + + + + 127.0.0.1 + 4000 + + + 127.0.0.1 + 4001 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/awsapi/scripts/run.bat b/awsapi/scripts/run.bat index 437a37f8b83..453e74f8b31 100644 --- a/awsapi/scripts/run.bat +++ b/awsapi/scripts/run.bat @@ -1,18 +1,18 @@ -rem Licensed to the Apache Software Foundation (ASF) under one -rem or more contributor license agreements. See the NOTICE file -rem distributed with this work for additional information -rem regarding copyright ownership. The ASF licenses this file -rem to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance -rem with the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, -rem software distributed under the License is distributed on an -rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -rem KIND, either express or implied. See the License for the -rem specific language governing permissions and limitations -rem under the License. - -java -cp cloud-tool.jar;./lib/XmlSchema-1.4.3.jar;./lib/antlr-2.7.6.jar;./lib/apache-log4j-extras-1.0.jar;./lib/axiom-api-1.2.8.jar;./lib/axiom-impl-1.2.8.jar;./lib/axis2-adb-1.5.1.jar;./lib/axis2-ant-plugin-1.5.1.jar;./lib/axis2-jaxbri-1.5.1.jar;./lib/axis2-jaxws-1.5.1.jar;./lib/axis2-jibx-1.5.1.jar;./lib/axis2-json-1.5.1.jar;./lib/axis2-kernel-1.5.1.jar;./lib/axis2-transport-http-1.5.1.jar;./lib/axis2-transport-local-1.5.1.jar;./lib/commons-codec-1.3.jar;./lib/commons-collections-3.1.jar;./lib/commons-fileupload-1.2.jar;./lib/commons-httpclient-3.1.jar;./lib/commons-io-1.4.jar;./lib/commons-logging-1.1.1.jar;./lib/dom4j-1.6.1.jar;./lib/hibernate3.jar;./lib/httpcore-4.0.jar;./lib/javassist-3.9.0.GA.jar;./lib/jta-1.1.jar;./lib/junit-4.8.1.jar;./lib/log4j-1.2.15.jar;./lib/mail-1.4.jar;./lib/mysql-connector-java-5.1.7-bin.jar;./lib/neethi-2.0.4.jar;./lib/servlet-api.jar;./lib/slf4j-api-1.5.11.jar;./lib/slf4j-simple-1.5.11.jar;./lib/wsdl4j-1.6.2.jar com.cloud.gate.tool.CloudS3CmdTool %* +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. + +java -cp cloud-tool.jar;./lib/XmlSchema-1.4.3.jar;./lib/antlr-2.7.6.jar;./lib/apache-log4j-extras-1.0.jar;./lib/axiom-api-1.2.8.jar;./lib/axiom-impl-1.2.8.jar;./lib/axis2-adb-1.5.1.jar;./lib/axis2-ant-plugin-1.5.1.jar;./lib/axis2-jaxbri-1.5.1.jar;./lib/axis2-jaxws-1.5.1.jar;./lib/axis2-jibx-1.5.1.jar;./lib/axis2-json-1.5.1.jar;./lib/axis2-kernel-1.5.1.jar;./lib/axis2-transport-http-1.5.1.jar;./lib/axis2-transport-local-1.5.1.jar;./lib/commons-codec-1.3.jar;./lib/commons-collections-3.1.jar;./lib/commons-fileupload-1.2.jar;./lib/commons-httpclient-3.1.jar;./lib/commons-io-1.4.jar;./lib/commons-logging-1.1.1.jar;./lib/dom4j-1.6.1.jar;./lib/hibernate3.jar;./lib/httpcore-4.0.jar;./lib/javassist-3.9.0.GA.jar;./lib/jta-1.1.jar;./lib/junit-4.8.1.jar;./lib/log4j-1.2.15.jar;./lib/mail-1.4.jar;./lib/mysql-connector-java-5.1.7-bin.jar;./lib/neethi-2.0.4.jar;./lib/servlet-api.jar;./lib/slf4j-api-1.5.11.jar;./lib/slf4j-simple-1.5.11.jar;./lib/wsdl4j-1.6.2.jar com.cloud.gate.tool.CloudS3CmdTool %* diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java index c49f612bb43..63330428159 100644 --- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java +++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java @@ -52,7 +52,12 @@ public class CloudStackConfigurationDaoImpl extends GenericDaoBase sc = NameSearch.create(); sc.setParameters("name", name); - return findOneBy(sc).getValue(); + CloudStackConfigurationVO configItem = findOneBy(sc); + if (configItem == null) { + s_logger.warn("No configuration item found with name " + name); + return null; + } + return configItem.getValue(); }finally { } diff --git a/awsapi/src/com/cloud/bridge/service/EC2MainServlet.java b/awsapi/src/com/cloud/bridge/service/EC2MainServlet.java index dceb665d1f2..60da11a2f1a 100644 --- a/awsapi/src/com/cloud/bridge/service/EC2MainServlet.java +++ b/awsapi/src/com/cloud/bridge/service/EC2MainServlet.java @@ -65,7 +65,7 @@ public class EC2MainServlet extends HttpServlet{ } logger.info("Value of EC2 API Flag ::" + value); }catch(Exception e){ - throw new ServletException("Error initializing awsapi: " + e.getMessage()); + throw new ServletException("Error initializing awsapi: " + e.getMessage(), e); } } diff --git a/awsapi/test/html/certSubmit.html b/awsapi/test/html/certSubmit.html index 00cb5b7f882..edbfa68da47 100644 --- a/awsapi/test/html/certSubmit.html +++ b/awsapi/test/html/certSubmit.html @@ -1,37 +1,37 @@ - - - -Save the cert into Cloud's EC2 Service: -

-

- - - - - - - - - -

- -

- - + + + +Save the cert into Cloud's EC2 Service: +

+

+ + + + + + + + + +

+ +

+ + diff --git a/awsapi/test/html/testRestURL.txt b/awsapi/test/html/testRestURL.txt index 3153aa7715b..58ef3f247cc 100644 --- a/awsapi/test/html/testRestURL.txt +++ b/awsapi/test/html/testRestURL.txt @@ -1,44 +1,44 @@ -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - ------------------------------------------------------------ - - http://localhost:8080/gate/rest/AmazonEC2?Action=DescribeInstances&SignatureVersion=2&SignatureMethod=HmacSHA256&Version=2009-11-30&Timestamp=2010-01-07T15%3A23%3A03Z&Expires=2010-11-07T15%3A23%3A03Z&AWSAccessKeyId=O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYwpLySev4Hi03_YXiHz4gGg&Signature=lyHOvu2LNxjLHIAlQo3F0JNSDtuCtqHtAX786cCZDFI= - - - -10:44:35,804 INFO EC2RestServlet:? - Request parameter Expires:2010-11-07T15:23 -:03Z -10:44:36,197 ERROR RestAuth:? - Signature mismatch, [+fhKzW5k+O33zWoJ6dUmmo9ycZi -td62M0Lwicz2jT2s=] [lyHOvu2LNxjLHIAlQo3F0JNSDtuCtqHtAX786cCZDFI=] over [GET -localhost:8080 -/gate/rest/AmazonEC2 -AWSAccessKeyId=O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYw -pLySev4Hi03_YXiHz4gGg&Action=DescribeInstances&Expires=2010-11-07T15%3A23%3A03Z& -SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2010-01-07T15%3A23%3A03Z -&Version=2009-11-30] - - -From usercredentials table: ------------------------+ -| 4 | O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYwpLySev4H -i03_YXiHz4gGg | EmskZDLp5EmwPQDzHtA2CK3heW12keN-YTTrO39Iz2Qfk8fmtkFih95B7xexhAat -rlQ5ioNns4iT9qav3WzmrQ | CN=AWS Limited-Assurance CA, OU=AWS, O=Amazon.com, C=US -, serial=1033226874324 | -+----+-------------------------------------------------------------------------- - -EmskZDLp5EmwPQDzHtA2CK3heW12keN-YTTrO39Iz2Qfk8fmtkFih95B7xexhAatrlQ5ioNns4iT9qav3WzmrQ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. + +----------------------------------------------------------- + + http://localhost:8080/gate/rest/AmazonEC2?Action=DescribeInstances&SignatureVersion=2&SignatureMethod=HmacSHA256&Version=2009-11-30&Timestamp=2010-01-07T15%3A23%3A03Z&Expires=2010-11-07T15%3A23%3A03Z&AWSAccessKeyId=O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYwpLySev4Hi03_YXiHz4gGg&Signature=lyHOvu2LNxjLHIAlQo3F0JNSDtuCtqHtAX786cCZDFI= + + + +10:44:35,804 INFO EC2RestServlet:? - Request parameter Expires:2010-11-07T15:23 +:03Z +10:44:36,197 ERROR RestAuth:? - Signature mismatch, [+fhKzW5k+O33zWoJ6dUmmo9ycZi +td62M0Lwicz2jT2s=] [lyHOvu2LNxjLHIAlQo3F0JNSDtuCtqHtAX786cCZDFI=] over [GET +localhost:8080 +/gate/rest/AmazonEC2 +AWSAccessKeyId=O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYw +pLySev4Hi03_YXiHz4gGg&Action=DescribeInstances&Expires=2010-11-07T15%3A23%3A03Z& +SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2010-01-07T15%3A23%3A03Z +&Version=2009-11-30] + + +From usercredentials table: +-----------------------+ +| 4 | O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYwpLySev4H +i03_YXiHz4gGg | EmskZDLp5EmwPQDzHtA2CK3heW12keN-YTTrO39Iz2Qfk8fmtkFih95B7xexhAat +rlQ5ioNns4iT9qav3WzmrQ | CN=AWS Limited-Assurance CA, OU=AWS, O=Amazon.com, C=US +, serial=1033226874324 | ++----+-------------------------------------------------------------------------- + +EmskZDLp5EmwPQDzHtA2CK3heW12keN-YTTrO39Iz2Qfk8fmtkFih95B7xexhAatrlQ5ioNns4iT9qav3WzmrQ diff --git a/awsapi/web/web.xml b/awsapi/web/web.xml index 288196f943c..a5b02072c3d 100644 --- a/awsapi/web/web.xml +++ b/awsapi/web/web.xml @@ -1,145 +1,145 @@ - - - - - - - - CloudBridge - - EC2MainServlet - EC2 Main Servlet - com.cloud.bridge.service.EC2MainServlet - 1 - - - AxisServlet - Apache-Axis Servlet - org.apache.axis2.transport.http.AxisServlet - - - - - - - - - - - 2 - - - AxisAdminServlet - Apache-Axis AxisAdmin Servlet (Web Admin) - - org.apache.axis2.webapp.AxisAdminServlet - - - CloudBridgeS3Servlet - Cloud.com Bridge S3 Service REST Servlet - com.cloud.bridge.service.S3RestServlet - - readonly - false - - - - CloudBridgeEC2Servlet - Cloud.com Bridge EC2 Service REST Servlet - com.cloud.bridge.service.EC2RestServlet - - - - CloudBridgeS3Servlet - /rest/AmazonS3 - - - - CloudBridgeS3Servlet - /rest/AmazonS3/* - - - - CloudBridgeS3Servlet - /dime/AmazonS3 - - - - - CloudBridgeEC2Servlet - /rest/AmazonEC2/* - - - - - CloudBridgeEC2Servlet - /rest/AmazonEC2 - - - - AxisServlet - /servlet/AxisServlet - - - - AxisServlet - *.jws - - - - AxisServlet - /services/* - - - - AxisAdminServlet - /axis2-admin/* - - - - EC2MainServlet - / - - - EC2MainServlet - /* - - - - inc - text/plain - - - - index.jsp - index.html - /axis2-web/index.jsp - - - - 404 - /axis2-web/Error/error404.jsp - - - - 500 - /axis2-web/Error/error500.jsp - - + + + + + + + + CloudBridge + + EC2MainServlet + EC2 Main Servlet + com.cloud.bridge.service.EC2MainServlet + 1 + + + AxisServlet + Apache-Axis Servlet + org.apache.axis2.transport.http.AxisServlet + + + + + + + + + + + 2 + + + AxisAdminServlet + Apache-Axis AxisAdmin Servlet (Web Admin) + + org.apache.axis2.webapp.AxisAdminServlet + + + CloudBridgeS3Servlet + Cloud.com Bridge S3 Service REST Servlet + com.cloud.bridge.service.S3RestServlet + + readonly + false + + + + CloudBridgeEC2Servlet + Cloud.com Bridge EC2 Service REST Servlet + com.cloud.bridge.service.EC2RestServlet + + + + CloudBridgeS3Servlet + /rest/AmazonS3 + + + + CloudBridgeS3Servlet + /rest/AmazonS3/* + + + + CloudBridgeS3Servlet + /dime/AmazonS3 + + + + + CloudBridgeEC2Servlet + /rest/AmazonEC2/* + + + + + CloudBridgeEC2Servlet + /rest/AmazonEC2 + + + + AxisServlet + /servlet/AxisServlet + + + + AxisServlet + *.jws + + + + AxisServlet + /services/* + + + + AxisAdminServlet + /axis2-admin/* + + + + EC2MainServlet + / + + + EC2MainServlet + /* + + + + inc + text/plain + + + + index.jsp + index.html + /axis2-web/index.jsp + + + + 404 + /axis2-web/Error/error404.jsp + + + + 500 + /axis2-web/Error/error500.jsp + + diff --git a/client/pom.xml b/client/pom.xml index 50b85e956f8..0a138764419 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -16,8 +16,7 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-client-ui Apache CloudStack Client UI @@ -25,7 +24,7 @@ org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -152,15 +151,15 @@ - - + + - + - + @@ -204,7 +203,7 @@ - + @@ -214,4 +213,86 @@
+ + + netapp + + + nonoss + + + + + org.apache.cloudstack + cloud-plugin-netapp + ${project.version} + + + + + f5 + + + nonoss + + + + + org.apache.cloudstack + cloud-plugin-network-f5 + ${project.version} + + + + + netscaler + + + nonoss + + + + + org.apache.cloudstack + cloud-plugin-network-netscaler + ${project.version} + + + + + srx + + + nonoss + + + + + org.apache.cloudstack + cloud-plugin-network-srx + ${project.version} + + + + + vmware + + + nonoss + + + + + org.apache.cloudstack + cloud-plugin-hypervisor-vmware + ${project.version} + + + org.apache.cloudstack + cloud-vmware-base + ${project.version} + + + +
diff --git a/console-proxy/certs/realhostip.csr b/console-proxy/certs/realhostip.csr index 0684141d237..61395c9f8d9 100644 --- a/console-proxy/certs/realhostip.csr +++ b/console-proxy/certs/realhostip.csr @@ -1,15 +1,15 @@ ------BEGIN NEW CERTIFICATE REQUEST----- -MIICsDCCAZgCAQAwazELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlDdXBlcnRp -bm8xDjAMBgNVBAoTBVZNT3BzMRAwDgYDVQQLEwdVbmtub3duMRkwFwYDVQQDDBAqLnJlYWxob3N0 -aXAuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg0/QLRH7PrPyPEF6eq6wsNIj -SdPhoLMmzR4XlPiaS9/SzE2cpAq2YWZ8g78HcQqDnxN/Emt9m2hyjXbPstkh5zDbDpMPDnDbnBxA -V9RSKTgRqYfQ+sQvrpsfaHesTFhE1L+4+odrvlgtzoQTPHxwgaiIgKJd9fyJHKg8cbB5UPEv6An0 -5VyVGOmJ+tvDgNV4oynUZ2nVdIWfNvXL/z2SpY48EFE8q3dCh0HpLAR/mAGEqNiVJfHpDS7DovP3 -D7X6I55bc0SNRl4tGTjbPFZw8ydGtoKmWPrsZc/ghmy5xp5TeI/XAaRPjH1BPt+Q6tdtbE6bEoBf -OTM/qVYZ9kut9wIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEBAF5lhhni9dW9MqSL2ixNbViPWpFS -ecOggshYChJfZKrhsuZaDpumJ/+ebICS4zv/oxDwNLSmeAmydiaUQC9LFQEEwvPBYDTtTzwCrtwH -yyFJQSm6pyeIBP/Bih/5hLW8JPm0bDbp5ldrHCDEgKQeeyQhyYOKFODkTuMLw+FLD+V86IVHxElL -/urCRWyZEPwyMsgfsU6ywNX9XNShyk1uDHjFDE67sPhfw52ooxXrYQnBdTk+g0UXPbULzrCK/1kU -fjRq347V9Fwi5NFyGADOaA+q6mtnlb1i3uH1n1YVUzevvpnIr3/RxPSYHB47Kj9iYKeDlYdTRHJy -NpuvTfmQO2Y= ------END NEW CERTIFICATE REQUEST----- +-----BEGIN NEW CERTIFICATE REQUEST----- +MIICsDCCAZgCAQAwazELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlDdXBlcnRp +bm8xDjAMBgNVBAoTBVZNT3BzMRAwDgYDVQQLEwdVbmtub3duMRkwFwYDVQQDDBAqLnJlYWxob3N0 +aXAuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg0/QLRH7PrPyPEF6eq6wsNIj +SdPhoLMmzR4XlPiaS9/SzE2cpAq2YWZ8g78HcQqDnxN/Emt9m2hyjXbPstkh5zDbDpMPDnDbnBxA +V9RSKTgRqYfQ+sQvrpsfaHesTFhE1L+4+odrvlgtzoQTPHxwgaiIgKJd9fyJHKg8cbB5UPEv6An0 +5VyVGOmJ+tvDgNV4oynUZ2nVdIWfNvXL/z2SpY48EFE8q3dCh0HpLAR/mAGEqNiVJfHpDS7DovP3 +D7X6I55bc0SNRl4tGTjbPFZw8ydGtoKmWPrsZc/ghmy5xp5TeI/XAaRPjH1BPt+Q6tdtbE6bEoBf +OTM/qVYZ9kut9wIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEBAF5lhhni9dW9MqSL2ixNbViPWpFS +ecOggshYChJfZKrhsuZaDpumJ/+ebICS4zv/oxDwNLSmeAmydiaUQC9LFQEEwvPBYDTtTzwCrtwH +yyFJQSm6pyeIBP/Bih/5hLW8JPm0bDbp5ldrHCDEgKQeeyQhyYOKFODkTuMLw+FLD+V86IVHxElL +/urCRWyZEPwyMsgfsU6ywNX9XNShyk1uDHjFDE67sPhfw52ooxXrYQnBdTk+g0UXPbULzrCK/1kU +fjRq347V9Fwi5NFyGADOaA+q6mtnlb1i3uH1n1YVUzevvpnIr3/RxPSYHB47Kj9iYKeDlYdTRHJy +NpuvTfmQO2Y= +-----END NEW CERTIFICATE REQUEST----- diff --git a/console-proxy/pom.xml b/console-proxy/pom.xml index 8bfb75363f5..5d350aeeb20 100644 --- a/console-proxy/pom.xml +++ b/console-proxy/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-console-proxy Apache CloudStack Console Proxy org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -138,7 +137,39 @@ - - - + + + + + + diff --git a/console-proxy/ui/viewer-bad-sid.ftl b/console-proxy/ui/viewer-bad-sid.ftl index 246cb7f38d5..2f30ec36015 100644 --- a/console-proxy/ui/viewer-bad-sid.ftl +++ b/console-proxy/ui/viewer-bad-sid.ftl @@ -1,29 +1,29 @@ - - - - - - -
-

Unable to start console session as access is denied because of bad sid

-
- - - + + + + + + +
+

Unable to start console session as access is denied because of bad sid

+
+ + + diff --git a/console-proxy/ui/viewer-connect-failed.ftl b/console-proxy/ui/viewer-connect-failed.ftl index 57af5bd7e7b..9d907cacb43 100644 --- a/console-proxy/ui/viewer-connect-failed.ftl +++ b/console-proxy/ui/viewer-connect-failed.ftl @@ -1,29 +1,29 @@ - - - - - - -
-

Unable to start console session as connection is refused by the machine you are accessing

-
- - - + + + + + + +
+

Unable to start console session as connection is refused by the machine you are accessing

+
+ + + diff --git a/console-proxy/ui/viewer.ftl b/console-proxy/ui/viewer.ftl index 0dd7b391b47..d1b2b56d02d 100644 --- a/console-proxy/ui/viewer.ftl +++ b/console-proxy/ui/viewer.ftl @@ -1,59 +1,59 @@ - - - - - - - -${title} - - - - -
- - - - - + + + + + + + +${title} + + + + +
+ + + + + diff --git a/core/pom.xml b/core/pom.xml index 510cb04105e..15f0f7b7302 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-core Apache CloudStack Core org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -32,17 +31,7 @@ cloud-api ${project.version} - - org.apache.cloudstack - xapi - ${cs.xapi.version} - - - junit - junit - - - + commons-httpclient commons-httpclient @@ -58,6 +47,6 @@ install src - + test diff --git a/deps/XenServerJava/pom.xml b/deps/XenServerJava/pom.xml index 13375144534..18ba54f56a3 100644 --- a/deps/XenServerJava/pom.xml +++ b/deps/XenServerJava/pom.xml @@ -16,13 +16,12 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml xapi diff --git a/deps/pom.xml b/deps/pom.xml index ffc0e75ac14..38bb17108c0 100644 --- a/deps/pom.xml +++ b/deps/pom.xml @@ -16,8 +16,7 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-deps Apache CloudStack Dependencies @@ -25,7 +24,7 @@ org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -176,7 +175,7 @@ - + diff --git a/developer/pom.xml b/developer/pom.xml index 25e56e0b8b4..eb6e11234c8 100644 --- a/developer/pom.xml +++ b/developer/pom.xml @@ -8,17 +8,15 @@ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 - org.apache.cloudstack cloud-developer Apache CloudStack Developer Tools pom org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -76,6 +74,11 @@ + + + + + @@ -129,6 +132,58 @@ jdbc:mysql://${db.cloud.host}:${db.cloud.port} create database `cloud` + + + drop-database-usage + process-test-resources + + execute + + + root + ${db.cloud.password} + jdbc:mysql://${db.cloud.host}:${db.cloud.port} + drop database if exists `cloud_usage` + + + + create-database-usage + process-test-resources + + execute + + + root + ${db.cloud.password} + jdbc:mysql://${db.cloud.host}:${db.cloud.port} + create database `cloud_usage` + + + + drop-database-cloudbridge + process-test-resources + + execute + + + root + ${db.cloud.password} + jdbc:mysql://${db.cloud.host}:${db.cloud.port} + drop database if exists `cloudbridge` + + + + create-database-cloudbridge + process-test-resources + + execute + + + root + ${db.cloud.password} + jdbc:mysql://${db.cloud.host}:${db.cloud.port} + create database `cloudbridge` + create-schema @@ -139,8 +194,17 @@ ${basedir}/target/db/create-schema.sql + ${basedir}/target/db/create-schema-premium.sql ${basedir}/target/db/templates.sql ${basedir}/target/db/create-index-fk.sql + ${basedir}/target/db/cloudbridge_schema.sql + ${basedir}/target/db/cloudbridge_multipart.sql + ${basedir}/target/db/cloudbridge_index.sql + ${basedir}/target/db/cloudbridge_multipart_alter.sql + ${basedir}/target/db/cloudbridge_bucketpolicy.sql + ${basedir}/target/db/cloudbridge_policy_alter.sql + ${basedir}/target/db/cloudbridge_offering.sql + ${basedir}/target/db/cloudbridge_offering_alter.sql diff --git a/docs/en-US/API_Developers_Guide.ent b/docs/en-US/API_Developers_Guide.ent index abb18851bcf..c52e1056321 100644 --- a/docs/en-US/API_Developers_Guide.ent +++ b/docs/en-US/API_Developers_Guide.ent @@ -1,22 +1,4 @@ - - - + - + diff --git a/docs/en-US/Book_Info_Admin.xml b/docs/en-US/Book_Info_Admin.xml new file mode 100644 index 00000000000..6bf89b328c8 --- /dev/null +++ b/docs/en-US/Book_Info_Admin.xml @@ -0,0 +1,46 @@ + + +%BOOK_ENTITIES; +]> + + + + + Apache CloudStack 4.0 + Administrator's Guide + Revised September 11, 2012 01:32 am Pacific + + + + + If you have already installed &PRODUCT; or you want to learn more about the ongoing + operation and maintenance of a &PRODUCT;-powered cloud, read this documentation. It + will help you start using, configuring, and managing the ongoing operation of your cloud. + + + + + + + + + + + diff --git a/docs/en-US/add-members-to-projects.xml b/docs/en-US/add-members-to-projects.xml index a51726e14fc..39c3edfb2c3 100644 --- a/docs/en-US/add-members-to-projects.xml +++ b/docs/en-US/add-members-to-projects.xml @@ -29,5 +29,7 @@ If invitations have been enabled, you can send invitations to new members. If invitations are not enabled, you can add members directly through the UI. + + diff --git a/docs/en-US/api-overview.xml b/docs/en-US/api-overview.xml new file mode 100644 index 00000000000..86eed23bcf2 --- /dev/null +++ b/docs/en-US/api-overview.xml @@ -0,0 +1,34 @@ + + +%BOOK_ENTITIES; +]> + + + + + &PRODUCT; API + The &PRODUCT; API is a low level API that has been used to implement the &PRODUCT; web UIs. It is also a good basis for implementing other popular APIs such as EC2/S3 and emerging DMTF standards. + Many &PRODUCT; API calls are asynchronous. These will return a Job ID immediately when called. This Job ID can be used to query the status of the job later. Also, status calls on impacted resources will provide some indication of their state. + The API has a REST-like query basis and returns results in XML or JSON. + See the Developer’s Guide and the API Reference. + + + + diff --git a/docs/en-US/cloudstack.xml b/docs/en-US/cloudstack.xml index 1e2b6c8b77f..906eadc24a6 100644 --- a/docs/en-US/cloudstack.xml +++ b/docs/en-US/cloudstack.xml @@ -1,53 +1,56 @@ - %BOOK_ENTITIES; ]> - - CloudStack Guide - Revised September 18, 2012 10:48 am Pacific - Apache CloudStack (incubating) - 3.0 - 1 - - - Complete technical documentation for Apache CloudStack. - - - - - - - - - - - + + + - + + + + + + + + + + + + + + + + + + - + + + + \ No newline at end of file diff --git a/docs/en-US/cloudstack_plugin_niciranvp.ent b/docs/en-US/cloudstack_plugin_niciranvp.ent new file mode 100644 index 00000000000..abb18851bcf --- /dev/null +++ b/docs/en-US/cloudstack_plugin_niciranvp.ent @@ -0,0 +1,22 @@ + + + + + + diff --git a/docs/en-US/cloudstack_plugin_niciranvp.xml b/docs/en-US/cloudstack_plugin_niciranvp.xml new file mode 100644 index 00000000000..c535c7cb891 --- /dev/null +++ b/docs/en-US/cloudstack_plugin_niciranvp.xml @@ -0,0 +1,54 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + + + + + + &PRODUCT; Plugin Guide for the Nicira NVP Plugin + Apache CloudStack + 4.0 + 1 + + + + Plugin Guide for the Nicira NVP Plugin. + + + + + + + + + + + + + + + + + + diff --git a/docs/en-US/compute-disk-service-offerings.xml b/docs/en-US/compute-disk-service-offerings.xml index 2469dfe3a15..1fd2a91a38b 100644 --- a/docs/en-US/compute-disk-service-offerings.xml +++ b/docs/en-US/compute-disk-service-offerings.xml @@ -5,33 +5,32 @@ ]> -
Compute and Disk Service Offerings - A service offering is a set of virtual hardware features such as CPU core count and speed, memory, and disk size. The CloudPlatform administrator can set up various offerings, and then end users choose from the available offerings when they create a new VM. A service offering includes the following elements: + A service offering is a set of virtual hardware features such as CPU core count and speed, memory, and disk size. The &PRODUCT; administrator can set up various offerings, and then end users choose from the available offerings when they create a new VM. A service offering includes the following elements: CPU, memory, and network resource guarantees How resources are metered How the resource usage is charged How often the charges are generated - For example, one service offering might allow users to create a virtual machine instance that is equivalent to a 1 GHz Intel Core 2 CPU, with 1 GB memory at $0.20/hour, with network traffic metered at $0.10/GB. Based on the user’s selected offering, CloudPlatform emits usage records that can be integrated with billing systems. CloudPlatform separates service offerings into compute offerings and disk offerings. The computing service offering specifies: + For example, one service offering might allow users to create a virtual machine instance that is equivalent to a 1 GHz Intel® Core™ 2 CPU, with 1 GB memory at $0.20/hour, with network traffic metered at $0.10/GB. Based on the user’s selected offering, &PRODUCT; emits usage records that can be integrated with billing systems. &PRODUCT; separates service offerings into compute offerings and disk offerings. The computing service offering specifies: Guest CPU Guest RAM @@ -43,4 +42,9 @@ Disk size (optional). An offering without a disk size will allow users to pick their own Tags on the data disk + + +
+ + diff --git a/docs/en-US/configuring-projects.xml b/docs/en-US/configuring-projects.xml index e18843d15d6..db0a8b143c0 100644 --- a/docs/en-US/configuring-projects.xml +++ b/docs/en-US/configuring-projects.xml @@ -1,29 +1,15 @@ - %BOOK_ENTITIES; ]> - - -
Configuring Projects - Before &PRODUCT; users start using projects, the &PRODUCT; administrator must set up various systems to support them, including membership invitations, limits on project resources, and controls on who can create projects + Before CloudPlatform users start using projects, the CloudPlatform administrator must set + up various systems to support them, including membership invitations, limits on project + resources, and controls on who can create projects. + + +
diff --git a/docs/en-US/creating-compute-offerings.xml b/docs/en-US/creating-compute-offerings.xml index 56679a422f4..31f974196fb 100644 --- a/docs/en-US/creating-compute-offerings.xml +++ b/docs/en-US/creating-compute-offerings.xml @@ -5,23 +5,22 @@ ]> - + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +-->
Creating a New Compute Offering To create a new compute offering: @@ -32,19 +31,36 @@ Click Add Compute Offering. In the dialog, make the following choices: - Name. Any desired name for the service offering. - Description. A short description of the offering that can be displayed to users - Storage type. The type of disk that should be allocated. Local allocates from storage attached directly to the host where the system VM is running. Shared allocates from storage accessible via NFS. - # of CPU cores. The number of cores which should be allocated to a system VM with this offering - CPU (in MHz). The CPU speed of the cores that the system VM is allocated. For example, "2000" would provide for a 2 GHz clock. - Memory (in MB). The amount of memory in megabytes that the system VM should be allocated. For example, "2048" would provide for a 2 GB RAM allocation. - Network Rate. Allowed data transfer rate in MB per second. - Offer HA. If yes, the administrator can choose to have the system VM be monitored and as highly available as possible. - Storage Tags. The tags that should be associated with the primary storage used by the system VM. - Host Tags. (Optional) Any tags that you use to organize your hosts - CPU cap. Whether to limit the level of CPU usage even if spare capacity is available. - Public. Indicate whether the service offering should be available all domains or only some domains. Choose Yes to make it available to all domains. Choose No to limit the scope to a subdomain; &PRODUCT; will then prompt for the subdomain's name. + Name: Any desired name for the service offering. + Description: A short description of the offering that can be + displayed to users + Storage type: The type of disk that should be allocated. + Local allocates from storage attached directly to the host where the system + VM is running. Shared allocates from storage accessible via NFS. + # of CPU cores: The number of cores which should be allocated + to a system VM with this offering + CPU (in MHz): The CPU speed of the cores that the system VM + is allocated. For example, “2000” would provide for a 2 GHz clock. + Memory (in MB): The amount of memory in megabytes that the + system VM should be allocated. For example, “2048” would provide for a 2 GB + RAM allocation. + Network Rate: Allowed data transfer rate in MB per + second. + Offer HA: If yes, the administrator can choose to have the + system VM be monitored and as highly available as possible. + Storage Tags: The tags that should be associated with the + primary storage used by the system VM. + Host Tags: (Optional) Any tags that you use to organize your + hosts + CPU cap: Whether to limit the level of CPU usage even if + spare capacity is available. + Public: Indicate whether the service offering should be + available all domains or only some domains. Choose Yes to make it available + to all domains. Choose No to limit the scope to a subdomain; &PRODUCT; + will then prompt for the subdomain's name. Click Add. + +
diff --git a/docs/en-US/plugin-niciranvp-about.xml b/docs/en-US/plugin-niciranvp-about.xml new file mode 100644 index 00000000000..8d2e20e7756 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-about.xml @@ -0,0 +1,28 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + + + The Nicira NVP Plugin + + + + diff --git a/docs/en-US/plugin-niciranvp-devicemanagement.xml b/docs/en-US/plugin-niciranvp-devicemanagement.xml new file mode 100644 index 00000000000..2423ce3925d --- /dev/null +++ b/docs/en-US/plugin-niciranvp-devicemanagement.xml @@ -0,0 +1,47 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ Device-management + In CloudStack 4.0.x each Nicira NVP setup is considered a "device" that can be added and removed from a physical network. To complete the configuration of the Nicira NVP plugin a device needs to be added to the physical network using the "addNiciraNVPDevice" API call. The plugin is now enabled on the physical network and any guest networks created on that network will be provisioned using the Nicra NVP Controller. + The plugin introduces a set of new API calls to manage the devices, see below or refer to the API reference. + + addNiciraNvpDevice + + + physicalnetworkid: the UUID of the physical network on which the device is configured + hostname: the IP address of the NVP controller + username: the username for access to the NVP API + password: the password for access to the NVP API + transportzoneuuid: the UUID of the transportzone + + + deleteNiciraNVPDevice + + + nvpdeviceid: the UUID of the device + + + listNiciraNVPDevices + + +
\ No newline at end of file diff --git a/docs/en-US/plugin-niciranvp-features.xml b/docs/en-US/plugin-niciranvp-features.xml new file mode 100644 index 00000000000..cdcda9e2aa6 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-features.xml @@ -0,0 +1,29 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ Features of the Nicira NVP Plugin + In CloudStack release 4.0.x this plugin supports the Connectivity service. This service is responsible for creating Layer 2 networks supporting the networks created by Guests. In other words when an tennant creates a new network, instead of the traditional VLAN a logical network will be created by sending the appropriate calls to the Nicira NVP Controller. + The plugin has been tested with Nicira NVP versions 2.1.0, 2.2.0 and 2.2.1 + In CloudStack 4.0.x only the XenServer hypervisor is supported for use in combination with Nicira NVP + In CloudStack 4.0.x the UI components for this plugin are not complete, configuration is done by sending commands to the API +
\ No newline at end of file diff --git a/docs/en-US/plugin-niciranvp-guide.xml b/docs/en-US/plugin-niciranvp-guide.xml new file mode 100644 index 00000000000..89c9871021d --- /dev/null +++ b/docs/en-US/plugin-niciranvp-guide.xml @@ -0,0 +1,31 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + + + + Plugin Guide for the Nicira NVP Plugin + + + + diff --git a/docs/en-US/plugin-niciranvp-introduction.xml b/docs/en-US/plugin-niciranvp-introduction.xml new file mode 100644 index 00000000000..9c1d42df32d --- /dev/null +++ b/docs/en-US/plugin-niciranvp-introduction.xml @@ -0,0 +1,26 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ Introduction to the Nicira NVP Plugin + The Nicira NVP plugin allows CloudStack to use the Nicira solution for virtualized network as a provider for CloudStack networks and services. +
diff --git a/docs/en-US/plugin-niciranvp-preparations.xml b/docs/en-US/plugin-niciranvp-preparations.xml new file mode 100644 index 00000000000..95a25bdca26 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-preparations.xml @@ -0,0 +1,36 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ Prerequisites + Before enabling the Nicira NVP plugin the NVP Controller needs to be configured. Please review the NVP User Guide on how to do that. + CloudStack needs to have at least one physical network with the isolation method set to "STT". This network should be enabled for the Guest traffic type. + The Guest traffic type should be configured with the traffic label that matches the name of the Integration Bridge on XenServer. See the Nicira NVP User Guide for more details on how to set this up in XenServer. + Make sure you have the following information ready: + + The IP address of the NVP Controller + The username to access the API + The password to access the API + The UUID of the Transport Zone that contains the hypervisors in this Zone + The UUID of the Physical Network that will used for the Guest networks + +
\ No newline at end of file diff --git a/docs/en-US/plugin-niciranvp-provider.xml b/docs/en-US/plugin-niciranvp-provider.xml new file mode 100644 index 00000000000..d81db99d9c0 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-provider.xml @@ -0,0 +1,42 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ Enabling the service provider + To allow CloudStack to use the Nicira NVP Plugin the network service provider needs to be enabled on the physical network. The following sequence of API calls will enable the network service provider + + addNetworkServiceProvider + + + name = "NiciraNVP" + physicalnetworkid = <the uuid of the physical network> + + + updateNetworkServiceProvider + + + id = <the provider uuid returned by the previous call> + state = "Enabled" + + + +
\ No newline at end of file diff --git a/docs/en-US/plugin-niciranvp-revisions.xml b/docs/en-US/plugin-niciranvp-revisions.xml new file mode 100644 index 00000000000..6e455cafaf7 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-revisions.xml @@ -0,0 +1,45 @@ + + +%BOOK_ENTITIES; +]> + + + + + Revision History + + + + 0-0 + Wed Oct 03 2012 + + Hugo + Trippaers + hugo@apache.org + + + + Documentation created for 4.0.x version of the NVP Plugin + + + + + + diff --git a/docs/en-US/plugin-niciranvp-tables.xml b/docs/en-US/plugin-niciranvp-tables.xml new file mode 100644 index 00000000000..4f816550b30 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-tables.xml @@ -0,0 +1,51 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ Database tables + The following tables are added to the cloud database for the Nicira NVP Plugin + + nicira_nvp_nic_map, contains a mapping from nic to logical switch port + + + id + logicalswitch, uuid of the logical switch this port is connected to + logicalswitchport, uuid of the logical switch port for this nic + nic, the CloudStack uuid for this nic, reference to the nics table + + + + + external_nicira_nvp_devices, contains all configured devices + + + id + uuid + physical_network_id, the physical network this device is configured on + provider_name, set to "NiciraNvp" + device_name, display name for this device + host_id, reference to the host table with the device configuration + + + + +
\ No newline at end of file diff --git a/docs/en-US/plugin-niciranvp-troubleshooting.xml b/docs/en-US/plugin-niciranvp-troubleshooting.xml new file mode 100644 index 00000000000..02b06555914 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-troubleshooting.xml @@ -0,0 +1,28 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + + + Troubleshooting the Nicira NVP Plugin + + + + diff --git a/docs/en-US/plugin-niciranvp-usage.xml b/docs/en-US/plugin-niciranvp-usage.xml new file mode 100644 index 00000000000..17413387ea4 --- /dev/null +++ b/docs/en-US/plugin-niciranvp-usage.xml @@ -0,0 +1,29 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + + + Using the Nicira NVP Plugin + + + + + diff --git a/docs/en-US/plugin-niciranvp-uuidreferences.xml b/docs/en-US/plugin-niciranvp-uuidreferences.xml new file mode 100644 index 00000000000..c912971736b --- /dev/null +++ b/docs/en-US/plugin-niciranvp-uuidreferences.xml @@ -0,0 +1,30 @@ + + +%BOOK_ENTITIES; + +%xinclude; +]> + +
+ UUID References + The plugin maintains several references in the CloudStack database to items created on the NVP Controller. + Every guest network this is created will have its broadcast type set to Lswitch and if the network is in state "Implemented", the broadcast URI will have the UUID of the Logical Switch that was created for this network on the NVP Controller. + The Nics that are connected to one of the Logical Switches will have their Logical Switch Port UUID listed in the nicira_nvp_nic_map table + All devices created on the NVP Controller will have a tag set to domain-account of the owner of the network, this string can be used to search for items in the NVP Controller. + +
\ No newline at end of file diff --git a/docs/en-US/projects-overview.xml b/docs/en-US/projects-overview.xml new file mode 100644 index 00000000000..4f9a833b5ed --- /dev/null +++ b/docs/en-US/projects-overview.xml @@ -0,0 +1,31 @@ + + +%BOOK_ENTITIES; +]> + + +
+ Overview of Projects + Projects are used to organize people and resources. &PRODUCT; users within a single domain can group themselves into project teams so they can collaborate and share virtual resources such as VMs, snapshots, templates, data disks, and IP addresses. &PRODUCT; tracks resource usage per project as well as per user, so the usage can be billed to either a user account or a project. For example, a private cloud within a software company might have all members of the QA department assigned to one project, so the company can track the resources used in testing while the project members can more easily isolate their efforts from other users of the same cloud + You can configure &PRODUCT; to allow any user to create a new project, or you can restrict that ability to just &PRODUCT; administrators. Once you have created a project, you become that project’s administrator, and you can add others within your domain to the project. &PRODUCT; can be set up either so that you can add people directly to a project, or so that you have to send an invitation which the recipient must accept. Project members can view and manage all virtual resources created by anyone in the project (for example, share VMs). A user can be a member of any number of projects and can switch views in the &PRODUCT; UI to show only project-related information, such as project VMs, fellow project members, project-related alerts, and so on. + The project administrator can pass on the role to another project member. The project administrator can also add more members, remove members from the project, set new resource limits (as long as they are below the global defaults set by the &PRODUCT; administrator), and delete the project. When the administrator removes a member from the project, resources created by that user, such as VM instances, remain with the project. This brings us to the subject of resource ownership and which resources can be used by a project. + Resources created within a project are owned by the project, not by any particular &PRODUCT; account, and they can be used only within the project. A user who belongs to one or more projects can still create resources outside of those projects, and those resources belong to the user’s account; they will not be counted against the project’s usage or resource limits. You can create project-level networks to isolate traffic within the project and provide network services such as port forwarding, load balancing, VPN, and static NAT. A project can also make use of certain types of resources from outside the project, if those resources are shared. For example, a shared network or public template is available to any project in the domain. A project can get access to a private template if the template’s owner will grant permission. A project can use any service offering or disk offering available in its domain; however, you can not create private service and disk offerings at the project level.. +
+ diff --git a/docs/en-US/projects.xml b/docs/en-US/projects.xml index 0390f528f3f..39ce96bd3bc 100644 --- a/docs/en-US/projects.xml +++ b/docs/en-US/projects.xml @@ -5,27 +5,31 @@ ]> -
- Projects - Projects are used to organize people and resources. &PRODUCT; users within a single domain can group themselves into project teams so they can collaborate and share virtual resources such as VMs, snapshots, templates, data disks, and IP addresses. &PRODUCT; tracks resource usage per project as well as per user, so the usage can be billed to either a user account or a project. For example, a private cloud within a software company might have all members of the QA department assigned to one project, so the company can track the resources used in testing while the project members can more easily isolate their efforts from other users of the same cloud - You can configure &PRODUCT; to allow any user to create a new project, or you can restrict that ability to just &PRODUCT; administrators. Once you have created a project, you become that project’s administrator, and you can add others within your domain to the project. &PRODUCT; can be set up either so that you can add people directly to a project, or so that you have to send an invitation which the recipient must accept. Project members can view and manage all virtual resources created by anyone in the project (for example, share VMs). A user can be a member of any number of projects and can switch views in the &PRODUCT; UI to show only project-related information, such as project VMs, fellow project members, project-related alerts, and so on. - The project administrator can pass on the role to another project member. The project administrator can also add more members, remove members from the project, set new resource limits (as long as they are below the global defaults set by the &PRODUCT; administrator), and delete the project. When the administrator removes a member from the project, resources created by that user, such as VM instances, remain with the project. This brings us to the subject of resource ownership and which resources can be used by a project. - Resources created within a project are owned by the project, not by any particular &PRODUCT; account, and they can be used only within the project. A user who belongs to one or more projects can still create resources outside of those projects, and those resources belong to the user’s account; they will not be counted against the project’s usage or resource limits. You can create project-level networks to isolate traffic within the project and provide network services such as port forwarding, load balancing, VPN, and static NAT. A project can also make use of certain types of resources from outside the project, if those resources are shared. For example, a shared network or public template is available to any project in the domain. A project can get access to a private template if the template’s owner will grant permission. A project can use any service offering or disk offering available in its domain; however, you can not create private service and disk offerings at the project level.. -
+ + Using Projects to Organize Users and Resources + + + + + + + + + diff --git a/docs/en-US/provisioning-steps.xml b/docs/en-US/provisioning-steps.xml index 3febc814035..98717435c62 100644 --- a/docs/en-US/provisioning-steps.xml +++ b/docs/en-US/provisioning-steps.xml @@ -26,7 +26,6 @@ Steps to Provisioning Your Cloud Infrastructure This section tells how to add zones, pods, clusters, hosts, storage, and networks to your cloud. If you are unfamiliar with these entities, please begin by looking through . - diff --git a/docs/en-US/set-global-project-resource-limits.xml b/docs/en-US/set-global-project-resource-limits.xml new file mode 100644 index 00000000000..e2b08cc807f --- /dev/null +++ b/docs/en-US/set-global-project-resource-limits.xml @@ -0,0 +1,28 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Setting the Global Project Resource Limits + TODO +
diff --git a/docs/en-US/set-per-project-resource-limits.xml b/docs/en-US/set-per-project-resource-limits.xml new file mode 100644 index 00000000000..682b92ccf98 --- /dev/null +++ b/docs/en-US/set-per-project-resource-limits.xml @@ -0,0 +1,28 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Setting Per-Project Resource Limits + TODO +
diff --git a/docs/en-US/set-resource-limits-for-projects.xml b/docs/en-US/set-resource-limits-for-projects.xml index 2c331acde51..52083d297c3 100644 --- a/docs/en-US/set-resource-limits-for-projects.xml +++ b/docs/en-US/set-resource-limits-for-projects.xml @@ -24,5 +24,7 @@
Setting Resource Limits for Projects - The &PRODUCT; administrator can set global default limits to control the amount of resources that can be owned by each project in the cloud. This serves to prevent uncontrolled usage of resources such as snapshots, IP addresses, and virtual machine instances. Domain administrators can override these resource limits for individual projects with their domains, as long as the new limits are below the global defaults set by the &PRODUCT; root administrator. The root administrator can also set lower resource limits for any project in the cloud + The &PRODUCT; administrator can set global default limits to control the amount of resources that can be owned by each project in the cloud. This serves to prevent uncontrolled usage of resources such as snapshots, IP addresses, and virtual machine instances. Domain administrators can override these resource limits for individual projects with their domains, as long as the new limits are below the global defaults set by the &PRODUCT; root administrator. The root administrator can also set lower resource limits for any project in the cloud. + +
diff --git a/docs/en-US/suspend-project.xml b/docs/en-US/suspend-project.xml index bfaa12a03d9..b4f821b2c26 100644 --- a/docs/en-US/suspend-project.xml +++ b/docs/en-US/suspend-project.xml @@ -32,17 +32,21 @@ In the left navigation, click Projects. In Select View, choose Projects. Click the name of the project. - Click one of the buttons: + Click one of the buttons:To delete, use - deletebutton.png: Removes a member - - + + deletebutton.png: Removes a project + + + To suspend, use - deletebutton.png: Removes a member + + deletebutton.png: suspends a project + diff --git a/docs/en-US/system-service-offerings.xml b/docs/en-US/system-service-offerings.xml index 75aa128d4c8..c41aa2e293b 100644 --- a/docs/en-US/system-service-offerings.xml +++ b/docs/en-US/system-service-offerings.xml @@ -26,4 +26,4 @@ System Service Offerings System service offerings provide a choice of CPU speed, number of CPUs, tags, and RAM size, just as other service offerings do. But rather than being used for virtual machine instances and exposed to users, system service offerings are used to change the default properties of virtual routers, console proxies, and other system VMs. System service offerings are visible only to the &PRODUCT; root administrator. &PRODUCT; provides default system service offerings. The &PRODUCT; root administrator can create additional custom system service offerings. When &PRODUCT; creates a virtual router for a guest network, it uses default settings which are defined in the system service offering associated with the network offering. You can upgrade the capabilities of the virtual router by applying a new network offering that contains a different system service offering. All virtual routers in that network will begin using the settings from the new service offering. - + diff --git a/docs/en-US/ui.xml b/docs/en-US/ui.xml index 4f7f327d700..94ea4eaf95c 100644 --- a/docs/en-US/ui.xml +++ b/docs/en-US/ui.xml @@ -5,24 +5,25 @@ ]> - User Interface - + User Interface + + diff --git a/docs/en-US/user-services-overview.xml b/docs/en-US/user-services-overview.xml index f9e38c09209..95761217fbf 100644 --- a/docs/en-US/user-services-overview.xml +++ b/docs/en-US/user-services-overview.xml @@ -5,94 +5,35 @@ ]> -
- User Services Overview - In addition to the physical and logical infrastructure of your cloud, and the &PRODUCT; software and servers, you also need a layer of user services so that people can actually make use of the cloud. This means not just a user UI, but a set of options and resources that users can choose from, such as templates for creating virtual machines, disk storage, and more. If you are running a commercial service, you will be keeping track of what services and resources users are consuming and charging them for that usage. Even if you do not charge anything for people to use your cloud – say, if the users are strictly internal to your organization, or just friends who are sharing your cloud – you can still keep track of what services they use and how much of them. -
- Service Offerings, Disk Offerings, Network Offerings, and Templates - A user creating a new instance can make a variety of choices about its characteristics and capabilities. &PRODUCT; provides several ways to present users with choices when creating a new instance: - - Service Offerings, defined by the &PRODUCT; administrator, provide a choice of CPU speed, number of CPUs, RAM size, tags on the root disk, and other choices. See Creating a New Compute Offering. - Disk Offerings, defined by the &PRODUCT; administrator, provide a choice of disk size for primary data storage. See Creating a New Disk Offering. - Network Offerings, defined by the &PRODUCT; administrator, describe the feature set that is available to end users from the virtual router or external networking devices on a given guest network. See Network Offerings. - Templates, defined by the &PRODUCT; administrator or by any &PRODUCT; user, are the base OS images that the user can choose from when creating a new instance. For example, &PRODUCT; includes CentOS as a template. See Working with Templates. - - In addition to these choices that are provided for users, there is another type of service offering which is available only to the &PRODUCT; root administrator, and is used for configuring virtual infrastructure resources. For more information, see Upgrading a Virtual Router with System Service Offerings. -
-
- Accounts, Users, and Domains - An account typically represents a customer of the service provider or a department in a large organization. Multiple users can exist in an account. Users are like aliases in the account. Users in the same account are not isolated from each other, but they are isolated from users in other accounts. Most installations need not surface the notion of users; they just have one user per account. - Accounts are grouped by domains. Domains usually contain accounts that have some logical relationship to each other and a set of delegated administrators with some authority over the domain and its subdomains. For example, a service provider with several resellers could create a domain for each reseller. - Administrators are accounts with special privileges in the system. There may be multiple administrators in the system. Administrators can create or delete other administrators, and change the password for any user in the system. Root administrators have complete access to the system, including managing templates, service offerings, customer care administrators, and domains. Domain administrators can perform administrative operations for users who belong to that domain. Domain administrators do not have visibility into physical servers or other domains. -
-
- Using an LDAP Server for User Authentication - You can use an external LDAP server such as Microsoft Active Directory or ApacheDS to authenticate &PRODUCT; end-users. Just map &PRODUCT; accounts to the corresponding LDAP accounts using a query filter. The query filter is written using the query syntax of the particular LDAP server, and can include special wildcard characters provided by &PRODUCT; for matching common values such as the user’s email address and name. &PRODUCT; will search the external LDAP directory tree starting at a specified base directory and return the distinguished name (DN) and password of the matching user. This information along with the given password is used to authenticate the user. - To set up LDAP authentication in &PRODUCT;, call the &PRODUCT; API command ldapConfig and provide the following: - - Hostname or IP address and listening port of the LDAP server - Base directory and query filter - Search user DN credentials, which give &PRODUCT; permission to search on the LDAP server - SSL keystore and password, if SSL is used - -
- Example LDAP Configuration Commands - To understand the examples in this section, you need to know the basic concepts behind calling the &PRODUCT; API, which are explained in the Developer’s Guide. - The following shows an example invocation of ldapConfig with an ApacheDS LDAP server. - http://127.0.0.1:8080/client/api?command=ldapConfig&hostname=127.0.0.1&searchbase=ou%3Dtesting%2Co%3Dproject&queryfilter=%28%26%28uid%3D%25u%29%29&binddn=cn%3DJohn+Singh%2Cou%3Dtesting%2Co%project&bindpass=secret&port=10389&ssl=true&truststore=C%3A%2Fcompany%2Finfo%2Ftrusted.ks&truststorepass=secret&response=json&apiKey=YourAPIKey&signature=YourSignatureHash - - The command must be URL-encoded. Here is the same example without the URL encoding: - -http://127.0.0.1:8080/client/api?command=ldapConfig -&hostname=127.0.0.1 -&searchbase=ou=testing,o=project -&queryfilter=(&(%uid=%u)) -&binddn=cn=John+Singh,ou=testing,o=project -&bindpass=secret -&port=10389 -&ssl=true -&truststore=C:/company/info/trusted.ks -&truststorepass=secret -&response=json -&apiKey=YourAPIKey -&signature=YourSignatureHash - - The following shows a similar command for Active Directory. Here, the search base is the testing group within a company, and the users are matched up based on email address. - http://10.147.29.101:8080/client/api?command=ldapConfig&hostname=10.147.28.250&searchbase=OU%3Dtesting%2CDC%3Dcompany&queryfilter=%28%26%28mail%3D%25e%29%29&binddn=CN%3DAdministrator%2COU%3Dtesting%2CDC%3Dcompany&bindpass=1111_aaaa&port=389&response=json&apiKey=YourAPIKey&signature=YourSignatureHash - The next few sections explain some of the concepts you will need to know when filling out the ldapConfig parameters. -
-
- Search Base - Coming soon: TODO -
-
- Query Filter - Coming soon: TODO -
-
- Search User Bind DN - Coming soon: TODO -
-
- SSL Keystore Path and Password - Coming soon: TODO -
-
-
+ + User Services Overview + In addition to the physical and logical infrastructure of your cloud, and the &PRODUCT; software and servers, you also need a layer of user services so that people can actually make use of the cloud. This means not just a user UI, but a set of options and resources that users can choose from, such as templates for creating virtual machines, disk storage, and more. If you are running a commercial service, you will be keeping track of what services and resources users are consuming and charging them for that usage. Even if you do not charge anything for people to use your cloud – say, if the users are strictly internal to your organization, or just friends who are sharing your cloud – you can still keep track of what services they use and how much of them. +
+ Service Offerings, Disk Offerings, Network Offerings, and Templates + A user creating a new instance can make a variety of choices about its characteristics and capabilities. &PRODUCT; provides several ways to present users with choices when creating a new instance: + + Service Offerings, defined by the &PRODUCT; administrator, provide a choice of CPU speed, number of CPUs, RAM size, tags on the root disk, and other choices. See Creating a New Compute Offering. + Disk Offerings, defined by the &PRODUCT; administrator, provide a choice of disk size for primary data storage. See Creating a New Disk Offering. + Network Offerings, defined by the &PRODUCT; administrator, describe the feature set that is available to end users from the virtual router or external networking devices on a given guest network. See Network Offerings. + Templates, defined by the &PRODUCT; administrator or by any &PRODUCT; user, are the base OS images that the user can choose from when creating a new instance. For example, &PRODUCT; includes CentOS as a template. See Working with Templates. + + In addition to these choices that are provided for users, there is another type of service offering which is available only to the &PRODUCT; root administrator, and is used for configuring virtual infrastructure resources. For more information, see Upgrading a Virtual Router with System Service Offerings. +
+
\ No newline at end of file diff --git a/docs/publican-adminguide.cfg b/docs/publican-adminguide.cfg index d2651d1ed92..7a8a203a0f6 100644 --- a/docs/publican-adminguide.cfg +++ b/docs/publican-adminguide.cfg @@ -24,6 +24,7 @@ docname: Admin_Guide brand: cloudstack chunk_first: 1 chunk_section_depth: 1 +condition: admin diff --git a/docs/publican-plugin-niciranvp.cfg b/docs/publican-plugin-niciranvp.cfg new file mode 100644 index 00000000000..f419e05a6ee --- /dev/null +++ b/docs/publican-plugin-niciranvp.cfg @@ -0,0 +1,28 @@ +# Publican configuration file for CloudStack Complete Documentation Set +# Contains all technical docs except release notes +# Config::Simple 4.58 +# Tue May 29 00:57:27 2012 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information# +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +xml_lang: en-US +type: Book +docname: cloudstack_plugin_niciranvp +brand: cloudstack +chunk_first: 1 +chunk_section_depth: 1 +condition: install diff --git a/patches/pom.xml b/patches/pom.xml index d62fc860185..d8267619153 100644 --- a/patches/pom.xml +++ b/patches/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-patches Apache CloudStack SystemVM Patches org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT diff --git a/patches/systemvm/debian/config/opt/cloud/bin/patchsystemvm.sh b/patches/systemvm/debian/config/opt/cloud/bin/patchsystemvm.sh index abb1dad88e7..3bbf7b1bf88 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/patchsystemvm.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/patchsystemvm.sh @@ -192,7 +192,7 @@ then enable_serial_console fi -if [ "$TYPE" == "router" ] || [ "$type" == "vpcrouter" ] +if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] then routing_svcs if [ $? -gt 0 ] diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh index 90de218f471..faf62c6ff0c 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh @@ -66,6 +66,7 @@ setup_apache2() { sed -i -e "s/Listen .*:80/Listen $ip:80/g" /etc/apache2/conf.d/vhost$dev.conf sed -i -e "s/Listen .*:443/Listen $ip:443/g" /etc/apache2/conf.d/vhost$dev.conf service apache2 restart + sudo iptables -D INPUT -i $dev -d $ip -p tcp -m state --state NEW --dport 80 -j ACCEPT sudo iptables -A INPUT -i $dev -d $ip -p tcp -m state --state NEW --dport 80 -j ACCEPT } @@ -79,6 +80,11 @@ desetup_apache2() { setup_dnsmasq() { logger -t cloud "Setting up dnsmasq for network $ip/$mask " + # setup rules to allow dhcp/dns request + sudo iptables -D INPUT -i $dev -p udp -m udp --dport 67 -j ACCEPT + sudo iptables -D INPUT -i $dev -d $ip -p udp -m udp --dport 53 -j ACCEPT + sudo iptables -A INPUT -i $dev -p udp -m udp --dport 67 -j ACCEPT + sudo iptables -A INPUT -i $dev -d $ip -p udp -m udp --dport 53 -j ACCEPT # setup static sed -i -e "/^[#]*dhcp-range=interface:$dev/d" /etc/dnsmasq.d/cloud.conf echo "dhcp-range=interface:$dev,set:interface-$dev,$ip,static" >> /etc/dnsmasq.d/cloud.conf @@ -93,7 +99,9 @@ setup_dnsmasq() { desetup_dnsmasq() { logger -t cloud "Desetting up dnsmasq for network $ip/$mask " - + # remove rules to allow dhcp/dns request + sudo iptables -D INPUT -i $dev -p udp -m udp --dport 67 -j ACCEPT + sudo iptables -D INPUT -i $dev -d $ip -p udp -m udp --dport 53 -j ACCEPT sed -i -e "/^[#]*dhcp-option=tag:interface-$dev,option:router.*$/d" /etc/dnsmasq.d/cloud.conf sed -i -e "/^[#]*dhcp-option=tag:interface-$dev,6.*$/d" /etc/dnsmasq.d/cloud.conf sed -i -e "/^[#]*dhcp-range=interface:$dev/d" /etc/dnsmasq.d/cloud.conf @@ -103,11 +111,14 @@ desetup_dnsmasq() { setup_passwdsvcs() { logger -t cloud "Setting up password service for network $ip/$mask, eth $dev " + sudo iptables -D INPUT -i $dev -d $ip -p tcp -m state --state NEW --dport 8080 -j ACCEPT + sudo iptables -A INPUT -i $dev -d $ip -p tcp -m state --state NEW --dport 8080 -j ACCEPT nohup bash /opt/cloud/bin/vpc_passwd_server $ip >/dev/null 2>&1 & } desetup_passwdsvcs() { logger -t cloud "Desetting up password service for network $ip/$mask, eth $dev " + sudo iptables -D INPUT -i $dev -d $ip -p tcp -m state --state NEW --dport 8080 -j ACCEPT pid=`ps -ef | grep socat | grep $ip | grep -v grep | awk '{print $2}'` if [ -n "$pid" ] then @@ -121,18 +132,11 @@ create_guest_network() { sudo ip addr add dev $dev $ip/$mask brd + sudo ip link set $dev up sudo arping -c 3 -I $dev -A -U -s $ip $ip - # setup rules to allow dhcp/dns request - sudo iptables -D INPUT -i $dev -p udp -m udp --dport 67 -j ACCEPT - sudo iptables -D INPUT -i $dev -p udp -m udp --dport 53 -j ACCEPT - sudo iptables -A INPUT -i $dev -p udp -m udp --dport 67 -j ACCEPT - sudo iptables -A INPUT -i $dev -p udp -m udp --dport 53 -j ACCEPT - sudo iptables -D INPUT -i $dev -p tcp -m state --state NEW --dport 8080 -j ACCEPT - sudo iptables -D INPUT -i $dev -p tcp -m state --state NEW --dport 80 -j ACCEPT - sudo iptables -A INPUT -i $dev -p tcp -m state --state NEW --dport 8080 -j ACCEPT - sudo iptables -A INPUT -i $dev -p tcp -m state --state NEW --dport 80 -j ACCEPT # restore mark from connection mark local tableName="Table_$dev" sudo ip route add $subnet/$mask dev $dev table $tableName proto static + sudo iptables -t mangle -D PREROUTING -i $dev -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark + sudo iptables -t nat -D POSTROUTING -s $subnet/$mask -o $dev -j SNAT --to-source $ip sudo iptables -t mangle -A PREROUTING -i $dev -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark # set up hairpin sudo iptables -t nat -A POSTROUTING -s $subnet/$mask -o $dev -j SNAT --to-source $ip @@ -146,12 +150,8 @@ destroy_guest_network() { logger -t cloud " $(basename $0): Create network on interface $dev, gateway $gw, network $ip/$mask " sudo ip addr del dev $dev $ip/$mask - sudo iptables -D INPUT -i $dev -p udp -m udp --dport 67 -j ACCEPT - sudo iptables -D INPUT -i $dev -p udp -m udp --dport 53 -j ACCEPT - sudo iptables -D INPUT -i $dev -p tcp -m state --state NEW --dport 8080 -j ACCEPT - sudo iptables -D INPUT -i $dev -p tcp -m state --state NEW --dport 80 -j ACCEPT sudo iptables -t mangle -D PREROUTING -i $dev -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark - sudo iptables -t nat -A POSTROUTING -s $subnet/$mask -o $dev -j SNAT --to-source $ip + sudo iptables -t nat -D POSTROUTING -s $subnet/$mask -o $dev -j SNAT --to-source $ip destroy_acl_chain desetup_dnsmasq desetup_apache2 diff --git a/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ b/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ index 80f7f030dcb..176bce22559 100644 --- a/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist while read i do diff --git a/patches/systemvm/debian/config/root/redundant_router/keepalived.conf.templ b/patches/systemvm/debian/config/root/redundant_router/keepalived.conf.templ index e016bc95d35..a4969a5b698 100644 --- a/patches/systemvm/debian/config/root/redundant_router/keepalived.conf.templ +++ b/patches/systemvm/debian/config/root/redundant_router/keepalived.conf.templ @@ -1,3 +1,20 @@ +! Licensed to the Apache Software Foundation (ASF) under one +! or more contributor license agreements. See the NOTICE file +! distributed with this work for additional information +! regarding copyright ownership. The ASF licenses this file +! to you under the Apache License, Version 2.0 (the +! "License"); you may not use this file except in compliance +! with the License. You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, +! software distributed under the License is distributed on an +! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +! KIND, either express or implied. See the License for the +! specific language governing permissions and limitations +! under the License. + global_defs { router_id [ROUTER_ID] } diff --git a/plugins/deployment-planners/user-concentrated-pod/pom.xml b/plugins/deployment-planners/user-concentrated-pod/pom.xml index ca2fae143ab..78829356170 100644 --- a/plugins/deployment-planners/user-concentrated-pod/pom.xml +++ b/plugins/deployment-planners/user-concentrated-pod/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-planner-user-concentrated-pod Apache CloudStack Plugin - User Concentrated Pod Deployment Planner org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/deployment-planners/user-dispersing/pom.xml b/plugins/deployment-planners/user-dispersing/pom.xml index 6e1ffc6f026..33f6582e72f 100644 --- a/plugins/deployment-planners/user-dispersing/pom.xml +++ b/plugins/deployment-planners/user-dispersing/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-planner-user-dispersing Apache CloudStack Plugin - User Dispersing Deployment Planner org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/file-systems/netapp/pom.xml b/plugins/file-systems/netapp/pom.xml index f10e5a4a499..d2fdda8e8ff 100644 --- a/plugins/file-systems/netapp/pom.xml +++ b/plugins/file-systems/netapp/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-netapp Apache CloudStack Plugin - NetApp File System org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/host-allocators/random/pom.xml b/plugins/host-allocators/random/pom.xml index ad66c0e0af0..ba7e1ae1e65 100644 --- a/plugins/host-allocators/random/pom.xml +++ b/plugins/host-allocators/random/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-host-allocator-random Apache CloudStack Plugin - Host Allocator Random org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/hypervisors/kvm/agent-descriptor.xml b/plugins/hypervisors/kvm/agent-descriptor.xml new file mode 100644 index 00000000000..51024a879ef --- /dev/null +++ b/plugins/hypervisors/kvm/agent-descriptor.xml @@ -0,0 +1,68 @@ + + + kvm-agent + + zip + + yes + + + + + + + + + ../../../agent/scripts + + 774 + + run.sh + _run.sh + agent.sh + + + + target + + 555 + + cloud-plugin-hypervisor-kvm-*.jar + + + + ../../../scripts + scripts + 555 + + + ../../../agent/conf + conf + 555 + 774 + + agent.properties + log4j-cloud.xml + + + + diff --git a/plugins/hypervisors/kvm/pom.xml b/plugins/hypervisors/kvm/pom.xml index 48630856769..d3eca911a04 100644 --- a/plugins/hypervisors/kvm/pom.xml +++ b/plugins/hypervisors/kvm/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-hypervisor-kvm Apache CloudStack Plugin - Hypervisor KVM org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml @@ -45,4 +44,56 @@ 0.4.9 + + install + src + test + + + maven-assembly-plugin + 2.3 + + kvm-agent + false + + agent-descriptor.xml + + + + + make-agent + package + + single + + + + + + maven-resources-plugin + 2.6 + + + copy-resources + + package + + copy-resources + + + dist + + + target + + kvm-agent.zip + + + + + + + + + diff --git a/plugins/hypervisors/ovm/pom.xml b/plugins/hypervisors/ovm/pom.xml index a8b23d0b943..5700c14d4eb 100644 --- a/plugins/hypervisors/ovm/pom.xml +++ b/plugins/hypervisors/ovm/pom.xml @@ -16,15 +16,21 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-hypervisor-ovm Apache CloudStack Plugin - Hypervisor OracleVM org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml + + + org.apache.cloudstack + xapi + ${cs.xapi.version} + + diff --git a/plugins/hypervisors/vmware/pom.xml b/plugins/hypervisors/vmware/pom.xml index 435ae38b847..81d8dc1dd4f 100644 --- a/plugins/hypervisors/vmware/pom.xml +++ b/plugins/hypervisors/vmware/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-hypervisor-vmware Apache CloudStack Plugin - Hypervisor VMware org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml @@ -33,5 +32,23 @@ cloud-vmware-base ${project.version}
+ + com.cloud.com.vmware + vmware-vim + 1.0 + provided + + + com.cloud.com.vmware + vmware-vim25 + 1.0 + provided + + + com.cloud.com.vmware + vmware-apputils + 1.0 + provided +
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 899382737f4..f89adf1b363 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -250,9 +250,6 @@ import com.vmware.vim25.VirtualMachineGuestOsIdentifier; import com.vmware.vim25.VirtualMachinePowerState; import com.vmware.vim25.VirtualMachineRuntimeInfo; import com.vmware.vim25.VirtualSCSISharing; -import com.xensource.xenapi.Connection; -import com.xensource.xenapi.VIF; -import com.xensource.xenapi.VM; public class VmwareResource implements StoragePoolResource, ServerResource, VmwareHostService { private static final Logger s_logger = Logger.getLogger(VmwareResource.class); diff --git a/plugins/hypervisors/xen/pom.xml b/plugins/hypervisors/xen/pom.xml index bf38e47adfa..959c972e080 100644 --- a/plugins/hypervisors/xen/pom.xml +++ b/plugins/hypervisors/xen/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-hypervisor-xen Apache CloudStack Plugin - Hypervisor Xen org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml @@ -33,5 +32,16 @@ cloud-plugin-network-ovs ${project.version}
+ + org.apache.cloudstack + xapi + ${cs.xapi.version} + + + junit + junit + + +
diff --git a/plugins/network-elements/elastic-loadbalancer/pom.xml b/plugins/network-elements/elastic-loadbalancer/pom.xml index c1ab2c56664..dac500d8fd2 100644 --- a/plugins/network-elements/elastic-loadbalancer/pom.xml +++ b/plugins/network-elements/elastic-loadbalancer/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-network-elb Apache CloudStack Plugin - Network Elastic Load Balancer org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/network-elements/f5/pom.xml b/plugins/network-elements/f5/pom.xml index 0cba48cdfcf..bf40332cfbb 100644 --- a/plugins/network-elements/f5/pom.xml +++ b/plugins/network-elements/f5/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-network-f5 Apache CloudStack Plugin - F5 org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/network-elements/juniper-srx/pom.xml b/plugins/network-elements/juniper-srx/pom.xml index 38a2b550c7e..6040720da6e 100644 --- a/plugins/network-elements/juniper-srx/pom.xml +++ b/plugins/network-elements/juniper-srx/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-network-srx Apache CloudStack Plugin - Juniper SRX org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/network-elements/netscaler/pom.xml b/plugins/network-elements/netscaler/pom.xml index 377e6e0f228..b11009d8b1a 100644 --- a/plugins/network-elements/netscaler/pom.xml +++ b/plugins/network-elements/netscaler/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-network-netscaler Apache CloudStack Plugin - Network Netscaler org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/network-elements/nicira-nvp/pom.xml b/plugins/network-elements/nicira-nvp/pom.xml index 37c3a3a6ecd..70f85607e4a 100644 --- a/plugins/network-elements/nicira-nvp/pom.xml +++ b/plugins/network-elements/nicira-nvp/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-network-nvp Apache CloudStack Plugin - Network Nicira NVP org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/network-elements/ovs/pom.xml b/plugins/network-elements/ovs/pom.xml index 02d455c2b54..ab7ffab8465 100644 --- a/plugins/network-elements/ovs/pom.xml +++ b/plugins/network-elements/ovs/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-network-ovs Apache CloudStack Plugin - Open vSwitch org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/pom.xml b/plugins/pom.xml index 206d4a1c1aa..dbdea24e17b 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -16,8 +16,7 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloudstack-plugins Apache CloudStack Plugin POM @@ -25,11 +24,12 @@ org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT install src + test deployment-planners/user-concentrated-pod diff --git a/plugins/storage-allocators/random/pom.xml b/plugins/storage-allocators/random/pom.xml index 6cb60cdf7ff..b476d1de49f 100644 --- a/plugins/storage-allocators/random/pom.xml +++ b/plugins/storage-allocators/random/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-storage-allocator-random Apache CloudStack Plugin - Storage Allocator Random org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/user-authenticators/ldap/pom.xml b/plugins/user-authenticators/ldap/pom.xml index 7facc3f3307..05e9466d825 100644 --- a/plugins/user-authenticators/ldap/pom.xml +++ b/plugins/user-authenticators/ldap/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-user-authenticator-ldap Apache CloudStack Plugin - User Authenticator LDAP org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/user-authenticators/md5/pom.xml b/plugins/user-authenticators/md5/pom.xml index 1dac92d7e3f..f358f8f1c21 100644 --- a/plugins/user-authenticators/md5/pom.xml +++ b/plugins/user-authenticators/md5/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-user-authenticator-md5 Apache CloudStack Plugin - User Authenticator MD5 org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/plugins/user-authenticators/plain-text/pom.xml b/plugins/user-authenticators/plain-text/pom.xml index a4280a37d26..6406fa92489 100644 --- a/plugins/user-authenticators/plain-text/pom.xml +++ b/plugins/user-authenticators/plain-text/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-plugin-user-authenticator-plaintext Apache CloudStack Plugin - User Authenticator Plain Text org.apache.cloudstack cloudstack-plugins - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 93621dd0994..0366149af2b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,8 +16,7 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 @@ -28,7 +27,7 @@ org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT pom Apache CloudStack CloudStack is an IaaS (“Infrastracture as a Service”) cloud orchestration platform. @@ -74,7 +73,7 @@ 1.4 1.4 1.5.1 - 1.6.2 + 1.5.1 1.2.8 2.0.4 2.4 @@ -157,6 +156,7 @@ plugins awsapi patches + client test @@ -186,6 +186,7 @@ 0 false + INSTALL.md .git/** .gitignore **/*.crt @@ -313,12 +314,7 @@ - - client - - client - - + deps @@ -331,6 +327,18 @@ developer + + vmware + + + nonoss + + + + vmware-base + + + diff --git a/server/pom.xml b/server/pom.xml index f7178d8eb0a..29922b62cb5 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-server Apache CloudStack Server org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT @@ -64,10 +63,34 @@ jstl ${cs.jstl.version} + + org.apache.cloudstack + cloud-utils + ${project.version} + tests + test + + install src - + test + + + test/resources + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + com/cloud/upgrade/* + + + + diff --git a/server/src/com/cloud/migration/Db21to22MigrationUtil.java b/server/src/com/cloud/migration/Db21to22MigrationUtil.java index 71cc6805e8c..7cd6d7ee7ab 100755 --- a/server/src/com/cloud/migration/Db21to22MigrationUtil.java +++ b/server/src/com/cloud/migration/Db21to22MigrationUtil.java @@ -52,9 +52,6 @@ import com.cloud.vm.InstanceGroupVMMapVO; import com.cloud.vm.InstanceGroupVO; import com.cloud.vm.dao.InstanceGroupDao; import com.cloud.vm.dao.InstanceGroupVMMapDao; -import com.xensource.xenapi.Connection; -import com.xensource.xenapi.Pool; -import com.xensource.xenapi.Session; public class Db21to22MigrationUtil { private ClusterDao _clusterDao; diff --git a/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java index 047bb3eec21..a84e6dbb081 100755 --- a/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java +++ b/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java @@ -55,6 +55,7 @@ import com.cloud.upgrade.dao.Upgrade229to2210; import com.cloud.upgrade.dao.Upgrade301to302; import com.cloud.upgrade.dao.Upgrade302to40; import com.cloud.upgrade.dao.Upgrade30to301; +import com.cloud.upgrade.dao.Upgrade40to41; import com.cloud.upgrade.dao.UpgradeSnapshot217to224; import com.cloud.upgrade.dao.UpgradeSnapshot223to224; import com.cloud.upgrade.dao.VersionDao; @@ -157,6 +158,8 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker { _upgradeMap.put("3.0.1", new DbUpgrade[] { new Upgrade301to302(), new Upgrade302to40() }); _upgradeMap.put("3.0.2", new DbUpgrade[] { new Upgrade302to40() }); + + _upgradeMap.put("4.0.0", new DbUpgrade[] { new Upgrade40to41() }); } protected void runScript(Connection conn, File file) { diff --git a/server/src/com/cloud/upgrade/dao/Upgrade40to41.java b/server/src/com/cloud/upgrade/dao/Upgrade40to41.java new file mode 100644 index 00000000000..5067f39d011 --- /dev/null +++ b/server/src/com/cloud/upgrade/dao/Upgrade40to41.java @@ -0,0 +1,83 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package com.cloud.upgrade.dao; + +import java.io.File; +import java.sql.Connection; + +/** + * @author htrippaers + * + */ +public class Upgrade40to41 extends Upgrade30xBase implements DbUpgrade { + + /** + * + */ + public Upgrade40to41() { + // TODO Auto-generated constructor stub + } + + /* (non-Javadoc) + * @see com.cloud.upgrade.dao.DbUpgrade#getUpgradableVersionRange() + */ + @Override + public String[] getUpgradableVersionRange() { + return new String[] { "4.0.0", "4.1.0" }; + } + + /* (non-Javadoc) + * @see com.cloud.upgrade.dao.DbUpgrade#getUpgradedVersion() + */ + @Override + public String getUpgradedVersion() { + return "4.1.0"; + } + + /* (non-Javadoc) + * @see com.cloud.upgrade.dao.DbUpgrade#supportsRollingUpgrade() + */ + @Override + public boolean supportsRollingUpgrade() { + return false; + } + + /* (non-Javadoc) + * @see com.cloud.upgrade.dao.DbUpgrade#getPrepareScripts() + */ + @Override + public File[] getPrepareScripts() { + return new File[0]; + } + + /* (non-Javadoc) + * @see com.cloud.upgrade.dao.DbUpgrade#performDataMigration(java.sql.Connection) + */ + @Override + public void performDataMigration(Connection conn) { + } + + /* (non-Javadoc) + * @see com.cloud.upgrade.dao.DbUpgrade#getCleanupScripts() + */ + @Override + public File[] getCleanupScripts() { + return new File[0]; + } + +} diff --git a/test/pom.xml b/test/pom.xml index f70a89f825a..4507e8cc916 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -16,15 +16,14 @@ specific language governing permissions and limitations under the License. --> - + 4.0.0 cloud-testclient Apache CloudStack Test org.apache.cloudstack cloudstack - 4.0.0-SNAPSHOT + 4.1.0-SNAPSHOT diff --git a/tools/build/installer/rpminstall_full.sh b/tools/build/installer/rpminstall_full.sh index 5e6f0c39c2a..4033297138a 100755 --- a/tools/build/installer/rpminstall_full.sh +++ b/tools/build/installer/rpminstall_full.sh @@ -111,13 +111,14 @@ if [ "$installtype" == "q" -o "$installtype" == "Q" ] ; then elif [ "$installtype" == "m" -o "$installtype" == "M" ] ; then echo "Installing the Management Server..." >&2 - doinstall cloud-client cloud-premium + doinstall cloud-client true elif [ "$installtype" == "a" -o "$installtype" == "A" ] ; then echo "Installing the Agent..." >&2 - if doinstall cloud-agent cloud-premium ; then + if doinstall cloud-agent; then + echo "Agent installation is completed, please add the host from management server" >&2 else true @@ -130,7 +131,7 @@ elif [ "$installtype" == "b" -o "$installtype" == "B" ] ; then elif [ "$installtype" == "s" -o "$installtype" == "S" ] ; then echo "Installing the Usage Server..." >&2 - doinstall cloud-usage cloud-premium + doinstall cloud-usage true elif [ "$installtype" == "d" -o "$installtype" == "D" ] ; then diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/files/builddevcloud.sh b/tools/devcloud/devcloudbox/puppet-devcloud/files/builddevcloud.sh index 7755766ec3f..03bd854e015 100644 --- a/tools/devcloud/devcloudbox/puppet-devcloud/files/builddevcloud.sh +++ b/tools/devcloud/devcloudbox/puppet-devcloud/files/builddevcloud.sh @@ -18,5 +18,11 @@ # under the License. export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32 +export M2_HOME=/opt/cloudstack/apache-maven-3.0.4 +export M2=$M2_HOME/bin +MAVEN_OPTS="-Xms256m -Xmx512m" +PATH=$M2:$PATH cd /opt/cloudstack/incubator-cloudstack/ +/usr/bin/mvn -P deps +/usr/bin/mvn clean /usr/bin/ant clean-all build-all deploy-server deploydb diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/files/installmaven.sh b/tools/devcloud/devcloudbox/puppet-devcloud/files/installmaven.sh new file mode 100644 index 00000000000..48ffdfe8de7 --- /dev/null +++ b/tools/devcloud/devcloudbox/puppet-devcloud/files/installmaven.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +cd /opt/cloudstack +/usr/bin/wget http://apache.mirrors.pair.com/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz +/bin/tar xvfz apache-maven-3.0.4-bin.tar.gz diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp b/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp index 5547ed3fefa..3dc74a18206 100644 --- a/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp +++ b/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp @@ -297,9 +297,26 @@ class puppet-devcloud { group => '0', } + file { '/opt/cloudstack/installmaven.sh': + ensure => 'file', + source => 'puppet:///modules/puppet-devcloud/installmaven.sh', + mode => '777', + owner => '0', + group => '0', + } + + exec { "install_maven": + require => File['/opt/cloudstack/installmaven.sh'], + command => '/opt/cloudstack/installmaven.sh', + cwd => '/opt/cloudstack', + creates => '/opt/cloudstack/apache-maven-3.0.4/', + timeout => '0', + } + exec { "build_cloudstack": require => [ Package['ant'], + Exec['install_maven'], Exec["catalina_home"], File['/opt/cloudstack/incubator-cloudstack/dist'], File['/opt/cloudstack/incubator-cloudstack/target'], diff --git a/tools/whisker/descriptor.xml b/tools/whisker/descriptor.xml index 0564d302fd1..007535def5c 100644 --- a/tools/whisker/descriptor.xml +++ b/tools/whisker/descriptor.xml @@ -2409,6 +2409,10 @@ this distribution. id='libvirt.org' name='The libvirt project' url='http://libvirt.org/' /> + Copyright (c) 2012 The Apache Software Foundation @@ -2444,6 +2448,9 @@ Copyright (c) 2012 The Apache Software Foundation + + + diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 3537c6a9d1d..725c1b33a4a 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -56,7 +56,36 @@ } } }, + + advSearchFields: { + name: { label: 'Name' }, + zoneid: { + label: 'Zone', + select: function(args) { + $.ajax({ + url: createURL('listZones'), + data: { + listAll: true + }, + success: function(json) { + var zones = json.listzonesresponse.zone; + args.response.success({ + data: $.map(zones, function(zone) { + return { + id: zone.id, + description: zone.name + }; + }) + }); + } + }); + } + }, + tagKey: { label: 'Tag Key' }, + tagValue: { label: 'Tag Value' } + }, + // List view actions actions: { // Add instance wizard @@ -266,44 +295,50 @@ }, dataProvider: function(args) { - var array1 = []; - if(args.filterBy != null) { - if(args.filterBy.kind != null) { - switch(args.filterBy.kind) { - case "all": - array1.push("&listAll=true"); - break; - case "mine": - if (!args.context.projects) array1.push("&domainid=" + g_domainid + "&account=" + g_account); - break; - case "running": - array1.push("&listAll=true&state=Running"); - break; - case "stopped": - array1.push("&listAll=true&state=Stopped"); - break; - case "destroyed": - array1.push("&listAll=true&state=Destroyed"); - break; - } - } - if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { - switch(args.filterBy.search.by) { - case "name": - if(args.filterBy.search.value.length > 0) - array1.push("&keyword=" + args.filterBy.search.value); - break; - } - } - } - - if("hosts" in args.context) - array1.push("&hostid=" + args.context.hosts[0].id); + var data = {}; + listViewDataProvider(args, data); + + if(args.filterBy != null) { //filter dropdown + if(args.filterBy.kind != null) { + switch(args.filterBy.kind) { + case "all": + break; + case "mine": + if (!args.context.projects) { + $.extend(data, { + domainid: g_domainid, + account: g_account + }); + } + break; + case "running": + $.extend(data, { + state: 'Running' + }); + break; + case "stopped": + $.extend(data, { + state: 'Stopped' + }); + break; + case "destroyed": + $.extend(data, { + state: 'Destroyed' + }); + break; + } + } + } + + if("hosts" in args.context) { + $.extend(data, { + hostid: args.context.hosts[0].id + }); + } $.ajax({ - url: createURL("listVirtualMachines&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), - dataType: "json", - async: true, + url: createURL('listVirtualMachines'), + data: data, success: function(json) { var items = json.listvirtualmachinesresponse.virtualmachine; diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 71f30072377..881c00289c5 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -191,7 +191,8 @@ url: createURL('listNetworks', { ignoreProject: true }), data: { supportedServices: 'SecurityGroup', - listAll: true + listAll: true, + details: 'min' }, async: false, success: function(data) { @@ -338,7 +339,8 @@ $.ajax({ url: createURL('listVPCs'), data: { - listAll: true + listAll: true, + details: 'min' }, success: function(json) { var items = json.listvpcsresponse.vpc; @@ -436,24 +438,42 @@ } */ }, - dataProvider: function(args) { - var array1 = []; - if(args.filterBy != null) { - if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { - switch(args.filterBy.search.by) { - case "name": - if(args.filterBy.search.value.length > 0) - array1.push("&keyword=" + args.filterBy.search.value); - break; - } - } - } + + advSearchFields: { + zoneid: { + label: 'Zone', + select: function(args) { + $.ajax({ + url: createURL('listZones'), + data: { + listAll: true + }, + success: function(json) { + var zones = json.listzonesresponse.zone; + + args.response.success({ + data: $.map(zones, function(zone) { + return { + id: zone.id, + description: zone.name + }; + }) + }); + } + }); + } + }, + tagKey: { label: 'Tag Key' }, + tagValue: { label: 'Tag Value' } + }, + + dataProvider: function(args) { + var data = {}; + listViewDataProvider(args, data); + $.ajax({ - url: createURL("listNetworks&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), - data: { - listAll: true - }, - dataType: 'json', + url: createURL('listNetworks'), + data: data, async: false, success: function(data) { args.response.success({ @@ -3600,23 +3620,43 @@ cidr: { label: 'label.cidr' }, state: {label: 'label.state', indicator: { 'Enabled': 'on', 'Disabled': 'off'}} }, - dataProvider: function(args) { - var array1 = []; - if(args.filterBy != null) { - if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { - switch(args.filterBy.search.by) { - case "name": - if(args.filterBy.search.value.length > 0) - array1.push("&keyword=" + args.filterBy.search.value); - break; - } - } - } - + + advSearchFields: { + name: { label: 'Name' }, + zoneid: { + label: 'Zone', + select: function(args) { + $.ajax({ + url: createURL('listZones'), + data: { + listAll: true + }, + success: function(json) { + var zones = json.listzonesresponse.zone; + + args.response.success({ + data: $.map(zones, function(zone) { + return { + id: zone.id, + description: zone.name + }; + }) + }); + } + }); + } + }, + tagKey: { label: 'Tag Key' }, + tagValue: { label: 'Tag Value' } + }, + + dataProvider: function(args) { + var data = {}; + listViewDataProvider(args, data); + $.ajax({ - url: createURL("listVPCs&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), - dataType: "json", - async: true, + url: createURL('listVPCs'), + data: data, success: function(json) { var items = json.listvpcsresponse.vpc; args.response.success({data:items}); diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index dfabef88076..ddeb4b1621d 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -408,6 +408,49 @@ cloudStack.converters = { } } +//data parameter passed to API call in listView +function listViewDataProvider(args, data) { + //search + if(args.filterBy != null) { + if(args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) == "object") { //advanced search + for(var key in args.filterBy.advSearch) { + if(key == 'tagKey' && args.filterBy.advSearch[key].length > 0) { + $.extend(data, { + 'tags[0].key': args.filterBy.advSearch[key] + }); + } + else if(key == 'tagValue' && args.filterBy.advSearch[key].length > 0) { + $.extend(data, { + 'tags[0].value': args.filterBy.advSearch[key] + }); + } + else if(args.filterBy.advSearch[key] != null && args.filterBy.advSearch[key].length > 0) { + data[key] = args.filterBy.advSearch[key]; //do NOT use $.extend(data, { key: args.filterBy.advSearch[key] }); which will treat key variable as "key" string + } + } + } + else if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { //basic search + switch(args.filterBy.search.by) { + case "name": + if(args.filterBy.search.value.length > 0) { + $.extend(data, { + keyword: args.filterBy.search.value + }); + } + break; + } + } + } + + //pagination + $.extend(data, { + listAll: true, + details: 'min', + page: args.page, + pagesize: pageSize + }); +} + //find service object in network object function ipFindNetworkServiceByName(pName, networkObj) { if(networkObj == null) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 418fe368129..2e7aac14a17 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -49,6 +49,7 @@ } */ }, + advSearchFields: { name: { label: 'Name' }, zoneid: { @@ -73,7 +74,9 @@ } }); } - } + }, + tagKey: { label: 'Tag Key' }, + tagValue: { label: 'Tag Value' } }, // List view actions @@ -296,35 +299,20 @@ }, dataProvider: function(args) { - var array1 = []; - if(args.filterBy != null) { - if(args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) == "object") { - for(var key in args.filterBy.advSearch) { - if(args.filterBy.advSearch[key] != null && args.filterBy.advSearch[key].length > 0) - array1.push("&" + key + "=" + args.filterBy.advSearch[key]); - } - } - else if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { - switch(args.filterBy.search.by) { - case "name": - if(args.filterBy.search.value.length > 0) - array1.push("&keyword=" + args.filterBy.search.value); - break; - } - } - } - - var apiCmd = "listVolumes&listAll=true&page=" + args.page + "&pagesize=" + pageSize+ array1.join(""); + var data = {}; + listViewDataProvider(args, data); + if(args.context != null) { if("instances" in args.context) { - apiCmd += "&virtualMachineId=" + args.context.instances[0].id; + $.extend(data, { + virtualMachineId: args.context.instances[0].id + }); } } $.ajax({ - url: createURL(apiCmd), - dataType: "json", - async: true, + url: createURL('listVolumes'), + data: data, success: function(json) { var items = json.listvolumesresponse.volume; args.response.success({ @@ -988,7 +976,7 @@ pollAgainIfValueIsIn: { 'UploadNotStarted': 1 }, - pollAgainFn: function(context) { //??? + pollAgainFn: function(context) { var toClearInterval = false; $.ajax({ url: createURL("listVolumes&id=" + context.volumes[0].id), @@ -1004,6 +992,7 @@ return toClearInterval; } }, + status: {label: 'label.status'}, type: { label: 'label.type' }, storagetype: { label: 'label.storage.type' }, hypervisor: { label: 'label.hypervisor' }, @@ -1083,30 +1072,27 @@ } }, - dataProvider: function(args) { - var array1 = []; - if(args.filterBy != null) { - if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { - switch(args.filterBy.search.by) { - case "name": - if(args.filterBy.search.value.length > 0) - array1.push("&keyword=" + args.filterBy.search.value); - break; - } - } - } - - var apiCmd = "listSnapshots&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join(""); + advSearchFields: { + name: { label: 'Name' }, + tagKey: { label: 'Tag Key' }, + tagValue: { label: 'Tag Value' } + }, + + dataProvider: function(args) { + var data = {}; + listViewDataProvider(args, data); + if(args.context != null) { if("volumes" in args.context) { - apiCmd += "&volumeid=" + args.context.volumes[0].id; + $.extend(data, { + volumeid: args.context.volumes[0].id + }); } } $.ajax({ - url: createURL(apiCmd), - dataType: "json", - async: true, + url: createURL('listSnapshots'), + data: data, success: function(json) { var items = json.listsnapshotsresponse.snapshot; args.response.success({ diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js index 5cc069df56a..d341d553ab7 100644 --- a/ui/scripts/ui/widgets/listView.js +++ b/ui/scripts/ui/widgets/listView.js @@ -469,9 +469,11 @@ if (args.cancel) { //click Cancel button // showLabel(); + var oldVal = $label.html(); $edit.hide(); $label.fadeIn(); $instanceRow.closest('div.data-table').dataTable('refresh'); + $editInput.val(_s(oldVal)); return false; } @@ -668,12 +670,15 @@ return $filters.appendTo($toolbar); }; - var createSearchBar = function($toolbar) { + var createSearchBar = function($toolbar, listViewData) { var $search = $('
').addClass('text-search reduced-hide'); var $searchBar = $('
').addClass('search-bar reduced hide').appendTo($search); $searchBar.append(''); $search.append(''); - //$search.append(''); + + if(listViewData.advSearchFields != null) + $search.append(''); + return $search.appendTo($toolbar); }; @@ -1269,7 +1274,7 @@ listViewData.actions, { reorder: reorder }); createFilters($toolbar, listViewData.filters); - createSearchBar($toolbar); + createSearchBar($toolbar, listViewData); loadBody( $table, @@ -1400,7 +1405,8 @@ fields: listViewData.advSearchFields }, after: function(args) { - advancedSearch(args); + advancedSearch(args); + $listView.find('.button.search#basic_search').siblings('.search-bar').find('input').val(''); //clear basic search input field to avoid confusion of search result } }); diff --git a/ui/scripts/ui/widgets/tagger.js b/ui/scripts/ui/widgets/tagger.js index f996f33d349..0f297eb8f7c 100644 --- a/ui/scripts/ui/widgets/tagger.js +++ b/ui/scripts/ui/widgets/tagger.js @@ -21,11 +21,13 @@ var value = $form.find('input[name=value]').val(); if (!key || !value) { - cloudStack.dialog.notice({ message: 'Please specify a tag key and value' }); - + cloudStack.dialog.notice({ message: 'Please specify a tag key and value' }); return false; } - + + if($form.find('div.field.key').find('label.error').css('display') == 'block' || $form.find('div.field.value').find('label.error').css('display') == 'block') + return false; + return true; }; @@ -34,10 +36,10 @@ var $form = $('
').addClass('tag-input'); var $keyField = $('
').addClass('field key'); var $keyLabel = $('